Claude Code · tool · fg-0008

Fixing MCP credentials in ~/.claude.json has no effect until a restart, and edits can be lost

The MCP keeps using the old credentials after the file is fixed

Verified 2026-08-03 · Confirmed by 0 builders · Trust 50/100

Cause

MCP servers read their env when they start, so a running session keeps the old values. Editing ~/.claude.json while Claude Code is running can be overwritten when it exits.

Fix

Edit the file with Claude Code closed, or restart afterwards and confirm the change survived.

Apply

Quit Claude Code, edit ~/.claude.json, start a new session, then check the value again.

Affects: Claude Code, August 2026

Have your agent know this before it fails

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