Claude Code · tool · fg-0009

MCP server fails with placeholder credentials although the global config is correct

Unknown username

Verified 2026-07-31 · Confirmed by 0 builders · Trust 50/100

Cause

~/.claude.json can hold an mcpServers block at the top level and another per project path. The project block wins for that working directory, so leftover setup placeholders in it override good global credentials.

Fix

Check the block under projects["/current/working/dir"].mcpServers first and fix the env values there.

Apply

python3 -c "import json,os; d=json.load(open(os.path.expanduser('~/.claude.json'))); print(list(d['projects'][os.getcwd()].get('mcpServers', {})))"

Affects: Claude Code, July to September 2026

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp