MCP HubMCP Hub
exa-labs

exa-mcp-server

by: exa-labs

Claude can perform Web Search | Exa with MCP (Model Context Protocol)

539created 27/11/2024
Visit
WebSearch
Exa

πŸ“Œ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:

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

  1. Clone the repository:
    git clone https://github.com/exa-labs/exa-mcp-server.git
    cd exa-mcp-server
    
  2. Install dependencies:
    npm install
    
  3. Build the project:
    npm run build
    
  4. 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:

  1. Quit Claude Desktop completely.
  2. Restart Claude Desktop.
  3. 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

  1. Server Not Found: Verify npm link and configuration syntax.
  2. API Key Issues: Ensure your API key is valid and correctly set.
  3. 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