Exa MCP endpoint (mcp.exa.ai) timing out while REST API works #4190

Closed
opened 2026-02-16 17:42:58 -05:00 by yindo · 11 comments
Owner

Originally created by @chindris-mihai-alexandru on GitHub (Jan 4, 2026).

Originally assigned to: @thdxr on GitHub.

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.

Reference: https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-520/

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

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
Originally created by @chindris-mihai-alexandru on GitHub (Jan 4, 2026). Originally assigned to: @thdxr on GitHub. ## 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 ```json "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](https://github.com/anomalyco/opencode/commit/586e7347bd48cc58b9e1cdc9dd63a71d5e9adb08). 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. **Reference:** https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-520/ **Status:** Exa team investigated and resolved this issue on January 5, 2026. ## Workarounds ### Option 1: Add timeout (for timeout issues) ```json "exa": { "type": "remote", "timeout": 31000, "url": "https://mcp.exa.ai/mcp?exaApiKey=..." } ``` ### Option 2: Use local MCP server (recommended for reliability) ```json "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 - exa-labs/exa-mcp-server#86 - HTTP SSE Endpoint issues with remote MCP - code-yeongyu/oh-my-opencode#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
yindo added the docs label 2026-02-16 17:42:58 -05:00
yindo closed this issue 2026-02-16 17:42:58 -05:00
Author
Owner

@kevoconnell commented on GitHub (Jan 4, 2026):

I can replicate the same issue

@kevoconnell commented on GitHub (Jan 4, 2026): I can replicate the same issue
Author
Owner

@cravenceiling commented on GitHub (Jan 4, 2026):

I might be an opencode "issue". In v1.1.1 was introduced a default timeout of 5000 ms, so you should try adding the timeout property to your config like this:

"exa": {
  "type": "remote",
  "timeout": 31000,
  "url": "https://mcp.exa.ai/mcp?exaApiKey=...&tools=web_search_exa,deep_search_exa,get_code_context_exa"
}

@cravenceiling commented on GitHub (Jan 4, 2026): I might be an opencode "issue". In `v1.1.1` was introduced a [default timeout](https://github.com/anomalyco/opencode/commit/586e7347bd48cc58b9e1cdc9dd63a71d5e9adb08) of `5000` ms, so you should try adding the `timeout` property to your config like this: ```bash "exa": { "type": "remote", "timeout": 31000, "url": "https://mcp.exa.ai/mcp?exaApiKey=...&tools=web_search_exa,deep_search_exa,get_code_context_exa" } ```
Author
Owner

@chindris-mihai-alexandru commented on GitHub (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": 31000 to the config resolves timeout errors.

2. 520 Cloudflare Error (Exa-side)

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. This is an Exa infrastructure issue, not OpenCode.

Reference: https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-520/

Workarounds

  1. Add timeout (for timeout issues):
"exa": {
  "type": "remote",
  "timeout": 31000,
  "url": "https://mcp.exa.ai/mcp?exaApiKey=..."
}
  1. Use local MCP server (for 520 errors):
"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 working fine.

Related Issues

@chindris-mihai-alexandru commented on GitHub (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": 31000` to the config resolves timeout errors. ### 2. 520 Cloudflare Error (Exa-side) 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. This is an **Exa infrastructure issue**, not OpenCode. Reference: https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-520/ ### Workarounds 1. **Add timeout** (for timeout issues): ```json "exa": { "type": "remote", "timeout": 31000, "url": "https://mcp.exa.ai/mcp?exaApiKey=..." } ``` 2. **Use local MCP server** (for 520 errors): ```json "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 working fine. ### Related Issues - exa-labs/exa-mcp-server#86 - HTTP SSE Endpoint issues with remote MCP - code-yeongyu/oh-my-opencode#493 - websearch_exa timeout
Author
Owner

@miguelmanlyx commented on GitHub (Jan 5, 2026):

@chindris-mihai-alexandru

Timeouts getting surfaced as rate limits can make post-incident analysis harder, since the remediation paths are very different.

This usually only becomes obvious if there’s a request-level execution record that distinguishes timeout vs provider rejection; I’ve seen that discussed around gateways like AI Badgr.

@miguelmanlyx commented on GitHub (Jan 5, 2026): @chindris-mihai-alexandru Timeouts getting surfaced as rate limits can make post-incident analysis harder, since the remediation paths are very different. This usually only becomes obvious if there’s a request-level execution record that distinguishes timeout vs provider rejection; I’ve seen that discussed around gateways like AI Badgr.
Author
Owner

@i-m-sid commented on GitHub (Jan 5, 2026):

There is issue with Exa server, nothing to do with OpenCode

@i-m-sid commented on GitHub (Jan 5, 2026): There is issue with Exa server, nothing to do with OpenCode
Author
Owner

@connorads commented on GitHub (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

    "exa": {
      "type": "local",
      "command": ["npx", "-y", "exa-mcp-server"]
    },
@connorads commented on GitHub (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 ```json "exa": { "type": "local", "command": ["npx", "-y", "exa-mcp-server"] }, ```
Author
Owner

@JakubHojsan commented on GitHub (Jan 5, 2026):

We are investigating the Cloudflare issue on Exa's side

@JakubHojsan commented on GitHub (Jan 5, 2026): We are investigating the Cloudflare issue on Exa's side
Author
Owner

@JakubHojsan commented on GitHub (Jan 5, 2026):

It looks like the 520 might be resolved. Feel free to tag me in any Exa issue

@JakubHojsan commented on GitHub (Jan 5, 2026): It looks like the 520 might be resolved. Feel free to tag me in any Exa issue
Author
Owner

@JakubHojsan commented on GitHub (Jan 5, 2026):

Image
@JakubHojsan commented on GitHub (Jan 5, 2026): <img width="2270" height="647" alt="Image" src="https://github.com/user-attachments/assets/88663adc-59dd-41d7-b884-08eb13e829c3" />
Author
Owner

@sones3 commented on GitHub (Jan 5, 2026):

Resolved indeed!

@sones3 commented on GitHub (Jan 5, 2026): Resolved indeed!
Author
Owner

@chindris-mihai-alexandru commented on GitHub (Jan 5, 2026):

Works again for me too!

@chindris-mihai-alexandru commented on GitHub (Jan 5, 2026): Works again for me too!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4190