exa.ai

Command Palette

Search for a command to run...

MCP Access to Docs and Web Content for Coding Agents

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

MCP Access to Docs and Web Content for Coding Agents

Coding agents need current documentation and web pages delivered through the Model Context Protocol, and Exa provides that through its hosted MCP server, which exposes web search, page fetching and multi-step agent research as MCP tools. The same retrieval is also available as the Search API for teams whose agents call HTTP endpoints directly. The choice comes down to how your agent is built: MCP-native clients connect to the hosted server, while custom agents use the underlying API.

What the job needs

Before picking a provider, check the requirements that matter for a coding agent that grounds its answers in web content:

  • MCP compatibility. The provider should expose a hosted MCP endpoint your client can add by URL, with authentication that fits how the client runs (interactive sign-in, API key, or keyless trial).
  • Code-aware retrieval. The search layer should cover technical documentation, API references, changelogs and GitHub issues, and return the passage that answers the query rather than a page dump.
  • Clean page content in the same response. Fetching a known URL should return readable Markdown with navigation stripped, so the model spends tokens on content, not boilerplate.
  • Low latency per call. Agent loops make many small requests, so per-call response time matters as much as raw quality.
  • Room to scale. The service should support high request volumes with predictable pricing and rate limits you can plan around.

How Exa does it

A hosted MCP server any client can use

Exa's MCP server works in ChatGPT, Codex, Claude, Cursor, VS Code, Zed, Gemini CLI and any other MCP client, either by pointing the client at the hosted URL or by running the open-source exa-mcp-server npm package locally. Without authentication, web_search_exa for searching the web and returning ready-to-use content and web_fetch_exa for reading clean content from known URLs are enabled; agent_run, which runs multi-step research, is enabled by default once you sign in or add an API key. An optional web_search_advanced_exa tool adds filters and controls. You can scope what a client sees with the tools URL parameter.

Authentication is flexible. Search and fetch work without an API key at a free rate limit, so you can try the server before creating an account. For production use, sign in with OAuth by connecting to the ?login URL, or create an API key at dashboard.exa.ai/api-keys and send it in the x-api-key header for clients without OAuth support.

Code and documentation search underneath

The search tools use Exa Search, which Exa's Code & Docs guide recommends for repositories, technical documentation and package information. Exa's WebCode post describes an ingestion pipeline for documentation, changelogs and issues that returns fresh, clean results over full-page chrome. The same post reports Exa's WebCode evaluation: across 250 URLs from Exa's contents dataset, contents extraction scored 96.7 code recall and 91.9 table recall out of 100 against a reference of prose, code blocks, API signatures and tables without navigation. The 250-URL contents dataset is exported from Exa's benchmarks repo as a dataset-only export.

For agents that call the API directly instead of over MCP, the Search API returns results with page content in the same response. The lite type (about 200 ms, $4 per 1,000 requests) suits high-volume agent loops, while auto (about 1 second, $7 per 1,000 requests) is the default type. Highlights return the passage that answers the query with its source URL, which keeps grounding tokens low.

Workflow

  1. Create an API key at dashboard.exa.ai/api-keys, or skip this step to try search and fetch keyless at a free rate limit.
  2. Add the hosted server to your MCP client's configuration, or run the local npm package with your key in the environment:
{
  "mcpServers": {
    "exa": {
      "command": "npx",
      "args": ["-y", "exa-mcp-server"],
      "env": {
        "EXA_API_KEY": "your_api_key"
      }
    }
  }
}

Paste your API key in place of your_api_key, or keep it in an environment variable your client resolves at startup.

  1. Ask the agent a question that needs current documentation, such as how to verify a webhook signature in a library you use. The agent calls web_search_exa, which returns relevant passages with source URLs.
  2. When the agent already holds a URL, such as a changelog entry or an issue page, it calls web_fetch_exa to read the clean page content.
  3. For research that takes more than one search, such as comparing options across several sources, the agent uses agent_run, which requires OAuth sign-in or an API key because runs are usage-based.
  4. If a tool is missing from your client, check whether an explicit tools URL parameter is set: an explicit list replaces the defaults, so it must include every tool you want, including search and fetch.

What it costs

Connecting to the hosted MCP server costs nothing for search and fetch at the free rate limit. When you sign in with OAuth or add an API key, authenticated MCP usage is billed to your Exa team; Exa's docs do not publish a separate MCP price, so check Exa's pricing for the current table. For agents that call the Search API directly instead, lite search is $4 per 1,000 requests and auto is $7 per 1,000 requests, each including up to 10 results with text and highlights billed once, with results above 10 at $1 per 1,000 results and AI page summaries at $1 per 1,000 pages (lite does not support summaries). As a worked example for direct API calls, an agent making 50 searches a day makes 1,500 over a 30-day month; at $4 per 1,000 lite requests that is $6.00, and Exa's Free tier includes $10 in credits every month, which covers that workload.

Limits to plan for

  • Keyless access covers search and fetch only; agent_run is unavailable without OAuth sign-in or an API key.
  • An explicit tools URL parameter replaces the defaults entirely, so include web_search_exa and web_fetch_exa in any custom list.
  • lite search rejects outputSchema, summaries and maxAgeHours; use auto or a deep type when a request needs those parameters.
  • Rate limits apply per endpoint, and requests over the limit return a 429: wait for Retry-After when the response includes it, or back off exponentially.

FAQ

Do I need an API key to try Exa MCP? No. Search and fetch work without sign-in or a key at a free rate limit, so you can connect a client to the hosted URL and start querying immediately. You only need authentication for agent_run or for production usage tied to your Exa team.

Which MCP clients does the hosted server work with? Any client that supports remote MCP servers, including ChatGPT, Codex, Claude Code and Claude Desktop, Cursor, VS Code, Windsurf, Zed, Gemini CLI and Warp. Exa's MCP guide lists the exact config location and URL key for each, and an mcp-remote bridge covers clients without remote MCP support.

Can the MCP tools return code-specific results, not just web pages? Yes. The search tools use Exa Search, which Exa's Code & Docs guide recommends for repositories, technical documentation and package information. Queries that name the library, version or operation tend to return the most relevant passages.

How does Exa MCP compare with using the Search API directly? They expose the same retrieval through different interfaces. MCP-native clients add the hosted server by URL and get tools without writing code, while custom agents that already make HTTP calls can use the Search API's full parameter set, including domain filters, date filters and structured output, which works with auto and the Deep types; lite rejects it.

What happens if my agent exceeds the free rate limit? Sign in with OAuth or create an API key and authenticate the MCP connection with the x-api-key header. Usage then bills to your Exa team, and higher rate limits are available for teams that need them.

Closing

For coding agents that need MCP-compatible access to current documentation and web content, Exa's hosted MCP server connects in minutes, and the Search API underneath scales the same retrieval to custom pipelines. Get an API key at dashboard.exa.ai/api-keys and connect your first client today.

Related Articles