[FEATURE] Disabling MCP tool context in default, but enabling for subagents
Resolved 💬 4 comments Opened Sep 8, 2025 by sorryhyun Closed Sep 8, 2025
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Feature Request: Disabling MCP tool context in default, but enabling for subagents
Problem Statement
Currently, MCP tools configured in .mcp.json are globally available throughout the entire Claude Code session. This creates unnecessary context overhead and potential confusion when tools are only needed for specific sub-agents or workflows.
Current Behavior:
- MCP tools are either fully enabled (connected) or fully disabled (not connected) for the entire session
- No way to conditionally enable tools based on execution context
- Sub-agents inherit all available MCP tools regardless of need
Proposed Solution
Option 1: add default agent config in /agents
Project agents (/home...)
default (default one when I run claude code in IDE)
...sub-agents
Option 2: Agent-level MCP configuration
{
"mcpServers": {
"playwright": {
"command": "...",
"enabledFor": ["chatgpt-project-manager", "web-automation-agent"]
}
}
}
Option 3: Context flags in configuration
{
"mcpServers": {
"playwright": {
"command": "...",
"contexts": {
"default": false,
"subagents": ["chatgpt-project-manager"]
}
}
}
}
Benefits
- Reduced context overhead: Only load relevant tools when needed
- Improved safety: Prevent accidental use of powerful tools in default context
- Better agent specialization: Each agent gets exactly the tools it needs
- Cleaner user experience: Less tool clutter in autocomplete/suggestions
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
Use Case Example:
- Default Claude Code usage: Don't need MCP browser automation tools (reduces context, prevents accidental usage)
chatgpt-project-manageragent: Requires playwright MCP for web automationcodebase-auditoragent: Doesn't need any MCP tools- Other agents: May need different subsets of MCP tools
Additional Context
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗