[BUG] .mcp.json is loaded even --mcp-config is used
Resolved 💬 2 comments Opened Jun 11, 2025 by ewhauser Closed Jun 11, 2025
Environment
- Platform (select one):
- [X] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.17 (Claude Code)
- Operating System: OSX
- Terminal: Ghostty
Bug Description
When launching claude with the --mcp-config file paramter, it still loads .mcp.json as well. This is undesirable because it certain situations we want to launch claude from the root of our repository but with a very specific MCP config.
Steps to Reproduce
- Add a .mcp.json
- Run claude --mcp-config some.other.mcp.json
- Run
/mcpto see that the combination of MCPs is loaded
Expected Behavior
I would assume when passing in the config flag that it would only load the config passed in
Actual Behavior
Both files are run
Additional Context
Doesn't have to be the default behavior if not desired but some way to skip .mcp.json when passing the flag is needed
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗