Skip to content
Back

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:

  1. Call initialize with protocolVersion: "2024-11-05".
  2. Wait for the response.
  3. Call notifications/initialized.
  4. Then call tools/list.

Authentication errors

"Unauthorized" or 401

  1. OAuth client: run the client's authentication action again. In Claude Code: /mcp → livefolio → Authenticate. In Claude/ChatGPT/Cursor, reconnect the connector.
  2. API key: verify the key exists in Settings → API Key (not revoked/rotated).
  3. Check the header format: Authorization: Bearer lf_live_....
  4. Make sure the key belongs to the workspace you expect.
  5. If you are mid-registration, the lf_preclaim_... token is a polling credential only — it 401s on /api/mcp. Wait for the lf_live_... key.

The OAuth sign-in never opens

  • Confirm the client supports OAuth for remote MCP servers.
  • In Claude Code, check that --transport http was 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_projects first 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_html or updated_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.