exa-mcp-server
by: exa-labs
Claude can perform Web Search | Exa with MCP (Model Context Protocol)
📌Overview
Purpose: The Exa MCP Server enables AI assistants, like Claude, to utilize the Exa AI Search API for conducting real-time web searches.
Overview: The Exa MCP Server is a Model Context Protocol (MCP) implementation that connects AI applications to external tools and APIs, providing a secure and efficient means for AI assistants to access up-to-date web information while maintaining user control.
Key Features:
-
Simplified Web Search Tool: Facilitates easy web searches by allowing queries through Claude with straightforward parameters.
-
Automatic Live Crawling: Integrates real-time web crawling based on user-defined strategies to ensure fresh content retrieval.
-
Search Caching: Stores recent searches for quick reference, enhancing efficiency and performance during repeated inquiries.
-
Error Handling: Manages API errors and rate limits gracefully, ensuring stability during operation.
-
Type Safety: Utilizes TypeScript and Zod validation for robust and reliable code, enhancing functionality.
-
MCP Compliance: Adheres to the latest MCP protocol specifications, ensuring a standard-driven approach.
Exa MCP Server
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Demo video: https://www.loom.com/share/ac676f29664e4c6cb33a2f0a63772038?sid=0e72619f-5bfc-415d-a705-63d326373f60
What is MCP?
The Model Context Protocol (MCP) is a system that lets AI apps, like Claude Desktop, connect to external tools and data sources. It provides a clear and safe way for AI assistants to work with local services and APIs while keeping the user in control.
What does this server do?
The Exa MCP server:
- Enables AI assistants to perform web searches using Exa's powerful search API
- Provides structured search results including titles, URLs, and content snippets
- Caches recent searches as resources for reference
- Handles rate limiting and error cases gracefully
- Supports real-time web crawling for fresh content
Prerequisites
Before you begin, ensure you have:
- Node.js (v18 or higher)
- Claude Desktop installed
- An Exa API key
- Git installed
You can verify your Node.js installation by running:
node --version # Should show v18.0.0 or higher
Installation
NPM Installation
npm install -g exa-mcp-server
Using Smithery
To install the Exa MCP server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install exa --client claude
Manual Installation
- Clone the repository:
git clone https://github.com/exa-labs/exa-mcp-server.git
cd exa-mcp-server
- Install dependencies:
npm install
- Build the project:
npm run build
- Create a global link (makes the server executable from anywhere):
npm link
Configuration
1. Configure Claude Desktop to recognize the Exa MCP server
Open the Claude Desktop app and enable Developer Mode from the top-left menu bar.
Then open Settings, navigate to Developer Option, and click Edit Config to open the claude_desktop_config.json
file for editing.
Alternatively, open the config file from the terminal:
- For macOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
- For Windows:
code %APPDATA%\Claude\claude_desktop_config.json
2. Add the Exa server configuration
{
"mcpServers": {
"exa": {
"command": "npx",
"args": ["/path/to/exa-mcp-server/build/index.js"],
"env": {
"EXA_API_KEY": "your-api-key-here"
}
}
}
}
Replace your-api-key-here
with your actual Exa API key.
3. Available Tools & Tool Selection
The Exa MCP server includes these tools:
- web_search: Real-time web searches with optimized results.
- research_paper_search: Search academic papers and research content.
- twitter_search: Search tweets, profiles, and conversations on Twitter/X.
- company_research: Crawls company websites to gather detailed business info.
- crawling: Extracts content from specific URLs (articles, PDFs, web pages).
- competitor_finder: Identifies competitors by finding similar businesses.
You can enable specific tools by adding the --tools
parameter to your Claude Desktop config:
{
"mcpServers": {
"exa": {
"command": "npx",
"args": [
"/path/to/exa-mcp-server/build/index.js",
"--tools=web_search,research_paper_search,twitter_search,company_research,crawling,competitor_finder"
],
"env": {
"EXA_API_KEY": "your-api-key-here"
}
}
}
}
If no tools are specified, all tools are enabled by default.
4. Restart Claude Desktop
To apply changes:
- Completely quit Claude Desktop (not just close the window)
- Start Claude Desktop again
- Look for the 🔌 icon to verify the Exa server is connected
Using via NPX
Run the server directly with npx:
# Run with all tools enabled
npx exa-mcp-server
# Enable specific tools only
npx exa-mcp-server --tools=web_search
# Enable multiple tools
npx exa-mcp-server --tools=web_search,research_paper_search
# List all available tools
npx exa-mcp-server --list-tools
Usage
Once configured, request web searches with Claude. Example prompts:
Can you search for recent developments in quantum computing?
Search and summarize the latest news about artificial intelligence startups in New York.
Find and analyze recent research papers about climate change solutions.
Search Twitter for posts from @elonmusk about SpaceX.
Find tweets from @samaltman in the last week about AI safety.
Research the company exa.ai and find pricing and feature information.
Extract content from this research paper: https://arxiv.org/pdf/1706.03762
Find competitors for a company providing web search API services, excluding exa.ai.
The server will:
- Process the search request
- Query the Exa API with optimal settings (including live crawling)
- Return formatted results to Claude
- Cache the search for future reference
Testing with MCP Inspector
Test the server directly using:
npx @modelcontextprotocol/inspector node ./build/index.js
This opens an interactive interface to explore server capabilities, execute queries, and view cached results.
Troubleshooting
Common Issues
-
Server Not Found
- Verify
npm link
is correctly set up - Check Claude Desktop configuration syntax
- Ensure Node.js is properly installed
- Verify
-
API Key Issues
- Confirm the EXA_API_KEY is valid and correctly set
- Avoid spaces or quotes around the API key
-
Connection Issues
- Restart Claude Desktop completely
- Check Claude Desktop logs:
# macOS tail -n 20 -f ~/Library/Logs/Claude/mcp*.log # Windows type "%APPDATA%\Claude\logs\mcp*.log"
Acknowledgments
- Exa AI for their powerful search API
- Model Context Protocol for the MCP specification
- Anthropic for Claude Desktop