MCP Troubleshooting
Common MCP errors and how to fix them — connection issues, auth failures, and tool-specific problems.
Connection Issues
"Connection refused" or "SSE connection failed"
Check:
- Your instance URL is correct
- The MCP endpoint is
/api/mcp(include the full path) - Your network can reach the instance (try
curl https://livefolio.cloud/api/mcp)
Agent shows no tools available
The MCP handshake didn't complete. Most clients handle this automatically. If using a custom client:
- Call
initializewithprotocolVersion: "2024-11-05" - Wait for response
- Call
notifications/initialized - Then call
tools/list
Authentication Errors
"Unauthorized" or 401
- Verify the API key is valid (not expired or revoked) — check Settings → API Keys
- Check the
Authorizationheader format:Bearer lf_agent_... - If using query parameter:
?key=lf_agent_... - Key belongs to the correct workspace
Key was working but stopped
Someone may have revoked it. Generate a new key from Settings → API Keys.
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 curl
# Initialize
curl -X POST https://livefolio.cloud/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer lf_agent_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_agent_xxxxxxxxxxxx" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":2}'
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.