GrepBoard/Manuals
51 manuals ·

Fix a .mcp.json server stuck on "Pending approval"

·Claude Code 2.1.302 · Ubuntu 24.04 · setting keys per Claude Code docs · 2026-10·7 steps

Approve or reject a .mcp.json server that claude mcp list shows as ⏸ Pending approval, and see where local, project and user scope store servers and which wins.

If claude mcp list shows "⏸ Pending approval (run claude to approve)" and the server never connects, nothing is broken. It is waiting for your approval.

[1] Reproduce it. In a project folder, register a server with --scope project.

console
$ claude mcp add --scope project hello -- node /srv/app/server.mjsAdded stdio MCP server hello with command: node /srv/app/server.mjs to project configFile modified: /srv/app/.mcp.json

The generated .mcp.json. With --transport http an entry gets "type": "http" and a url instead.

.mcp.json
{  "mcpServers": {    "hello": {      "type": "stdio",      "command": "node",      "args": [        "/srv/app/server.mjs"      ],      "env": {}    }  }}

[2] Check the list and the details. Claude Code does not try to connect to an unapproved server.

console
$ claude mcp listChecking MCP server health… hello: node /srv/app/server.mjs - ⏸ Pending approval (run `claude` to approve)$ claude mcp get hellohello:  Scope: Project config (shared via .mcp.json)  Status: ⏸ Pending approval (run `claude` to approve)  Type: stdio  Command: node  Args: /srv/app/server.mjs  Environment: To remove this server, run: claude mcp remove hello -s project

[3] Usual fix: open claude interactively in that folder and allow the server in the approval dialog. Only after that does claude mcp list health-check it.

[4] To decide without the dialog, name the servers in a settings file. These are the three keys in the official docs.

KeyMeaning
enabledMcpjsonServersApprove only the named servers
enableAllProjectMcpServersApprove every server in .mcp.json
disabledMcpjsonServersReject the named servers
.claude/settings.local.json
{  "enabledMcpjsonServers": ["hello"],  "disabledMcpjsonServers": ["docs"]}

All three work in any of the user, project, local and managed settings files. Prefer your personal settings.local.json over the .claude/settings.json you commit.

[5] Clicked the wrong answer, or want the prompt back? Clear this project's approvals and rejections.

console
$ claude mcp reset-project-choicesProject-scoped (.mcp.json) server approvals and rejections stored for this project have been reset.You will be prompted for approval next time you start Claude Code.

[6] claude -p, Agent SDK and cloud sessions cannot show the dialog, so they load project servers without asking. To keep one out, add it to disabledMcpjsonServers. For connection failures after approval, see Connect an MCP server to Claude Code and debug "not connected".

[7] When the same name exists in several scopes, only one is used. The whole entry from the higher-precedence scope replaces the others; fields are not merged.

ScopeLoads inSharedStored inPrecedence
local (default)this projectno~/.claude.json1
projectthis projectyes, via version control.mcp.json in project root2
userall your projectsno~/.claude.json3

#claude-code#mcp#settings