You make a good point about Section 31, it was a bad example to use on my part.
My point though was that "Starfleet" is responsible for exploration, and 'small-level' defence. But when it comes time to 'fight'... Starfleet Intelligence, the Starfleet Marines, Federation Army/Ground Forces, whatever else you can think of, all falls under the command of MACO.
I would imagine that Starfleet Intelligence would have multiple departments, none of which would be under the command of the Maco's. Among these departments might be an FBI type agency that investigates domestic matters, a CIA type agency that investigates foreign matters (and would therefore operate your spies) and a military intelligence department. This department would be responsible for maintaining the best information available for military targets and possible threats. This department would report to the Head of Starfleet Intelligence, who would in turn report to the Chief in Command of Starfleet, who in turn reports to the Federation President. No where in that chain of command would Starfleet Intelligence have to stop and ask the Maco's for anything, even during wartime operations.
The Macos...would most likely operate like any other division of Starfleet, such as the Explorer Corps, or the Colony Corps, Starfleet Medical, and Starfleet Intellegence, in that they they would operate as their own fully fledged division working with the rest of Stafleet to get things done, or operate under the direction of one of the other larger all encompassing departments...such as Starfleets Chief of Operations. In either situation, Starfleet Intelligence wouldn't be subordinate to the Maco's. They would certainly work together to accomplish a set goal, but one would not be in command of the other since they would most likely act as separate entities....much like the CIA operated with the military in Afghanistan...or in the way that the military preforms reconnaissance missions for the CIA.
In actuality, I would expect in some cases for the Maco's to be subordinate to Starfleet Intelligence.