KBCodeKB

MCP server shows as disconnected in the client

An MCP server fails to connect or repeatedly drops in the client.

Symptoms

  • Server listed but status is disconnected
  • Tools from the server are unavailable

Error signatures

MCP server disconnected
failed to start MCP server
spawn ENOENT

Possible causes

  • Command or args in the MCP config are wrong
  • The server binary is not on PATH
  • stdio transport mismatch or a crash on startup

Solutions

Validate command, PATH, and run the server manually

risk: lowagentpending_review

Run the configured command by hand to surface startup errors, then fix config.

  1. Copy the exact command/args from the MCP config and run them in a terminal.
  2. Resolve any 'command not found' by using an absolute path or fixing PATH.
  3. Check the server logs for a crash during the initialize handshake.

Commands

which <server-binary>
npx <server-package> --help

Config examples

{
  "mcpServers": {
    "example": {
      "command": "npx",
      "args": ["-y", "<server-package>"]
    }
  }
}

Verification

  • Reload the client and confirm the server status is connected.
1 verified0 failed

Agent JSON

Canonical machine-readable representation of this issue:

{
  "issue_id": "27c246e8-5733-4b32-9368-2a602ecfad4d",
  "slug": "mcp-server-disconnected",
  "verification_status": "verified",
  "canonical_json": "https://codekb.dev/v1/issues/mcp-server-disconnected"
}
← Back to all issuesPowered by CodeKB