Guide · Debugging
MCP server not connecting? A runbook from URL to tool call
MCP server not connecting? Work from the URL to a real tool call: a curl smoke test, MCP Inspector, client logs and the common failures in each client.
Guide
This article was drafted with AI assistance from the sources listed below and edited and published by Teneo Labs. Disclosure: this site is run by Teneo Labs, the company behind Live Web Data API, which this article mentions.
- 1Reach the URLcurl the endpoint with your header. Any HTTP answer proves the route works.
- 2List tools in InspectorIf Inspector works, the server and key are fine; the client config is not.
- 3Read the client's statusclaude mcp list, Cursor's MCP settings, VS Code's server list.
- 4Read the logThe real error is almost always written down somewhere.
- 5Make one cheap callA free status tool first, then one small fetch.
When an MCP server does not work, the client usually tells you very little: a red dot, "failed", or tools that never appear. The fix is to stop guessing and test each layer in order, from the network up to a real tool call. Each step below either passes, and you move on, or tells you exactly which layer is broken. The examples use a remote Streamable HTTP server at https://fetchmcp.net/mcp with a bearer key in LIVE_WEB_DATA_API_KEY.
1. Can you reach the URL?
Start below MCP. Send one request with curl and read the status line:
curl -si -X POST https://fetchmcp.net/mcp \
-H "Authorization: Bearer $LIVE_WEB_DATA_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | head -n 20
Read the result:
- No answer, DNS error or TLS error: a network problem (VPN, proxy, firewall, typo in the host). No client config will fix it.
404: wrong path. Many servers live at/mcp; SSE-era servers often used/sse.401/403: the key is missing, wrong or not allowed. See the authentication guide.- Any JSON-RPC answer, even an error about initialization: the server is reachable and your key works. Move on.
2. Does MCP Inspector see the tools?
MCP Inspector is the MCP project's own test client. Its CLI mode runs one method and prints the result, which takes the client out of the equation:
npx -y @modelcontextprotocol/inspector --cli https://fetchmcp.net/mcp \
--transport http --method tools/list \
--header "Authorization: Bearer $LIVE_WEB_DATA_API_KEY"
You can call a tool the same way with --method tools/call --tool-name get_account_status. Without --cli, Inspector opens a web UI where you can connect, browse tools and run calls by hand.
If Inspector lists the tools, the server and the key are fine. Whatever is still broken lives in the client config. If Inspector fails with the same URL and header, the problem is on the server side or in the key.
3. What does the client say?
Each client has one place that shows the status:
- Claude Code:
claude mcp listchecks every server and prints✓ Connectedor✗ Failed to connect.claude mcp get live-web-datashows the stored entry, including scope, URL and headers. Inside a session,/mcpshows status and tools. - Cursor: the MCP section of Cursor settings shows each server with a status dot and its tools. Toggling a server off and on reloads it.
- VS Code: the MCP servers list and the code lens above each entry in
.vscode/mcp.jsonshow the state, with commands to start, stop and show output. - Claude Desktop: the tools menu in the chat input shows connected servers; errors appear as a banner after start.
4. Read the log
The real error is almost always written down:
- Claude Desktop:
~/Library/Logs/Claude/on macOS,%APPDATA%\Claude\logs\on Windows, with onemcp-server-<name>.logper server. - Claude Code: start it with
claude --debugto print MCP connection details. - VS Code: "Show Output" for the server opens its output channel.
- Cursor: the Output panel has an MCP channel.
Search the log for the server name, then for error, 401, ENOENT or spawn.
Common failures by client
| Symptom | Likely cause | Fix |
|---|---|---|
Claude Code: added, then ✗ Failed to connect | HTTP server added without --transport http, so Claude Code tried to run the URL as a command | Remove and add again with --transport http |
| Claude Code: works in one folder only | Added in local scope in another project | Add with --scope user, or add it in this project |
| Claude Code: project server never loads | .mcp.json server not yet approved | Start Claude Code in the project and approve it |
Cursor: red dot, 401 in log | ${env:VAR} not set in the environment Cursor started from | Launch Cursor from a shell with the variable, or set it system-wide |
| Cursor: server missing | JSON error in mcp.json | Validate the file; check for a trailing comma |
| VS Code: server not found | mcpServers used instead of servers | Rename the top-level key to servers |
Claude Desktop: spawn npx ENOENT | Node.js not installed or not on the app's PATH | Install Node.js, or use the full path to npx |
| Claude Desktop on Windows: header rejected | Space in an args header value | Pass the header through env; see the setup guide |
| Any client: connected, tool calls fail | Tool-level errors, not connection | See the errors guide |
5. Make one cheap call
Once the client shows the server as connected, ask the agent to call the cheapest tool. On Live Web Data API's server that is get_account_status, which returns your plan, credits and rate limit and costs nothing. Then fetch https://example.com with a small cap. If both work, the connection is done; anything after this point is about result size or the pages themselves.
A runbook template for your team
Keep this next to your shared MCP config:
MCP runbook: live-web-data (fetch)
URL: https://fetchmcp.net/mcp Transport: Streamable HTTP
Key: env LIVE_WEB_DATA_API_KEY (never in the repo)
1. curl tools/list with the header -> expect JSON-RPC answer
2. inspector --cli tools/list -> expect get_page_contents
3. claude mcp list -> expect Connected
4. logs: ~/Library/Logs/Claude, claude --debug, VS Code output
5. call get_account_status, then fetch example.com
Owner: platform team. Last checked: YYYY-MM-DD
Update the "last checked" date whenever you re-run it after a client update. Live Web Data API's current client configs, which this runbook assumes, are in the MCP docs.
Frequently asked questions
Why does claude mcp list say failed to connect?
Claude Code saved the server but could not complete the MCP handshake. The usual causes are a wrong URL or path, an HTTP server added without --transport http, a missing or unexpanded key, or no network route to the server.
Where are Claude Desktop's MCP logs?
On macOS in ~/Library/Logs/Claude, with one mcp-server-<name>.log per server. On Windows in %APPDATA%\Claude\logs. Each log shows the command that was started and any error it printed.
How do I test an MCP server without a client?
Use MCP Inspector. Its CLI mode can list tools or call one from the terminal, with the same URL, transport and header your client uses, so you can tell a server problem from a client config problem.
Sources
- MCP Inspector README (Documentation)
- Debugging (Model Context Protocol docs) (Documentation)
- Connect Claude Code to tools via MCP (Claude Code docs) (Documentation)
- Model Context Protocol (Cursor docs) (Documentation)