MCP server not connecting: the checks that fix most clients, then each client's own fixes
By Jake Marsh, who builds Taskhold. Updated 2026-11-10. Facts about other tools checked 2026-11-10. 4 min read.
Short answer: Test the server with curl first: a JSON result means it's up, a 401 means it wants a sign-in or a key. Then check the causes every client shares: the exact final URL, the transport type, a header blocking OAuth, an unexpanded variable, broken JSON and a missing restart. Each client below has its own guide.
An MCP server that won't connect fails the same handful of ways whichever agent you use, and then in a few ways that belong to one client. This page covers the shared checks and a test you can run without any client, then links each client's own guide. The last section covers Taskhold, whose live board shows every connected agent's tasks and steps.
Test the server without a client
A remote MCP server answers a plain POST. If this fails, no client setting will fix it:
curl -si https://example.com/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'- 200 with a result naming the server: it's reachable, so the problem is in the client config.
- 401: the server wants a sign-in or a key. The WWW-Authenticate header says which, and a server with OAuth points to its metadata there.
- A redirect (301, 302, 307, 308): use the address it redirects to. Clients drop the Authorization header when a redirect goes to another host.
- 405 or 404: wrong path, or a client set to the legacy SSE transport talking to a Streamable HTTP server.
For a local server, run its command and args in a terminal instead. If it fails there, it fails in the client, and the terminal shows why.
The checks that fix most clients
- The JSON file parses. In Cline one broken entry stops every server; elsewhere a trailing comma or a missing brace drops the file. Run it through a JSON validator.
- The entry is under the key that client reads: mcpServers in most, context_servers in Zed, [mcp_servers.<name>] tables in Codex's config.toml, servers in VS Code's mcp.json.
- The transport is right. Some clients read a url with no type as legacy SSE; set the type the client documents for Streamable HTTP.
- OAuth isn't blocked by a header. Several clients skip their sign-in prompt whenever an Authorization header is present, so a stale key fails quietly instead of asking you to sign in.
- Variables expanded. ${VAR} that a client doesn't expand reaches the server as literal text and comes back as a bad token. Some clients only expand an approved list, and all of them only see variables set before the app started.
- The client reloaded. Claude Desktop needs a full quit; Kiro applies saved changes between turns; most editors need the server restarted from their MCP panel or a reload.
- Local servers use absolute paths and log to stderr only. A client may start them with / as the working directory and a small set of environment variables, and anything printed to stdout corrupts the protocol.
Fixes by client
- Claude Code: claude mcp list, scopes, /mcp, MCP_TIMEOUT.
- Claude Desktop, local servers: claude_desktop_config.json, the full quit, mcp logs.
- claude.ai and Claude Desktop custom connectors: reachability from Anthropic's cloud, redirects, plans.
- Cursor: mcp.json locations, MCP Logs output, the tool toggle.
- Codex CLI: config.toml tables, trust, "Waiting for startup".
- Windsurf
- Gemini CLI
- VS Code with Copilot
- Cline: the shared settings file, type streamableHttp.
- Zed: context_servers, the status dot, profiles.
- Kiro: which mcp.json wins, approved env vars, the issuer check.
- Warp: where Warp finds servers, auto-spawn, View Logs.
- Goose: config.yaml, package runners, sessions, OAuth clients.
- Junie: mcp.json locations, the /mcp statuses, Authorize, millisecond timeouts.
- OpenCode
- Antigravity CLI
Taskhold
Taskhold's server is https://taskhold.com/api/mcp. Clients with OAuth add the URL with no header and sign in, with no sign-up first: the first time the agent uses Taskhold it gives you the link to start the 7-day trial. Its 401 names the cause (missing_key, bad_header, not_a_taskhold_key or unknown_key), and Taskhold troubleshooting covers the rest. Once connected, every agent's tasks, steps and questions show on the live board.
Answer your coding agents from anywhere.
$12/month or $120/year after the trial. Card up front. Cancel before day 7 and you pay nothing. Every agent you run is included.
Or connect your agent first, no sign-up: add https://taskhold.com/api/mcp as an MCP server. The first time it uses Taskhold, it gives you the trial link.
Questions
- Why does my MCP server work with curl but not in my editor?
- The server is fine, so look at the client entry: the key it's under, the transport type, the exact URL, and whether a header or an unexpanded variable is stopping the sign-in. Then reload the client.
- Why do I get 401 from a remote MCP server?
- The server wants a sign-in or a key. Remove any Authorization header to let a client with OAuth sign in, or send a valid key as Authorization: Bearer <key>.
- Do MCP config changes need a restart?
- Usually. Claude Desktop needs a full quit, Kiro applies changes between turns, and most editors need the server restarted from their MCP panel.
Sources
- MCP specification: Streamable HTTP transport, checked 2026-11-10
- MCP specification: authorization, checked 2026-11-10
- MCP docs: Debugging, checked 2026-11-10
Related
Updated 2026-11-10. Something wrong or out of date? Email hello@greatwork.company.