fixmcp
fixmcp
Stop guessing which MCP server is broken. Ask the doctor.
npx fixmcpOne command. Finds every MCP config on your machine — Claude Code, Claude Desktop, opencode, Cursor, VS Code, Codex CLI — handshakes every server for real, and tells you exactly what's broken and how to fix it.
Windows · macOS · Linux — zero install — nothing leaves your machine.
Why do my MCP servers fail with -32001: Request timed out?
MCP error -32001: Request timed outNo server name. No cause. Your tools silently missing, or the whole agent hung at startup.
fixmcp was born from exactly this: four servers failing on every boot because their configs
used npx -y <pkg>@latest — an npm registry round-trip at every single launch, dead on slow
networks. Diagnosing took an afternoon. Fixing took minutes. This tool collapses that
afternoon into one command.
Related MCP server: subcodex-mcp
How it works
flowchart LR
A[npx fixmcp] --> B[Discover configs<br/>6 agents, 3 OSes]
B --> C[Static checks<br/>PATH · env · footguns · duplicates]
C --> D[Real stdio handshake<br/>initialize + tools/list]
D --> E{Verdict per server}
E -- healthy --> F[✓ latency + tool count]
E -- broken --> G[✗ exact cause<br/>+ stderr tail]
G --> H[--fix<br/>safe rewrite, .bak backup]Most tools lint your config. fixmcp spawns every stdio server and runs the same JSON-RPC conversation your agent runs at startup. What it reports matches what actually happens — including per-server latency and discovered tool counts.
What it checks
Check | stdio | http/sse | Catches |
command-resolution | ✓ | Commands not on PATH, missing node scripts, unpinned | |
handshake | ✓ | Servers that spawn but never answer | |
network | ✓ | Unreachable endpoints (DNS, refused, timeout) with the OS error code | |
env-check | ✓ | ✓ |
|
patterns | ✓ | ✓ |
|
duplicates | ✓ | ✓ | The same server name defined across multiple agents |
Which agents does fixmcp support?
Agent | Config file | Auto-fix |
Claude Code |
| ✓ |
Claude Desktop |
| ✓ |
Cursor |
| ✓ |
VS Code |
| ✓ |
opencode |
| report-only* |
Codex CLI |
| report-only* |
* Comment-bearing formats (JSONC/TOML) would lose their comments in a naive rewrite, so fixmcp prints exact manual instructions instead of mangling them.
Windows is first-class: .cmd/.bat commands route through cmd.exe (Node ≥ 20 refuses to
spawn them directly), PATH lookup honors PATHEXT, and child trees are cleaned via taskkill /T.
How fixmcp compares
Capability |
| Official MCP Inspector | Static Config Linters |
Auto-discovers all 6 agent configs ( | ✓ | Manual per server | Partial |
Real stdio JSON-RPC | ✓ | Interactive UI | ✗ |
Detects & auto-fixes | ✓ | ✗ | Partial |
Machine-readable | ✓ | ✗ | Varies |
Runs offline against local configs with zero account or browser required | ✓ | Browser UI | ✓ |
How do I fix a broken MCP server config? (--fix)
The footgun this tool exists for:
"context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"] }@latest = npm hits the registry on every agent startup. Slow boot network → 90s timeout
→ -32001. npx fixmcp --fix rewrites it to the already-installed script:
"context7": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": ["C:\\Users\\you\\AppData\\Roaming\\npm\\node_modules\\@upstash\\context7-mcp\\dist\\index.js"]
}Zero network at startup. Millisecond launches. Safety rails:
<file>.fixmcp.bakbackup written before any changeOnly plain-JSON agents are rewritten; never downloads anything; skips packages not installed
Re-run
fixmcpafterwards to verify
Trade-off: updating a server afterwards means npm i -g <pkg> — one deliberate update beats
gambling on the registry every boot.
Built for humans and agents (Dual-Mode: MCP Server + CLI Doctor)
fixmcp runs both as a stdio MCP server (so your AI agent can self-diagnose and repair its own MCP environment via MCP tools, resources, and prompts) and as a zero-install CLI doctor.
1. Run as an MCP Server (fixmcp serve)
Add fixmcp to your claude_desktop_config.json, ~/.cursor/mcp.json, or ~/.claude.json:
{
"mcpServers": {
"fixmcp": {
"command": "npx",
"args": ["-y", "fixmcp", "serve"]
}
}
}Exposed MCP Tools (tools/list)
Tool | Description |
| Discover and scan all local agent MCP config files ( |
| Spawn any target stdio MCP server command (or probe an HTTP/SSE endpoint) and perform a real |
| Compute or apply safe rewrites for fragile |
| Return all supported AI coding agents and their expected MCP config file paths on the current OS. |
Exposed MCP Resources & Prompts
Resource (
fixmcp://agents/supported): JSON specification of all supported agent configuration targets and formats.Prompt (
troubleshoot-mcp-timeout): Guided diagnostic workflow for resolvingMCP error -32001: Request timed out.
2. Run as a CLI Doctor (npx fixmcp)
Exit codes (0 healthy · 1 errors · 2 internal) + --json mode mean your coding agent
can also drive it from the terminal. Add this to your project's AGENTS.md:
When the user reports MCP server errors or timeouts, run:
npx fixmcp --json
Read findings[].message/detail for exact causes. Apply config fixes with:
npx fixmcp --fix
Then re-run without flags to verify.FAQ
It's the generic MCP error your agent shows when a server doesn't answer the initialize handshake in time. It never names the server or the cause — common reasons include npx pkg@latest configs forcing a registry round-trip at startup, commands not on PATH, missing env vars, or servers that crash on launch. npx fixmcp tells you which server and exactly why.
No. Everything runs locally. Nothing is uploaded, ever.
It only writes files with --fix, always after a .bak backup, and only plain-JSON configs. Without --fix it is strictly read-only.
Possibly, and that's useful: if a server exits due to missing credentials, fixmcp shows its stderr tail as the failure detail so you see the real cause instead of a bare timeout.
A few seconds per stdio server (that's a real process launch + handshake). Tune with --timeout <ms>, or use --no-handshake for instant static-only checks.
Development
git clone https://github.com/Ayoola-tech2024/fixmcp
cd fixmcp && npm install
npm test # build + full suite, including real stdio handshake tests
node bin/fixmcp.js --helpNode ≥ 20 · TypeScript strict · runtime deps: jsonc-parser + smol-toml, nothing else.
Tested on Ubuntu, Windows and macOS across Node 20 and 22.
Contributions welcome — open an issue before large changes. Especially wanted: more agent config formats, more real-world footgun patterns, macOS/Linux path testing.
License
If fixmcp saved you a debugging session, leave a star — it helps the next person find it.
npx fixmcp
Available Tools
4 toolsdiagnose_mcp_configsA
Discover and diagnose MCP server configurations across Claude Code, Claude Desktop, Cursor, VS Code, opencode, and Codex CLI. Performs static checks (command resolution, env vars, footgun patterns, duplicates) and optional live JSON-RPC stdio handshakes.
Inputs: homeDir, timeoutMs, skipHandshake.
list_agent_config_pathsA
List all supported AI coding agents (Claude Code, Claude Desktop, Cursor, VS Code, opencode, Codex CLI) and their expected MCP configuration file paths on the current operating system.
Inputs: homeDir.
repair_mcp_configsB
Detect and optionally rewrite fragile 'npx -y @latest' MCP server configs to direct local node script paths (with automatic .fixmcp.bak backups) to eliminate -32001 startup timeouts.
Inputs: dryRun, homeDir.
test_mcp_serverA
Spawn a target stdio MCP server command (or probe an HTTP/SSE MCP endpoint) and perform a real JSON-RPC initialize + tools/list handshake, returning latency, discovered tool count, and any command/stderr errors.
Inputs: env, url, args, name, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
diagnose_mcp_configs and test_mcp_server overlap somewhat because diagnose optionally performs live JSON-RPC handshakes that test_mcp_server also does. The descriptions distinguish them as broad static+optional-live diagnosis versus a focused live handshake probe, so an agent can mostly tell them apart, but the boundary is not perfectly crisp.
All four tools follow a clear snake_case verb_noun pattern: diagnose_mcp_configs, test_mcp_server, repair_mcp_configs, list_agent_config_paths. The naming is predictable and consistent across the set.
Four tools is a well-scoped surface for a focused MCP configuration diagnostic and repair server. Each tool maps to a distinct part of the workflow: enumerate paths, diagnose, live-test, and repair.
The set covers discovery of config paths, diagnosis, live server testing, and a targeted repair operation, which is solid lifecycle coverage for the stated purpose. Minor gaps remain, such as no general config editing/creation tool or raw config read tool beyond what diagnose reports, but agents can work around these.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Claude Code, Cursor, Codex, MCP docs. Needs X-Cohere-Api-Key header, free at dashboard.cohere.com
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Related MCP Servers
- AlicenseAqualityDmaintenanceDiagnose, secure, and benchmark your MCP servers. Zero-config CLI for Claude Code, Cursor, VS Code, and Windsurf.44MIT
- AlicenseBqualityDmaintenanceMCP server that enables Claude Code to delegate code generation and debugging to OpenAI Codex, with stall detection and auto-recovery.2MIT
- AlicenseCqualityBmaintenanceMCP server to connect Claude Code, Codex, or Cursor to the Lightbulb Partners Agents platform, enabling domain agents, code workspaces, connectors, and more.500Apache 2.0
- AlicenseAqualityFmaintenanceMCP server for running external coding agents as background tasks inside Claude Code. Supports multiple backends including Codex, Grok, GLM, DeepSeek, and more.7MIT