[BUG] Project .mcp.json not loaded when using Perforce
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When a user syncs our project .mcp.json file through perforce, Claude Code ignores it on startup. MCP servers that we have defined in that file are not loaded. Globally configured servers in managed settings and at the user level are loaded normally.
If we remove and then manually re-add the MCP servers to the project scope using claude mcp add --scope project, Claude Code picks up the changes immediately. (Possibly related to the files being read-only with Perforce?)
What Should Happen?
Would expect that the MCP servers distributed using .mcp.json through Perforce are detected as normal.
Error Messages/Logs
Steps to Reproduce
- Create a valid .mcp.json in a project directory with at least one valid MCP server
- Sync the file through Perforce (may be able to mimic this through other mechanisms?)
- Launch Claude Code in that directory
- Run
/mcpand note that the project MCP servers are not there
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.101
Platform
AWS Bedrock
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
If we run into it again, I'll try just making the file writeable to see if that fixes it.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗