Interactive Diagnostic Utility

MCP Config JSON Validator & Windows Path Fixer

Repair unescaped Windows backslashes, bare npx process spawn errors, and calculate agentic token overhead.

Input Config (mcp_config.json)
Validated & Auto-Fixed ConfigReady
// Clean JSON will appear here...

Active MCP Servers

0
Parsed server blocks

Est. Eager Token Bloat

0 t/turn
Injected into LLM context

Lazy Loading Savings

$0.00/mo
At 100 turns/day (Sonnet)

Understanding MCP Server Crashes in Antigravity & Claude Desktop

The Model Context Protocol (MCP) connects LLMs to local developer tools, databases, and filesystem sandboxes. However, configuration files such as mcp_config.json in Antigravity IDE and claude_desktop_config.json on Windows 11 are notorious for triggering silent connection drops and exit code crashes.

Because JSON syntax standards (RFC 8259) reserve the backslash character (\) as an escape delimiter, pasting native Windows paths like C:\Users\Developer\AppData\Roaming\npm\npx creates invalid unicode escape sequences. The JSON parser immediately throws a syntax error, causing the host agentic IDE to abort server initialization before any tools can register.

Why "spawn npx ENOENT" Crashes on Windows 11

The single most common error encountered on Windows 11 is Error: spawn npx ENOENT. In Unix environments (macOS and Linux), npx is an executable shell script located directly in /usr/local/bin or $HOME/.nvm/. Node's child_process.spawn() can invoke it without an underlying shell wrapper.

On Windows, however, npx is actually a batch script named npx.cmd located in C:\Program Files\nodejs\. When an agentic IDE attempts to call npx directly with shell: false, Windows returns ENOENT (Error No Entry) because the raw executable npx.exe does not exist.

The Verified Windows 11 "cmd /c" Fix

To execute an NPM-hosted MCP server reliably across every Windows machine without requiring global environment overrides, rewrite your server command to invoke cmd.exe with the /c termination argument:

{
  "mcpServers": {
    "filesystem": {
      "command": "cmd",
      "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:\\Users\\Developer\\Documents"
      ]
    }
  }
}

The Hidden Cost of MCP Tool Schema Token Bloat

Every tool declared by an MCP server exposes a JSON schema defining its parameters, data types, and documentation strings. In standard "eager" mode, the host IDE injects the entire JSON schema of every active tool into the LLM system prompt on every single conversational turn.

A typical GitHub or database MCP server exposes 10 to 18 tools, totaling 1,200 to 2,400 input tokens. If you enable 6 active MCP servers simultaneously, your agent starts each step with 10,000+ tokens of schema overhead. In a 20-step multi-turn debugging session, you consume 200,000 input tokens before factoring in code context or file diffs.

By utilizing lazy-loaded tools (supported natively in Antigravity via lazy declarations), tool definitions remain in a local index until the agent specifically invokes a search or discovery command. This reduces initial turn overhead by up to 88%, saving hundreds of dollars monthly on Anthropic Claude 3.5 Sonnet and OpenAI API bills.