[BUG] .mcp.json servers never approved/exposed; claude mcp list TTY-vs-pipe inconsistency (2.1.148)
Environment
- Claude Code version: 2.1.148 (latest as of filing)
- OS: Linux
Summary
Two related MCP bugs in 2.1.148:
- Project-scope (
.mcp.json) servers are not exposed to the/mcpTUI or to in-session tools, even after the project trust dialog is accepted. The approval prompt for project MCP servers never fires. claude mcp listreturns different results depending on whether stdout is a TTY, in the same shell, same directory, seconds apart.
Repro
Project has a .mcp.json with multiple MCP server definitions. User scope (~/.claude.json top-level mcpServers) has unrelated stdio servers.
State in ~/.claude.json under projects[\"<path>\"]:
\\\\
hasTrustDialogAccepted: True
enableAllProjectMcpServers: True # legacy flag from a previous CC version
enabledMcpjsonServers: []
disabledMcpjsonServers: []
\\
Bug 1: project-scope servers invisible
/mcpTUI dialog shows only user-scope servers (plain list, no project section).- ToolSearch / session tool exposure: project MCP tools (e.g.
mcp__<name>__*) are absent. - However
claude mcp list 2>&1 | cat(piped) reports them all as ✓ Connected.
Tried, none of which restored the prompt or exposed the tools:
touch .mcp.jsonto bump mtime past~/.claude.jsonclaude mcp reset-project-choices(which flippedenableAllProjectMcpServersto False)- Manually populating
enabledMcpjsonServerswith every server name - Deleting
hasTrustDialogAccepted,enable*,enabled*,disabled*from the project record and bumping.mcp.jsonmtime → workspace trust dialog fires on restart, but MCP approval dialog never does.
Bug 2: \claude mcp list\ TTY-vs-pipe discrepancy
Back-to-back in the same shell, same directory:
\\\`
\$ claude mcp list
Output: 2 user-scope servers only. No \"Checking MCP server health…\" line.
\$ claude mcp list | head -20
Output: All 11 servers, including project-scope. \"Checking MCP server health…\" line present.
\\\`
\mcp list\'s own help says it \"skips the workspace trust dialog and stdio servers from \.mcp.json\ are spawned for health checks.\" That matches the piped behavior, not the TTY behavior.
Expected
- \
/mcp\dialog lists project-scope servers (or shows a banner explaining why they're filtered + a way to approve them). - Approval prompt for new/unapproved \
.mcp.json\servers fires on session start when \enabledMcpjsonServers\is empty and \.mcp.json\defines servers. - \
claude mcp list\produces the same output regardless of TTY status.
Actual
- Project-scope servers are completely invisible to the TUI and to in-session tools, regardless of any combination of trust-flag settings.
- No approval prompt fires, even after \
reset-project-choices\and deleting all trust state. - \
claude mcp list\output depends on whether stdout is a TTY.
Workaround
Mirror every \.mcp.json\ server into user scope (top-level \mcpServers\ in \~/.claude.json\). After this, \/mcp\ lists everything and tools are exposed. The project's \.mcp.json\ stays in place for teammates.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗