> ## Documentation Index
> Fetch the complete documentation index at: https://exa.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The Exa API is served at https://api.exa.ai. Authenticate with `Authorization: Bearer $EXA_API_KEY` (or `x-api-key: $EXA_API_KEY`); create keys at https://dashboard.exa.ai/api-keys?utm_source=docs&utm_medium=docs&utm_campaign=markdown_instructions. Every way an agent can get access to Exa is described at https://exa.ai/auth.md.
> Prefer the official SDKs, `exa-py` (`pip install exa-py`) and `exa-js` (`npm install exa-js`); both read `EXA_API_KEY` from the environment.
> Tool-using agents can call Exa without writing code through the hosted MCP server at https://mcp.exa.ai/mcp, or install the Exa agent skill with `npx skills add exa-labs/agent-skills` (skill file: https://exa.ai/docs/skill.md).
> The OpenAPI specs at https://exa.ai/docs/exa-spec.yaml and https://exa.ai/docs/team-management-spec.yaml are the source of truth for request and response schemas.

# fx by Vercel Labs

> Add Exa web search to fx, Vercel Labs' native coding agent, with the hosted Exa MCP server.

[fx](https://fx.sh) is a native coding agent and CLI from Vercel Labs, and an MCP client. Add Exa's hosted MCP server to give it live web search and page reading.

![Adding the Exa MCP server in fx with /mcp add and running a live Exa web search](https://mintcdn.com/exa-52/Una64IRjof2yadw_/images/integrations/vercel/fx/install-exa.gif?s=2e331148abdf5bdf083e6f651e3b8b75)

## Installation

**1. Install fx**

```bash theme={null}
curl -fsSL https://fx.sh/setup.sh | bash
```

Then sign in with `fx login`. See the [fx docs](https://fx.sh/docs) for provider options.

**2. Add Exa**

Start fx by running `fx`, then add the Exa MCP server from the interactive shell:

```text theme={null}
/mcp add --transport http exa https://mcp.exa.ai/mcp
```

fx saves the server to `~/.fx/mcp.json` and reloads MCP.

**3. Verify the connection**

```text theme={null}
/mcp list
```

## Configure by hand

fx reads MCP servers only from `~/.fx/mcp.json`, so you can also add Exa there directly:

```json ~/.fx/mcp.json theme={null}
{
  "mcp": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp"
    }
  }
}
```

Run `/mcp reload` to apply the change without restarting fx.

Without an API key, Exa MCP runs at a free rate limit and without the `agent_run` tool. To lift the limit and enable `agent_run`, create an API key and add it to the config:

> [card] [Get your Exa API key](https://dashboard.exa.ai/api-keys?utm_source=docs\&utm_medium=docs\&utm_campaign=get_key_card)
>
> Create a key in the dashboard. New accounts start with free credits.

```json ~/.fx/mcp.json theme={null}
{
  "mcp": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp",
      "header_env": {
        "x-api-key": "EXA_API_KEY"
      }
    }
  }
}
```

`header_env` maps a header name to an environment variable, so the key stays out of the config file.

## Tool discovery

fx discovers MCP tools lazily: the server's tools are not in the model's context until a turn needs them, so adding Exa costs nothing on turns that don't search the web.

> [card] [Exa MCP](https://exa.ai/docs/get-started/exa-mcp.md)
>
> Review the available tools, configuration options, and other clients.
