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, allowing them to access real-time web information in a safe and controlled manner.
What is MCP? π€
The Model Context Protocol (MCP) is a system that enables AI applications to connect to external tools and data sources, offering a safe way for AI assistants to interact 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 search API.
- Provides structured search results, including titles, URLs, and content snippets.
- Caches recent searches for future reference.
- Handles rate limiting and errors 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
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 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:
npm link
Configuration βοΈ
1. Configure Claude Desktop
Locate claude_desktop_config.json
in the Claude Desktop app settings. Enable Developer Mode, open Settings, and click on the Edit Config button.
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. Restart Claude Desktop
To apply changes:
- Quit Claude Desktop completely.
- Restart Claude Desktop.
- Confirm the Exa server connection via the π icon.
Usage π―
Once configured, you can prompt Claude for web searches, such as:
- "Can you search for recent developments in quantum computing?"
- "Find and analyze recent research papers about climate change solutions."
The server will process the request, query the Exa API, and return formatted results.
Features β¨
- Simplified Web Search Tool
- Customizable Search Parameters
- Automatic Live Crawling
- Search Caching
- Error Handling
- Type Safety
Testing with MCP Inspector π
npx @modelcontextprotocol/inspector node ./build/index.js
Troubleshooting π§
Common Issues
- Server Not Found: Verify npm link and configuration syntax.
- API Key Issues: Ensure your API key is valid and correctly set.
- Connection Issues: Restart Claude Desktop and check logs.
For assistance, consult the MCP Documentation or visit GitHub discussions.
Acknowledgments π
- Exa AI for their powerful search API
- Model Context Protocol for the MCP specification
- Anthropic for Claude Desktop