返回市场
扩展MCP服务器

扩展MCP服务器

作者:exa-labs3273 星标更新:2025-11-22

项目介绍

Exa MCP 服务器 🔍

在Cursor中安装 在VS Code中安装 npm 版本 smithery 徽章

Exa Code:快速高效的编程上下文

编写代码时不应有糟糕的感觉。exa-code 是迈向永不产生幻觉的编码代理的一大步。

当您的编码代理进行搜索查询时,exa-code 会在数十亿个 GitHub 仓库、文档页面、Stackoverflow 帖子等中搜索,以找到代理需要正确编写的完美且高效的上下文。它由 Exa 搜索引擎提供支持。

您可以使用 exa-code 进行以下查询示例:

  • 在 Python 中使用 Exa 搜索并确保内容始终实时爬取
  • 使用正确的 Vercel AI SDK 语法调用 GPT-5 nano 并询问它“你好吗”
  • 如何设置可重复的 Nix Rust 开发环境

✨ 支持 Cursor 和 Claude Code! 使用基于 HTTP 的配置格式:

{
  "mcpServers": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp",
      "headers": {}
    }
  }
}

您可以通过 tools 参数启用特定工具(如果多个,则用逗号分隔):

https://mcp.exa.ai/mcp?tools=web_search_exa,get_code_context_exa

或者启用所有工具:

https://mcp.exa.ai/mcp?tools=web_search_exa,deep_search_exa,get_code_context_exa,crawling_exa,company_research_exa,linkedin_search_exa,deep_researcher_start,deep_researcher_check

您可以在 URL 中包含您的 Exa API 密钥:

https://mcp.exa.ai/mcp?exaApiKey=YOUREXAKEY

注意: 默认情况下,只有 web_search_exaget_code_context_exa 已启用。根据需要使用 tools 参数添加其他工具。


这是一个模型上下文协议(MCP)服务器,连接像 Claude 这样的AI助手到 Exa AI 的搜索能力,包括网络搜索、研究工具以及我们新的代码搜索功能。

远程 Exa MCP 🌐

直接连接到 Exa 托管的 MCP 服务器(而不是本地运行)。

远程 Exa MCP URL

https://mcp.exa.ai/mcp

Claude Desktop 配置用于远程 MCP

在您的 Claude Desktop 配置文件中添加以下内容:

{
  "mcpServers": {
    "exa": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.exa.ai/mcp"
      ]
    }
  }
}

Cursor 和 Claude Code 配置用于远程 MCP

对于 Cursor 和 Claude Code,使用此基于 HTTP 的配置格式:

{
  "mcpServers": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp",
      "headers": {}
    }
  }
}

Codex 配置用于远程 MCP

打开您的 Codex 配置文件:

code ~/.codex/config.toml

添加以下配置:

[mcp_servers.exa]
command = "npx"
args = ["-y", "mcp-remote", "https://mcp.exa.ai/mcp"]
env = { EXA_API_KEY = "your-api-key-here" }

your-api-key-here 替换为您从 dashboard.exa.ai/api-keys 获取的实际 Exa API 密钥。

Claude Code 插件

在 Claude Code 中使用 Exa 的最简单方法是通过插件:

# 添加 Exa 市场
/plugin marketplace add exa-labs/exa-mcp-server

# 安装插件
/plugin install exa-mcp-server

然后设置您的 API 密钥:

export EXA_API_KEY="your-api-key-here"

dashboard.exa.ai/api-keys 获取您的 API 密钥。

NPM 安装

npm install -g exa-mcp-server

使用 Claude Code

claude mcp add exa -e EXA_API_KEY=YOUR_API_KEY -- npx -y exa-mcp-server

通过 Smithery 使用 Exa MCP

要通过 Smithery 安装 Exa MCP 服务器,请访问:

smithery.ai/server/exa

配置 ⚙️

1. 配置 Claude Desktop 识别 Exa MCP 服务器

您可以在 Claude Desktop 应用程序的设置中找到 claude_desktop_config.json:

打开 Claude Desktop 应用程序,并从左上角菜单栏启用开发者模式。

启用后,打开设置(同样从左上角菜单栏),导航到开发者选项,在那里您会找到编辑配置按钮。点击它将打开 claude_desktop_config.json 文件,允许您进行必要的编辑。

或(如果您想从终端打开 claude_desktop_config.json)

对于 macOS:

  1. 打开您的 Claude Desktop 配置:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

对于 Windows:

  1. 打开您的 Claude Desktop 配置:
code %APPDATA%\Claude\claude_desktop_config.json

2. 添加 Exa 服务器配置:

{
  "mcpServers": {
    "exa": {
      "command": "npx",
      "args": ["-y", "exa-mcp-server"],
      "env": {
        "EXA_API_KEY": "your-api-key-here"
      }
    }
  }
}

your-api-key-here 替换为您从 dashboard.exa.ai/api-keys 获取的实际 Exa API 密钥。

3. 可用工具及工具选择

Exa MCP 服务器包括强大的工具供开发人员和研究人员使用:

🌐 工具

  • get_code_context_exa:搜索并获取来自开源库、GitHub 仓库和编程框架的相关代码片段、示例和文档。非常适合查找最新的代码文档、实现示例、API 使用模式和最佳实践。
  • web_search_exa:执行实时网络搜索,优化结果和内容提取。
  • deep_search_exa:深度网络搜索,智能查询扩展和高质量的结果摘要。
  • company_research:全面的公司研究工具,爬取公司网站以收集关于企业的详细信息。
  • crawling:从特定 URL 提取内容,适用于阅读文章、PDF 或任何网页时已知确切 URL 的情况。
  • linkedin_search:使用 Exa AI 在 LinkedIn 上搜索公司和个人。只需在查询中包含公司名称、个人姓名或具体的 LinkedIn URL。
  • deep_researcher_start:启动一个智能 AI 研究员处理复杂问题。AI 将搜索网络、阅读许多来源并深入思考您的问题,创建详细的调研报告。
  • deep_researcher_check:检查您的研究是否完成并获取结果。在启动研究任务后使用此功能查看是否已完成并获取综合报告。

注意: 默认情况下,仅启用 web_search_exaget_code_context_exa。您可以使用 tools= 参数启用额外的工具(参见下面的示例)。

💻 仅代码搜索设置(推荐给开发人员)

{
  "mcpServers": {
    "exa": {
      "command": "npx",
      "args": [
        "-y",
        "exa-mcp-server",
        "tools=get_code_context_exa"
      ],
      "env": {
        "EXA_API_KEY": "your-api-key-here"
      }
    }
  }
}

启用所有工具:

您可以启用所有工具或任何特定工具。使用逗号分隔列表来启用所需的工具:

{
  "mcpServers": {
    "exa": {
      "command": "npx",
      "args": [
        "-y",
        "exa-mcp-server",
        "tools=get_code_context_exa,web_search_exa,deep_search_exa,company_research_exa,crawling_exa,linkedin_search_exa,deep_researcher_start,deep_researcher_check"
      ],
      "env": {
        "EXA_API_KEY": "your-api-key-here"
      }
    }
  }
}

通过 NPX 使用

如果您更喜欢直接运行服务器,可以使用 npx:

# 仅使用默认工具(web_search_exa 和 get_code_context_exa)
npx exa-mcp-server

# 仅启用特定工具
npx exa-mcp-server tools=web_search_exa

# 启用所有工具
npx exa-mcp-server tools=web_search_exa,deep_search_exa,get_code_context_exa,crawling_exa,company_research_exa,linkedin_search_exa,deep_researcher_start,deep_researcher_check

由 Exa 团队用心打造