
If your Claude Code MCP JSON is not working, the server in your project’s .mcp.json file is usually stuck at one of three gates: Claude Code can’t find the file, it can’t read the file, or it found the server but is waiting for you to approve it. Run claude mcp list in the project folder.
If the server is missing, check the file name, folder and mcpServers key. If you see an “MCP config diagnostics” block, fix the line it names. If it says “Pending approval”, start claude, trust the folder and pick “Use this MCP server”.
One trap catches a lot of people. In our test, the approval dialog had “Continue without using this MCP server” selected by default, so pressing Enter out of habit rejected the server. After that, claude mcp get shows it as “Rejected”, and claude mcp reset-project-choices brings the prompt back.
We broke a working project server nine different ways in a throwaway demo folder and captured exactly what Claude Code printed each time. Below you’ll find every cause, the real message it produced, and the fix that worked.
Browse all our Claude Code tutorials for more fixes and how-tos.
Tested with Claude Code v2.1.332 on macOS on December 6, 2026. The demo used a tiny MCP server we wrote ourselves (a Python script with one tool, list_notes) inside two throwaway folders, so no real project or account setup was changed. The file rules are the same on Windows and Linux; we tested on macOS, and the Windows and Linux steps follow Anthropic’s official instructions.
Quick Summary: Why a Project .mcp.json Server Doesn’t Load
Find what you see in the first column. Every row except the last two is something we triggered and checked ourselves.
| What you see | Cause | Fix |
|---|---|---|
Server missing from claude mcp list, no error | File named mcp.json or placed inside .claude/ | Rename to .mcp.json at the project root |
Missing "mcpServers" — found "servers" instead | Config copied from another tool | Rename the top-level key to mcpServers |
MCP config is not a valid JSON (line 6, column 5) | Trailing comma or other typo | Fix the JSON at that line |
Skipped — invalid MCP server config | Missing or misspelled command | Use command and args |
Missing environment variables: NOTES_DIR | A ${VAR} that isn’t set | Set it, or use ${VAR:-default} |
Pending approval (run `claude` to approve) | You haven’t approved the server yet | Run claude, trust the folder, approve |
Rejected (see disabledMcpjsonServers in settings) | You skipped or rejected it once | claude mcp reset-project-choices |
Committed enableAllProjectMcpServers ignored | Folder not trusted yet | Run claude once and trust the folder |
| Server never loads with certain flags | --strict-mcp-config or a same-name local server (from the docs) | Drop the flag or remove the duplicate |
Failed to connect | The file is fine; the server itself fails | Debug the server, not the file |
How Claude Code Loads Project MCP Servers
A project MCP server is one you share with your team through a file named .mcp.json in the root folder of your project. Its servers sit under a top-level mcpServers object.
You can write the file by hand, or let claude mcp add --scope project write it for you. If you aren’t sure which file holds which server, our guide to the MCP config location covers all three scopes.
Because anyone with access to the repository can edit that file, Claude Code doesn’t just run what it finds. According to the official MCP docs, it prompts for approval in interactive sessions before using project-scoped servers. So a project server has to pass three gates: the file is found, the file parses, and you approve the server.
Here is the small, correct file we used as our starting point. The full path in args is a good habit for local scripts.
{
"mcpServers": {
"team-notes": {
"command": "python3",
"args": ["/Users/you/claude-code-demos/mcp-json-not-loading/team-app/notes_server.py"]
}
}
}Missing, broken or unapproved: almost every .mcp.json problem is one of those three, and claude mcp list tells you which.
Step 1: Make Sure Claude Code Can Find .mcp.json
The quietest failure is a file Claude Code never looks at. There is no error, the server simply isn’t in the list. We saw this with two very common mistakes.
Fix 1: Use the exact name .mcp.json
The file name starts with a dot, and a file called mcp.json is ignored. We named our file without the dot, ran claude mcp list | grep -c team-notes, and got 0 matches. After renaming it to .mcp.json, the same command found the server.

On macOS, files that start with a dot are hidden in Finder, so use ls -a to see them. Some editors also save a file as .mcp.json.txt without telling you, so check the full name.
Fix 2: Put the file at the project root, not inside .claude
Settings files live in the .claude/ folder, so it feels natural to put .mcp.json there too. Claude Code doesn’t read it from there. When we moved our file to .claude/.mcp.json, the server disappeared from claude mcp list again, with no warning.
The good news: you don’t have to start Claude Code from the exact root folder. We ran claude mcp list from the src subfolder and it still found the parent’s .mcp.json. The trust dialog in v2.1.332 even says it loads .mcp.json “here or above”.
Step 2: Read the MCP Config Diagnostics
When Claude Code finds the file but can’t use it, claude mcp list adds an “MCP config diagnostics” block at the end of its output. If you have many servers, the block is easy to miss, so we piped the output through tail -n 6 to show only the end.
Fix 3: Use the mcpServers key
Different MCP clients use different top-level keys. If you copy a config from another app’s docs, you might paste a block that starts with "servers". Claude Code flags it clearly as an error and loads nothing from the file.

Rename the key to mcpServers and keep the server names inside it as they are.
Fix 4: Remove trailing commas and other JSON typos
JSON is strict. A comma after the last item in a list or object, a missing quote, or a comment line breaks the whole file. We added one comma after the args line, and Claude Code reported the exact position.

Notice the reported position is line 6, just after the real mistake. Parsers notice the problem at the next character, so look one line up as well. Running the file through python3 -m json.tool .mcp.json is a quick second check.
Fix 5: Give every stdio server a command
A local server needs a command field. When we misspelled it as cmd, the file still parsed, but Claude Code skipped that one server with a warning. Other servers in the same file would still load, which makes this one easy to overlook.
Fix 6: Set the environment variables the file uses
The docs explain that .mcp.json can read environment variables with ${VAR}, or ${VAR:-default} to fall back to a default. When we pointed args at ${NOTES_DIR}/notes_server.py without setting NOTES_DIR, Claude Code warned us and loaded the server with the text left unexpanded, so the path was wrong.

Export the variable in the terminal you start Claude Code from, or add a default. For keys and tokens, our guide to MCP env vars shows how to keep secrets out of the shared file.
Step 3: Approve the Server (Pending Approval)
Once the file is fine, the most common status is “Pending approval”. This isn’t an error: Claude Code found your server and is waiting for you to say yes. You can’t approve it from claude mcp list; you approve it in an interactive session.

Fix 7: Trust the folder, then pick “Use this MCP server”
Start claude in the project. In a folder you haven’t used before, you first see the workspace trust dialog. In our version, “No, exit” was selected by default, so move down to “Yes, I trust this folder” before you press Enter.

Next comes a dialog titled “New MCP server found in this project”. It offers three choices: use this server, use this and all future servers in this project, or continue without it. Look at where the arrow starts before you press Enter.

Use the arrow keys to select “Use this MCP server” and press Enter. Claude Code saves your answer as an enabledMcpjsonServers list in your private .claude/settings.local.json. Then type /mcp to confirm.

To prove it really worked, we sent one short prompt asking Claude to list our project notes. It called the server and returned the three notes our script holds.

Step 4: Undo a Rejected Server
If you skipped the dialog, pressed Esc, or hit Enter on the default, the server is rejected. claude mcp list no longer shows it as pending, so it can look like it vanished. claude mcp get <name> tells the real story.
Fix 8: Run claude mcp reset-project-choices
Your rejection lives in .claude/settings.local.json as a disabledMcpjsonServers list. Running claude mcp reset-project-choices clears your approvals and rejections for the project, and the server goes back to pending. Start claude again and approve it this time.

You can also remove the name from disabledMcpjsonServers by hand. Check other settings files too: the settings reference says a rejection in any settings file applies, including a committed .claude/settings.json, and it wins over any approval.
Step 5: When a Committed Approval Is Ignored
Teams often try to skip the prompt for everyone by committing a setting. Two settings approve project servers. enabledMcpjsonServers approves the servers you name, and enableAllProjectMcpServers approves every server in .mcp.json.
Here’s the catch the docs spell out: a cloned repository can’t approve its own servers. In a folder you haven’t trusted, Claude Code ignores these keys in the shared project file. We tested it in a fresh clone with enableAllProjectMcpServers set to true in .claude/settings.json.

Fix 9: Trust the folder once
We started claude in the clone and accepted only the trust dialog. No MCP approval prompt appeared, and afterward the same server showed “Connected”. The project file now counted, and no settings.local.json was created.

Per the docs, approvals in your user ~/.claude/settings.json, in managed settings, or passed with --settings apply even before you trust a folder. Our settings files guide explains how these scopes stack.
Diagram: Which .mcp.json Problem Do You Have?
Start at the top and stop at the first answer that fits. Each box matches one of the steps above.

Other Reasons a Project Server Won’t Show Up
These come from the official docs rather than our own test, but they explain the rarer cases.
- You started with
--strict-mcp-config. Claude Code then loads only the servers you pass with--mcp-configand skips.mcp.json. - A server with the same name exists in local scope. Local beats project, and the docs say the whole entry from the higher scope is used, with no merging.
- Your organization blocks it. A server refused by a managed policy can show “Blocked by enterprise managed policy” or be hidden entirely. Ask your admin.
- You paused it with
/mcp. That shows as “Disabled for this project”, which is a separate switch covered in our guide to reloading MCP servers. - You’re running
claude -p. Print mode can’t show the prompt, so the docs say it loads project servers without asking. If a server works there but not interactively, it’s an approval issue.
If the status says “Failed to connect”, your file is fine and the server itself is the problem. Our guide to reading MCP logs and the npx ENOENT fix pick up from there.
Try It Yourself
The safest way to learn these statuses is to break a throwaway project on purpose. Make an empty folder, add a tiny server, and ask Claude Code to help you set it up.
Create a minimal stdio MCP server in Python named notes_server.py with one tool,
list_notes, that returns three sample notes. Then write a .mcp.json at the project
root that runs it with python3 and an absolute path. Don't install anything.Then try each break from this article: drop the dot, rename mcpServers, add a trailing comma, and reject the server once. Run claude mcp list and claude mcp get after each one so you recognize the messages when they happen for real.
Common Mistakes
- Pressing Enter on the approval dialog without looking. The default choice may skip the server.
- Putting the file in
.claude/or naming itmcp.json. Neither is read. - Pasting a config that uses
"servers"instead of"mcpServers". - Reading only the top of
claude mcp list. The diagnostics block is at the end. - Committing
enableAllProjectMcpServersand expecting it to work before teammates trust the folder. - Committing secrets in
.mcp.jsoninstead of${VAR}references.
Pro Tips
- Use
claude mcp get <name>for one server. It shows the scope and the “Rejected” status that the list hides. - Keep paths to local scripts absolute, or read the project folder from the
CLAUDE_PROJECT_DIRvariable the docs say Claude Code passes to the server. - Give every variable a fallback with
${VAR:-default}so a teammate without it still gets a working server. - Add a short “first run” note to your README: run
claude, trust the folder, choose “Use this MCP server”. - Prefer
claude mcp add --scope projectover hand-editing. It writes the correct structure for you, as our guide to MCP server scopes shows.
Cheat Sheet: .mcp.json Not Loading
Save this card for the next time a project server goes missing.

Frequently Asked Questions
Why doesn’t Claude Code see my .mcp.json at all?
Check the name and place first. It must be named .mcp.json with the dot and sit in the project root, not in .claude/. In our test a subfolder launch still found the parent file.
Do I need to restart Claude Code after editing .mcp.json?
For a server that’s new to the file, yes: start a fresh session so the approval prompt appears. For changes to a server you already approved, the Reconnect option in /mcp is often enough.
How do I approve a project MCP server without the prompt?
Add the server name to enabledMcpjsonServers, or set enableAllProjectMcpServers to true. From a committed project file, these only work after the folder is trusted. From your user settings they work right away.
I clicked the wrong option. How do I get the prompt back?
Run claude mcp reset-project-choices in the project folder. It clears your approvals and rejections for that project, and the next session asks again.
Is it safe to approve every project server automatically?
Only for repositories you fully trust. A project server can run code on your machine, which is exactly why Claude Code asks first. Review .mcp.json in any repo you clone before approving it.
For more error messages, see our list of common Claude Code errors, our beginner guide to Claude Code MCP, and our overview of Claude AI.
Conclusion
When your Claude Code MCP JSON is not working, a project server is almost always missing, broken or waiting for approval, and claude mcp list tells you which. Name the file .mcp.json at the project root, use the mcpServers key, fix whatever line the diagnostics name, then run claude, trust the folder and choose “Use this MCP server” on purpose, since the default may skip it. If you rejected it, claude mcp reset-project-choices gives you a second chance, and a committed approval only takes effect once the folder is trusted. The official settings docs cover the rest of the configuration in more detail.


