Repository navigation
Description
Problem
The Exa MCP remote endpoint (https://mcp.exa.ai/mcp) experiences frequent timeouts and 520 Cloudflare errors when used with OpenCode, while the REST API (api.exa.ai) works without issues.
Error Messages
Timeout Error:
Request timeout after 5000ms
520 Cloudflare Error:
520: Web server returns an unknown error
Configuration Attempted
"exa": {
"type": "remote",
"url": "https://mcp.exa.ai/mcp?exaApiKey=...&tools=web_search_exa,deep_search_exa,get_code_context_exa"
}Root Causes
After investigation, there appear to be two separate issues:
1. Timeout Issue (OpenCode-related)
OpenCode v1.1.1 introduced a 5000ms default timeout. The Exa MCP endpoint can take longer than 5 seconds to respond, causing timeout errors.
Fix: Add "timeout": 31000 to the config
2. 520 Cloudflare Error (Exa infrastructure issue)
The 520 error is a Cloudflare error meaning "web server returns an unknown error" - this occurs when Exa's origin server (behind Cloudflare) returns an empty or unexpected response.
Status: Exa team investigated and resolved this issue on January 5, 2026.
Workarounds
Option 1: Add timeout (for timeout issues)
"exa": {
"type": "remote",
"timeout": 31000,
"url": "https://mcp.exa.ai/mcp?exaApiKey=..."
}Option 2: Use local MCP server (recommended for reliability)
"exa": {
"type": "local",
"command": ["npx", "-y", "exa-mcp-server"],
"timeout": 60000,
"environment": {
"EXA_API_KEY": "your-api-key"
}
}The local server uses the REST API (api.exa.ai) directly, which is more stable than the remote MCP endpoint.
Related Issues
- HTTP SSE Endpoint returns 405 Method Not Allowed for standard GET connections (Breaks Generic MCP Clients) exa-labs/exa-mcp-server#86 - HTTP SSE Endpoint issues with remote MCP
- websearch_exa MCP timeout after opencode reinstall code-yeongyu/oh-my-openagent#493 - websearch_exa timeout
Status
- Timeout issue: Resolved with config changes (add timeout parameter)
- 520 Cloudflare errors: Fixed by Exa on January 5, 2026
- Recommended approach: Use local MCP server for best reliability
Activity
kevoconnell commentedon Jan 4, 2026
I can replicate the same issue
cravenceiling commentedon Jan 4, 2026
I might be an opencode "issue". In
v1.1.1was introduced a default timeout of5000ms, so you should try adding thetimeoutproperty to your config like this:chindris-mihai-alexandru commentedon Jan 4, 2026
Update after investigation:
There appear to be two separate issues here:
1. Timeout Issue (OpenCode-related)
OpenCode v1.1.1 introduced a 5000ms default timeout. Adding
"timeout": 31000to the config resolves timeout errors.2. 520 Cloudflare Error (Exa-side)
The
520error is a Cloudflare error meaning "web server returns an unknown error" - this occurs when Exa's origin server (behind Cloudflare) returns an empty or unexpected response. This is an Exa infrastructure issue, not OpenCode.Reference: https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-520/
Workarounds
The local server uses the REST API (api.exa.ai) directly, which is working fine.
Related Issues
i-m-sid commentedon Jan 5, 2026
There is issue with Exa server, nothing to do with OpenCode
connorads commentedon Jan 5, 2026
Can confirm that using the local exa MCP server instead of remote has fixed the issue for now
https://docs.exa.ai/reference/exa-mcp#configuring-claude-desktop
Use local exa server
JakubHojsan commentedon Jan 5, 2026
We are investigating the Cloudflare issue on Exa's side
JakubHojsan commentedon Jan 5, 2026
It looks like the 520 might be resolved. Feel free to tag me in any Exa issue
JakubHojsan commentedon Jan 5, 2026
sones3 commentedon Jan 5, 2026
Resolved indeed!
chindris-mihai-alexandru commentedon Jan 5, 2026
Works again for me too!