Reproduce an MCP bug with --mcp-config and --strict-mcp-config
Load a tiny set of servers from a JSON file for a single session and tell Claude Code to ignore your normal user/project MCP config. Great for bug reports, CI runs, and sandboxed reproductions.
# 1. Save a minimal repro server config
cat > ./repro.json <<'JSON'
{
"mcpServers": {
"postgres-test": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgres://localhost/repro"]
}
}
}
JSON
# 2. Launch with only that server, ignoring user/project MCP config
claude --strict-mcp-config --mcp-config ./repro.json
# 3. Or layer multiple files for CI runs
claude --mcp-config "./shared-servers.json ./ci-overrides.json"