Claude Code · tool · fg-0009

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

If you see Unknown username, the cause and the fix for Claude Code are below, last verified 2026-07-31.

Staletrust 50/100

This trap has not been confirmed recently and may be out of date.

Symptom
Unknown usernameMCP reports Site unreachable while the site is upWorks in one folder, fails in another
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', {})))"
Affected
Claude Code, July to September 2026

Last verified 2026-07-31 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun