i had the same problem a few months ago.
funnily in my country it is freezing cold at the moment, so i kind of have the same problems caused by the opposite reasons :D
however, there are pull up bars you can securely attach to the wall. they look like this:
if you attach it at the height that your knees are just not touching the ground while you are hanging at it you will have enough space to not hit the ceiling when doing a muscle up. of course pull ups and other basic exercises can be done at it too.
i have this bar myself and im doing the muscle ups with my back to the wall because otherwise i would hit the wall while doing the kipping movement.
the cons of this kind of bars are that they are typically really expensive and you have to drill some holes in the wall. but if you have to go to a gym it won't be cheaper ;)
it may not work though if either your ceiling is not as high as mine (2,50 m) or you are as huge as chris ;)
for me it works quite well and i have no excuse to skip a level of the workout program because it's too cold outside.