MCP Troubleshooting
Common MCP errors and how to fix them — connection issues, OAuth/API-key failures, and tool-specific problems.
Connection issues
"Connection refused" or "Streamable HTTP connection failed"
Check:
- The MCP endpoint is
/api/mcp(include the full path). - Your client uses the Streamable HTTP transport. In modern clients:
"type": "http". - Your network can reach the instance:
curl https://livefolio.cloud/api/mcp.
Claude Code treated the URL as a command
claude mcp add defaults to stdio when no transport is specified. Always use:
claude mcp add --transport http livefolio https://livefolio.cloud/api/mcp
If you already added it without the flag, remove the entry and add it again.
Agent shows no tools available
The MCP handshake did not complete. Most clients handle it automatically. If using a custom client:
- Call
initializewithprotocolVersion: "2024-11-05". - Wait for the response.
- Call
notifications/initialized. - Then call
tools/list.
Authentication errors
"Unauthorized" or 401
- OAuth client: run the client's authentication action again. In Claude Code:
/mcp → livefolio → Authenticate. In Claude/ChatGPT/Cursor, reconnect the connector. - API key: verify the key exists in Settings → API Key (not revoked/rotated).
- Check the header format:
Authorization: Bearer lf_live_.... - Make sure the key belongs to the workspace you expect.
- If you are mid-registration, the
lf_preclaim_...token is a polling credential only — it 401s on/api/mcp. Wait for thelf_live_...key.
The OAuth sign-in never opens
- Confirm the client supports OAuth for remote MCP servers.
- In Claude Code, check that
--transport httpwas used. - A client that cannot do OAuth can use a workspace API key instead (Settings → API Key).
Key was working but stopped
The key was rotated or revoked. Generate a new key from Settings → API Key and update the client.
Tool errors
"Project not found"
- Call
list_projectsfirst to get valid project IDs. - IDs are case-sensitive.
- Verify the project belongs to your workspace.
"Argument is required"
Check the Tools Reference for required parameters.
"Error executing tool"
Check the server logs for details. Common causes:
- Invalid HTML in
initial_htmlorupdated_files. - File size exceeding limits.
- Database write failure.
Debugging
Test with an API key
Use a key only for debugging/automation — OAuth clients do not need one.
# Initialize
curl -X POST https://livefolio.cloud/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer lf_live_xxxxxxxxxxxx" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05"},"id":1}'
# List tools
curl -X POST https://livefolio.cloud/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer lf_live_xxxxxxxxxxxx" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":2}'
Confirm OAuth discovery
curl https://livefolio.cloud/.well-known/oauth-protected-resource
curl https://livefolio.cloud/.well-known/oauth-authorization-server
The first returns the resource (/api/mcp) and authorization_servers; the second returns the authorize/token/register endpoints.
Inspect project state
If a tool returns unexpected results, call get_project to inspect the full project state — all files, versions, and comments.
Self-hosted troubleshooting
For tunnel issues, database problems, and OSS-specific MCP errors, see Self-Hosting.