[Feature Request] Add project-exclusive MCP configuration option to disable user-level aggregation
Title: Support project-exclusive MCP configuration (disable user-level MCP aggregation per project)
Problem:
When working across multiple projects with different MCP requirements, user-level MCPs from ~/.claude.json are always aggregated with project-level .mcp.json configs. This causes issues when:
- Projects have isolated environments (e.g., project-a with MongoDB servers vs project-b with PostgreSQL servers)
- Loading irrelevant MCPs adds noise and potential confusion
- Security/access concerns when one project's database MCPs shouldn't be available in another project's context
Current Behavior:
Starting Claude Code from any directory always loads:
- User-level MCPs (~/.claude.json)
- Project-level MCPs (.mcp.json)
No way to opt out of user-level aggregation at the project level.
Desired Behavior:
Add an option in project .mcp.json to disable user-level MCP aggregation:
{
"mcpServers": { ... },
"exclusive": true
}
When "exclusive": true, only that project's .mcp.json servers would load, ignoring ~/.claude.json MCPs.
Use Case:
Working in a workspace with multiple sub-projects:
- /workspace/.mcp.json - aggregate all MCPs (default behavior)
- /workspace/project-a/.mcp.json - exclusive, only project-a database servers
- /workspace/project-b/.mcp.json - exclusive, only project-b database servers
This enables clean context isolation per project while preserving aggregation when desired.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗