Skip to main content

exa-code: fast, efficient web context for coding agents

Vibe coding should never have a bad vibe. exa-code is a huge step towards coding agents that never hallucinate. When your coding agent makes a search query, exa-code searches over billions of GitHub repos, docs pages, StackOverflow posts, and more to find the perfect, token-efficient context that the agent needs to code correctly. It’s powered by the Exa search engine. Examples of queries you can make with exa-code:
  • use Exa search in python and make sure content is always livecrawled
  • use correct syntax for vercel ai sdk to call gpt-5 nano asking it how are you
Works with Cursor and Claude Code! Use the HTTP-based configuration format:
{
  "mcpServers": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp",
      "headers": {}
    }
  }
}
Installing Exa MCP like below will install Exa web search as well as exa-code. To maximize performance, be sure to leave only exa-code turned on in your MCP client. You can also use exa-code through Smithery without an Exa API key.
Exa MCP Server enables AI assistants like Claude to perform real-time web searches through the Exa Search API, allowing them to access up-to-date information from the internet. It is open-source, check out GitHub.

Remote Exa MCP

Connect directly to Exa’s hosted MCP server using this URL:
https://mcp.exa.ai/mcp

Claude Desktop Configuration for Remote MCP

Add this to your Claude Desktop configuration file:
{
  "mcpServers": {
    "exa": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.exa.ai/mcp"
      ]
    }
  }
}

Cursor and Claude Code Configuration for Remote MCP

For Cursor and Claude Code, use this HTTP-based configuration format:
{
  "mcpServers": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp",
      "headers": {}
    }
  }
}

Available Tools

Exa MCP includes several specialized search tools:
ToolDescription
get_code_context_exaNEW! Search and get relevant code snippets, examples, and documentation from open source libraries, GitHub repositories, and programming frameworks. Perfect for finding up-to-date code documentation, implementation examples, API usage patterns, and best practices from real codebases
web_search_exaPerforms real-time web searches with optimized results and content extraction
deep_researcher_startStart a smart AI researcher for complex questions. The AI will search the web, read many sources, and think deeply about your question to create a detailed research report
deep_researcher_checkCheck if your research is ready and get the results. Use this after starting a research task to see if it’s done and get your comprehensive report
company_researchComprehensive company research tool that crawls company websites to gather detailed information about businesses
crawlingExtracts content from specific URLs, useful for reading articles, PDFs, or any web page when you have the exact URL
linkedin_searchSearch LinkedIn for companies and people using Exa AI. Simply include company names, person names, or specific LinkedIn URLs in your query

Usage Examples

Once configured, you can ask Claude to perform searches:

Code Search Examples

  • “Show me how to use React hooks with TypeScript”
  • “Find examples of how to implement authentication with NextJS”
  • “Get documentation and examples for the pandas library”

Other Search Examples

  • “Research the company exa.ai and find information about their pricing”
  • “Start a deep research project on the impact of artificial intelligence on healthcare, then check when it’s complete to get a comprehensive report”

Local Installation

Prerequisites

  • Node.js v18 or higher.
  • Claude Desktop installed (optional). Exa MCP also works with other MCP-compatible clients like Cursor, Windsurf, and more).
  • An Exa API key (see above).

Using Claude Code

The quickest way to set up Exa MCP is using Claude Code:
claude mcp add exa -e EXA_API_KEY=YOUR_API_KEY -- npx -y exa-mcp-server
Replace YOUR_API_KEY with your Exa API key from above.

Using NPX

The simplest way to install and run Exa MCP is via NPX:
# Install globally
npm install -g exa-mcp-server

# Or run directly with npx
npx exa-mcp-server
To specify which tools to enable:
# Enable only code search (recommended for developers)
npx exa-mcp-server --tools=get_code_context_exa

# Enable code search and web search together
npx exa-mcp-server --tools=get_code_context_exa,web_search_exa

# Enable only web search
npx exa-mcp-server --tools=web_search_exa

# Enable deep researcher tools
npx exa-mcp-server --tools=deep_researcher_start,deep_researcher_check

# List all available tools
npx exa-mcp-server --list-tools

Configuring Claude Desktop

To configure Claude Desktop to use Exa MCP:
  1. Enable Developer Mode in Claude Desktop
    • Open Claude Desktop
    • Click on the top-left menu
    • Enable Developer Mode
  2. Open the Configuration File
    • After enabling Developer Mode, go to Settings
    • Navigate to the Developer Option
    • Click “Edit Config” to open the configuration file
    Alternatively, you can open it directly: macOS:
    code ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
    Windows:
    code %APPDATA%\Claude\claude_desktop_config.json
    
  3. Add Exa MCP Configuration Add the following to your configuration:
    {
      "mcpServers": {
        "exa": {
          "command": "npx",
          "args": [
            "-y",
           "exa-mcp-server"
           ],
          "env": {
            "EXA_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    
    Replace your-api-key-here with your actual Exa API key.
  4. Enabling Specific Tools To enable only code search (recommended for developers):
    {
      "mcpServers": {
        "exa": {
          "command": "npx",
          "args": [
            "-y",
            "exa-mcp-server",
            "--tools=get_code_context_exa"
          ],
          "env": {
            "EXA_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    
    To enable code search and web search together:
    {
      "mcpServers": {
        "exa": {
          "command": "npx",
          "args": [
            "-y",
            "exa-mcp-server",
            "--tools=get_code_context_exa,web_search_exa"
          ],
          "env": {
            "EXA_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    
    To enable only web search:
    {
      "mcpServers": {
        "exa": {
          "command": "npx",
          "args": [
            "-y",
            "exa-mcp-server",
            "--tools=web_search_exa"
          ],
          "env": {
            "EXA_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    
    To enable deep researcher tools:
    {
      "mcpServers": {
        "exa": {
          "command": "npx",
          "args": [
            "-y",
            "exa-mcp-server",
            "--tools=deep_researcher_start,deep_researcher_check"
          ],
          "env": {
            "EXA_API_KEY": "your-api-key-here"
          }
        }
      }
    }
    
  5. Restart Claude Desktop
    • Completely quit Claude Desktop (not just close the window)
    • Start Claude Desktop again
    • Look for the 🔌 icon to verify the Exa server is connected

Troubleshooting

Common Issues

  1. Server Not Found
    • Ensure the npm package is correctly installed
  2. API Key Issues
    • Confirm your EXA_API_KEY is valid
    • Make sure there are no spaces or quotes around the API key
  3. Connection Problems
    • Restart Claude Desktop completely

Additional Resources

For more information, visit the Exa MCP Server GitHub repository.
I