Project-scoped MCP servers don't trigger approval prompt
Status Closed — not planned
Maintainer reply ✓ Yes — rboyce-ant
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Oct 9, 2025 · closed Feb 6, 2026
💡 Likely answer: A maintainer (rboyce-ant, contributor)
responded on this thread — see the highlighted reply below.
Bug Report: Project-scoped MCP servers don't trigger approval prompt
Summary
When starting a Claude Code session in a project containing .mcp.json, the expected approval prompt for project-scoped MCP servers never appears. Users must manually create .claude/settings.local.json to enable servers, bypassing the intended security workflow.
Expected Behavior
- Start Claude Code session in project with
.mcp.json - Approval prompt appears: "This project wants to use MCP servers: [list]. Approve?"
- On approval,
.claude/settings.local.jsonis automatically created with enabled servers - Servers become available in
/mcp
Actual Behavior
- Start Claude Code session in project with
.mcp.json✅ - No approval prompt appears ❌
.claude/settings.local.jsonis NOT created ❌- Servers do NOT appear in
/mcplist ❌ - Must manually create
.claude/settings.local.jsonwithenabledMcpServersarray
Steps to Reproduce
- Create project directory
- Add
.mcp.jsonwith MCP server configurations:
{
"mcpServers": {
"google-workspace": {
"command": "uv",
"args": ["--directory", "/path/to/server", "run", "main.py"],
"env": { ... }
}
}
}
- Start Claude Code session in project:
claude code - Expected: Approval prompt appears
- Actual: No prompt, servers not available
Observed Issues
claude mcp listdoes NOT show project-scoped servers from.mcp.json- No approval prompt at session start
- No indication that
.mcp.jsonwas even detected - Possible conflict when same-named servers exist in user-scoped config
Environment
- OS: macOS Darwin 25.0.0
- Claude Code CLI (latest)
.mcp.jsonexists in project root with valid configuration
Workaround
Manually create .claude/settings.local.json:
{
"enabledMcpServers": ["google-workspace", "mcp-datetime"]
}
Impact
- Breaks documented security model for project-scoped MCP servers
- Users unaware of
.claude/settings.local.jsonrequirement - No visibility into which servers are project vs user-scoped
- Approval mechanism completely non-functional
Suggested Fixes
- Critical: Trigger approval prompt on session start when
.mcp.jsondetected - Add
--verboseflag to show MCP server discovery/loading process - Show scope indicators in
claude mcp list(user/project/local) - Warn when project servers conflict with user-scoped servers
- Document
.claude/settings.local.jsonapproval mechanism clearly
11 Comments
Update: Workaround confirmed working + documentation issue
After further investigation, the manual workaround does work, but the required
.claude/settings.local.jsonstructure is undocumented. The correct format is:Key findings:
enabledMcpjsonServers(notenabledMcpServers)enableAllProjectMcpServers: trueflagpermissions.allowarray withmcp__<server-name>__*patternserver-name-local)After restart with correct
.claude/settings.local.jsonstructure, project-scoped servers now appear in/mcplist.Core bug remains: No approval prompt appears on session start - users must manually create this file with the correct (undocumented) structure.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Can you run
/doctorfrom Claude Code in this project? When we've seen this before, it was a parsing issue from an invalidsettings.jsonfile.I ran
/doctorin this project and don't have any reported issues. Mind you I experienced this bug when there was no settings.json file in existence - Claude Code never created one in this project folder when I first used the claude command in the terminal. I think the only thing that may be different is the first time I initiated this session for the first time I did 'claude --dangerously-skip-permissions'Can confirm this issue. Through systematic testing of both official methods:
Test 1: Official CLI method
claude mcp add --scope projectto add serversclaude codesession in project directory/mcpshowed "No MCP servers configured"Test 2: Official manual .mcp.json method
.mcp.jsonwith three MCP server configurations (HTTP, SSE, stdio transports)claude codesession in project directory/mcpshowed "No MCP servers configured"Test 3: Applied workaround from this issue
[project]/.claude/settings.local.jsonwith minimal configuration:claude codesessionTested variations of workaround:
enableAllProjectMcpServers: true+ explicitenabledMcpjsonServersarray → worksenableAllProjectMcpServers: true+ wildcard permissions only → works (more maintainable)Both official methods documented at https://docs.claude.com/en/docs/claude-code/mcp#project-scope fail - manual workaround required.
Environment: macOS 26.0.1, Claude Code v2.0.27
here is something else I have discovered, if you use any of the MCP add to the project scope and you try to run, as the next action 'claude --dangerously-skip-permissions' then it skips the part where it asks if you want to allow use of the newly added project MCP servers. That feels like an instance where that permission should be skipped but the MCP servers made available nonetheless, but they are not made available.
Workaround Confirmed: Permission Acceptance Required
I can confirm this issue and have found a critical detail about the workaround:
Root Cause:
When you have a local
.mcp.jsonfile, you MUST run Claude Code without--dangerously-skip-permissionsat least once in that project for it to accept and load the.mcp.jsonconfiguration.Why This Matters:
.mcp.jsonfiles require explicit user trust/approval--dangerously-skip-permissionsbypasses the permission dialog.mcp.jsonwon't be loadedReproduction Steps:
.mcp.jsonin your projectclaudewith--dangerously-skip-permissions(common workflow)claude mcp listshows "No MCP servers configured"Working Workflow:
.mcp.jsonin your projectclaudewithout--dangerously-skip-permissionsEnvironment:
.mcp.jsonThis explains why many users see silent failure - if they always use
--dangerously-skip-permissions, they never see the approval dialog that's required for.mcp.jsonto work.The workaround is not working for me for existing project directories.
If I am using a new project directory, Claude does prompt for approval and when the approval is accepted, the mcp servers that are allowed in ~/.claude/settings.json and managed-settings.json are written to the enabledMcpjsonServers list in the <project>/.claude/settings.local.json file, and they are visible to /mcp. Only the MCP servers that are allowed in the user and enterprise tier are written to the settings.local.json file. MCP servers that are enabled in the <project>/.claude/settings.json file are not written to the <project>/.claude/settings.local.json file, and they are not visible to /mcp.
This is the behavior I am seeing if the project directory already exists:
Reproduction Steps:
Working Workflow:
"allowedMcpServers": [{"serverName": "test-server"}]
You can also enable the server in managed-settings.json
User is not asked to approve the mcp server+
The mcp servers are NOT written to .claude/settings.local.json
Environment:
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.