claude-code - 💡(How to fix) Fix [BUG] Project .mcp.json not loaded when using Perforce [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46415Fetched 2026-04-11 06:20:54
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Create a valid .mcp.json in a project directory with at least one valid MCP server
  2. Sync the file through Perforce (may be able to mimic this through other mechanisms?)
  3. Launch Claude Code in that directory
  4. Run /mcp and 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.

extent analysis

TL;DR

Make the .mcp.json file writable to potentially resolve the issue where Claude Code ignores it on startup when synced through Perforce.

Guidance

  • Verify that the issue is indeed related to file permissions by temporarily making the .mcp.json file writable and checking if Claude Code detects the MCP servers.
  • Investigate if Perforce has any settings that can make the synced files writable by default.
  • Try manually re-adding the MCP servers using claude mcp add --scope project after making the file writable to confirm if the issue is resolved.
  • If the issue persists, check for any other potential permission or configuration issues that might be preventing Claude Code from reading the .mcp.json file.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

The issue might be specific to the Perforce setup or the AWS Bedrock environment, so further investigation may be required to determine the root cause.

Recommendation

Apply workaround: Make the .mcp.json file writable, as it is a simple and non-intrusive change that can potentially resolve the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING