Exa MCP Server 是一个模型上下文协议(MCP)服务器,它允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。通过这种设置,AI 模型能够以安全且可控的方式获取实时网络信息。
可以直接连接到 Exa 托管的 MCP 服务器(而不是在本地运行)。
https://mcp.exa.ai/mcp?exaApiKey=your-exa-api-key
请将 your-api-key-here
替换为你从 dashboard.exa.ai/api-keys 获取的实际 Exa API 密钥。
在你的 Claude 桌面端配置文件中添加以下内容:
{
"mcpServers": {
"exa": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.exa.ai/mcp?exaApiKey=your-exa-api-key"
]
}
}
}
npm install -g exa-mcp-server
claude mcp add exa -e EXA_API_KEY=YOUR_API_KEY -- npx -y exa-mcp-server
要通过 Smithery 自动为 Claude 桌面端安装 Exa MCP 服务器,请执行以下命令:
npx -y @smithery/cli install exa --client claude
你可以在 Claude 桌面端应用的设置中找到 claude_desktop_config.json
文件。具体操作如下:
打开 Claude 桌面端应用,从左上角菜单栏启用开发者模式。启用后,打开设置(同样从左上角菜单栏),导航到开发者选项,找到“编辑配置”按钮。点击该按钮将打开 claude_desktop_config.json
文件,你可以在其中进行必要的编辑。
或者(如果你想从终端打开 claude_desktop_config.json
):
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
code %APPDATA%\Claude\claude_desktop_config.json
{
"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 密钥。
Exa MCP 服务器包含以下工具,你可以通过添加 --tools
参数来启用它们:
你可以通过在 Claude 桌面端配置中添加 --tools
参数来选择要启用的工具:
{
"mcpServers": {
"exa": {
"command": "npx",
"args": [
"-y",
"exa-mcp-server",
"--tools=web_search_exa,company_research,crawling,linkedin_search,deep_researcher_start,deep_researcher_check"
],
"env": {
"EXA_API_KEY": "your-api-key-here"
}
}
}
}
如果你想启用多个工具,请使用逗号分隔的列表。如果你未指定任何工具,将使用所有默认启用的工具。
要使更改生效,请执行以下操作:
如果你更喜欢直接运行服务器,可以使用 npx:
# 默认启用所有工具运行
npx exa-mcp-server
# 仅启用特定工具
npx exa-mcp-server --tools=web_search_exa
# 启用多个工具
npx exa-mcp-server --tools=web_search_exa,company_research
# 列出所有可用工具
npx exa-mcp-server --list-tools
EXA_API_KEY
有效。EXA_API_KEY
是否在 Claude 桌面端配置中正确设置。你可以使用 Heroku 按钮一键将此 MCP 服务器部署到 Heroku:
如果你更喜欢手动部署,请按以下步骤操作:
git clone https://github.com/dsouza-anush/exa-mcp-server-heroku.git
cd exa-mcp-server-heroku
heroku create
heroku config:set EXA_API_KEY=your-api-key-here
heroku config:set ENABLED_TOOLS=web_search_exa,company_research_exa,crawling_exa
git push heroku main
此 MCP 服务器与 Heroku Managed Inference 和 Agents 完全兼容。要使用它,请按以下步骤操作:
# 将 APP_NAME 替换为你的 Heroku 应用名称
# 将 MODEL_NAME 替换为你想要的模型名称
heroku ai:models:create MODEL_NAME -a APP_NAME --as INFERENCE
/v1/agents/heroku
端点可用。此服务器在 Heroku Inference 中使用以下 Procfile 配置:
web: npm run serve
mcp-search-exa: node ./stdio-server.js
mcp-search-exa
进程已在 Heroku Inference 中注册,遵循 Heroku 要求的命名约定(进程名称必须以 "mcp" 开头)。直接执行 Node.js 可确保为 MCP 协议正确处理标准输入输出。
在 app.json
中,web
和 mcp-search-exa
dynos 默认配置为扩展到 0,遵循 Heroku 对 MCP 服务器的建议。当你将此应用附加到 Heroku Inference 模型时,Heroku 将根据工具执行的需要自动扩展 MCP 进程。
要将你在 Heroku 上部署的 MCP 服务器与 Claude 桌面端一起使用,请在你的 Claude 桌面端配置文件中添加以下内容:
{
"mcpServers": {
"exa_heroku": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://your-app-name.herokuapp.com/mcp"
],
"env": {
"EXA_API_KEY": "your-api-key-here"
}
}
}
}
请将 your-app-name
替换为你的 Heroku 应用名称,将 your-api-key-here
替换为你的 Exa API 密钥。
claude mcp add exa_heroku -e EXA_API_KEY=YOUR_API_KEY -- npx -y mcp-remote https://your-app-name.herokuapp.com/mcp
请将 your-app-name
替换为你的 Heroku 应用名称,将 YOUR_API_KEY
替换为你的 Exa API 密钥。
此仓库每天会自动从原始的 exa-mcp-server
仓库更新,同时保留所有特定于 Heroku 的自定义设置。更新通过 GitHub Actions 处理。
GitHub Actions 工作流每天运行一次,执行以下操作:
exa-mcp-server
仓库获取最新更改。app.json
、Procfile
等)。你也可以手动触发更新,方法如下:
如果你更喜欢手动更新,可以使用包含的更新脚本:
git clone https://github.com/your-username/exa-mcp-server-heroku.git
cd exa-mcp-server-heroku
./update-from-upstream.sh
git commit -am "Updated from upstream with Heroku customizations"
git push origin main
git push heroku main
更新过程将保留所有特定于 Heroku 的自定义设置,包括:
app.json
)Procfile
)由 Exa 团队用心打造 ❤️