Why is my MCP server disconnected?

claude mcp get <name>

Shows the HTTP status or error code behind the failure.

Answer

Start with claude mcp get <name> — it shows the HTTP status or error text behind the failure. For an HTTP server, curl -I <url> tells you the rest: a 404 or 405 means the server is up, a 401 or 403 means you need to authenticate, no response means the URL or your network. For a stdio server, run its command directly to see the real error.

What it does

Two statuses mean the server did not answer, and they start you in different places.

✘ Failed to connect carries a failure detail. claude mcp list and claude mcp get <name> show the HTTP status or error code and any text the server returned, which often names the problem outright — a missing header, a rejected token. Before v2.1.219 this status showed nothing but itself — check yours with claude --version if the detail is missing.

✘ Connection error appends no detail on any version. Go straight to the manual checks.

Both can also appear for an HTTP server that rejects the token in headers.Authorization. A server that wants a token you never configured shows ! Needs authentication instead.

For an HTTP server, check reachability yourself:

curl -I https://mcp.sentry.dev/mcp

In PowerShell write curl.exe — plain curl is an alias for Invoke-WebRequest, which has no -I.

The response classifies the problem:

  • 404 or 405 — the server is up. Many MCP endpoints answer only POST, so

this still confirms the URL is reachable.

  • 401 or 403 — the server is up and wants authentication.
  • no response — check the URL and your network.

For a stdio server, run the configured command directly:

npx -y @playwright/mcp@latest

If it starts and waits for input, the server works — compare what claude mcp get <name> stored against what you just typed. If it errors, the message names what is missing.

When to use it

Work in that order. The detail on the status is free and often sufficient; the curl check costs one command and eliminates half the possibilities.

Also read the warnings in claude mcp list. Claude Code flags config values with hidden leading or trailing whitespace — a common cause of authentication failures right after pasting a token.

Example

A 404 from an HTTP server has its own message in /mcp:

MCP endpoint not found at https://mcp.example.com. Check the URL in your MCP config.

The message names the origin without the path, so check the full URL:

claude mcp get <name>

Then fix it by re-adding:

claude mcp remove <name>
claude mcp add --transport http <name> <correct-url>

A slow first start is not a failure. The default startup timeout is 30 seconds, and a stdio server's first run can exceed it while npx downloads:

MCP_TIMEOUT=60000 claude

If .mcp.json edits seem to do nothing, restart the session — the file is read at startup. If servers still do not appear, run /mcp and look for a parse warning: malformed entries are skipped and the offending field is named. If you declined the approval prompt earlier:

claude mcp reset-project-choices

Common mistakes

Treating the first Failed to connect as final. For a newly added stdio server, wait for the package download and check again.

Skipping claude mcp get. It is where the HTTP status and error text live. The list view only shows the symptom.

Reading a 404 from curl as broken. It means reachable. MCP endpoints commonly reject HEAD and GET.

Forgetting whitespace in a pasted token. It survives the paste, breaks the auth, and looks like a server problem.