Timo said:
To be sure, the greenjacket Mendez was never truly associated with starbases, save for happening to reside in one at the beginning of the adventure. For all we know, redjacket Stone was still in command of Starbase 11 at the time of "The Menagerie", only not in speaking terms with Kirk for prefectly understandable reasons...
OTOH, "Court Martial" is stardated 2947 while "The Menagerie" is 3012, so there could have been a change in command. But somehow I find it more satisfactory to think that Mendez was as unrelated to SB 11 as the dialogue makes him, and more like Wesley or Decker in position and role.
"Signed, Mendez,J.I., Commodore, Starbase 11. "
I think it's pretty clear that Mendez is commander of Starbase 11.
Now, if you want to get torturous, you could argue that Mendez runs the show and Stone is just "Portmaster", whatever that means--except Kirk specifically refers to him as "commanding officer" in the opening log.