MCP tools context cannot be isolated to SubAgents only - requires MainAgent enablement
Resolved 💬 3 comments Opened Dec 10, 2025 by BukeLy Closed Dec 14, 2025
Problem
When testing MCP tool context isolation, I found that MCP tools must be enabled at the MainAgent level and their context cost (tokens) cannot be isolated to only the SubAgents that need them.
Test Scenario
- Goal: Have MCP tool context only consume tokens in SubAgent, not in MainAgent
- Current behavior: MCP tools take ~29.6k tokens (14.8% of context) in MainAgent
- Attempted solution: Disable MCP in MainAgent, enable only in specific SubAgent configuration
Results
- If MCP is disabled in MainAgent, SubAgents cannot access the tools
- Even with explicit tool authorization in SubAgent configuration files, tools remain unavailable
- MCP tools must be loaded at MainAgent level for any SubAgent to use them
Impact
- Cannot implement "on-demand" MCP tool loading strategy to optimize token usage
- MainAgent must bear the full context cost of all MCP tools even if only certain SubAgents need them
- Reduces available context for actual conversation and code
Expected Behavior
Ideally, MCP tools should be loadable only in the SubAgents that need them, keeping MainAgent context free for other purposes.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗