You can see from this map why the Arabs chose Mombasa as the best port and harbour on the East African coast; it is ideal.
The Old Town is in the triangular area opposite 'Mom' of Mombasa Harbour, and Fort Jesus is opposite the 'b': It's purpose clearly being to guard the access to the inner harbour. We always referred to Mombasa Harbour as the 'Old Harbour'. The modern docks are in Kilindi Harbour, where liners would moor. Warships would anchor in the harbour itself.
The Kenya Colonial Service Article