A rotary Wankel-Stirling machine operating upon a compressible working fluid, having a rotary expander having a hot side housing with a heat input interface, a hot side rotor having rotor passages adapted to allow passage of the working fluid between the rotor hub and rotor face, heated chambers formed between the rotor face and the hot side housing, a rotary compressor having a cold side housing with a heat rejection interface, a cold side rotor having rotor passages adapted to allow passage of the working fluid between the rotor hub and rotor face, cooled chambers formed between the rotor face and the cold side housing, a shaft, adapted to rotatably couple the rotor hub of the hot side rotor and the rotor hub of the cold side rotor, the shaft having shaft passages adapted to allow passage of the working fluid between the heated chambers and the cooled chambers, and the working fluid sealed in the machine, wherein the machine operates under the Carnot cycle. The rotary Wankel-Stirling machine may be operated as an engine or a heat pump.