Skip to content

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

Closed

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.

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

Activity

  1. kevoconnell commented on Jan 4, 2026

    @kevoconnell

    I can replicate the same issue

  2. cravenceiling commented on Jan 4, 2026

    @cravenceiling
    Contributor

    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"
    }
    
  3. chindris-mihai-alexandru commented on Jan 4, 2026

    @chindris-mihai-alexandru
    Author

    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

  4. i-m-sid commented on Jan 5, 2026

    @i-m-sid
    Contributor

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

  5. connorads commented on Jan 5, 2026

    @connorads
    Contributor

    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"]
        },
  6. added a commit that references this issue on Jan 5, 2026
  7. JakubHojsan commented on Jan 5, 2026

    @JakubHojsan

    We are investigating the Cloudflare issue on Exa's side

  8. JakubHojsan commented on Jan 5, 2026

    @JakubHojsan

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

  9. JakubHojsan commented on Jan 5, 2026

    @JakubHojsan
    Image
  10. sones3 commented on Jan 5, 2026

    @sones3

    Resolved indeed!

  11. chindris-mihai-alexandru commented on Jan 5, 2026

    @chindris-mihai-alexandru
    Author

    Works again for me too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions