Exa MCP Tool
This skill provides access to Exa's powerful search and research capabilities through the Exa MCP server.
Available Tools
General Purpose
- -
exa-search <tool> '{"json":"args"}' - Generic wrapper for any Exa MCP tool
Specialized Wrappers
- -
exa-web-search '{"query":"...", "count":10, "freshness":"pw", ...}' - Web search with optional filters
Full Tool List (via exa-search)
All tools from the Exa MCP server are available:
| Tool | Description |
|---|
| INLINECODE2 | Search the web for any topic, get clean content |
| INLINECODE3 |
Advanced search with filters (domains, dates, content options) |
|
get_code_context_exa | Find code examples, documentation, programming solutions |
|
crawling_exa | Get full content of a specific webpage from a known URL |
|
company_research_exa | Research any company for business information and news |
|
people_search_exa | Find people and their professional profiles |
|
deep_researcher_start | Start an AI research agent that writes detailed reports |
|
deep_researcher_check | Check status and get results from deep research task |
Setup
- 1. Get your Exa API key from https://dashboard.exa.ai/api-keys
- 2. Set the environment variable:
CODEBLOCK0
Or add to your shell profile (~/.bashrc or ~/.zshrc):
CODEBLOCK1
Or create a .env file in your workspace:
CODEBLOCK2
- 3. Restart OpenClaw to load the skill:
CODEBLOCK3
Usage Examples
Basic Web Search
CODEBLOCK4
Advanced Search with Filters
CODEBLOCK5
Code Search
CODEBLOCK6
Crawl Specific URL
CODEBLOCK7
Company Research
CODEBLOCK8
People Search
CODEBLOCK9
Deep Research (Two-Step)
CODEBLOCK10
Output Format
All tools return JSON with the Exa MCP response structure. The actual content is in the result field, which varies by tool but typically includes:
- -
content: Array of result items with title, url, text (snippet) - Sometimes additional metadata like
cost, duration, INLINECODE20
Example web search output:
CODEBLOCK11
Using in OpenClaw Agents
Agents can use these tools directly:
CODEBLOCK12
Notes
- - Rate limits apply based on your Exa plan
- The MCP server uses Server-Sent Events (SSE) streaming; the wrapper handles this
- All tools accept various optional parameters; see Exa docs for full schema
- Errors are returned with proper exit codes and messages to stderr
Troubleshooting
"EXAAPIKEY not set"
- - Ensure the environment variable is exported in the same session where OpenClaw runs
- If using systemd/systemctl, set the key in the service file or INLINECODE21
"406 Not Acceptable"
- - The tool already sets the correct Accept header; this shouldn't occur in the wrapper
Empty or no results
- - Verify your API key has credits/quota
- Check the Exa dashboard: https://dashboard.exa.ai
References
- - Exa MCP Docs: https://exa.ai/docs/reference/exa-mcp
- MCP Server: https://mcp.exa.ai/mcp
- API Keys: https://dashboard.exa.ai/api-keys
Exa MCP 工具
此技能通过 Exa MCP 服务器提供对 Exa 强大搜索和研究能力的访问。
可用工具
通用工具
- - exa-search {json:args} - 任何 Exa MCP 工具的通用封装器
专用封装器
- - exa-web-search {query:..., count:10, freshness:pw, ...} - 带可选过滤器的网页搜索
完整工具列表(通过 exa-search)
所有来自 Exa MCP 服务器的工具均可用:
| 工具 | 描述 |
|---|
| websearchexa | 搜索任何主题的网页,获取干净内容 |
| websearchadvanced_exa |
带过滤器的高级搜索(域名、日期、内容选项) |
| get
codecontext_exa | 查找代码示例、文档、编程解决方案 |
| crawling_exa | 从已知 URL 获取特定网页的完整内容 |
| company
researchexa | 研究任何公司的商业信息和新闻 |
| people
searchexa | 查找人员及其专业资料 |
| deep
researcherstart | 启动一个撰写详细报告的 AI 研究代理 |
| deep
researchercheck | 检查深度研究任务的状态并获取结果 |
设置
- 1. 从 https://dashboard.exa.ai/api-keys 获取您的 Exa API 密钥
- 2. 设置环境变量:
bash
export EXA
APIKEY=your
exaapi
keyhere
或添加到您的 shell 配置文件(~/.bashrc 或 ~/.zshrc):
bash
export EXAAPIKEY=yourexaapikeyhere
或在您的工作区创建 .env 文件:
bash
echo EXAAPIKEY=yourexaapikeyhere > ~/.openclaw/workspace/.env
source ~/.openclaw/workspace/.env
- 3. 重启 OpenClaw 以加载技能:
bash
openclaw gateway restart
使用示例
基本网页搜索
bash
exa-web-search {query:Step-3.5 Flash benchmarks}
带过滤器的高级搜索
bash
exa-search web
searchadvanced_exa {
query: OpenClaw AI,
count: 10,
freshness: pw,
includeDomains: [github.com, docs.openclaw.ai]
}
代码搜索
bash
exa-search get
codecontext_exa {
query: OpenClaw agent implementation,
count: 5
}
爬取特定 URL
bash
exa-search crawling_exa {
url: https://docs.openclaw.ai/,
maxPages: 10
}
公司研究
bash
exa-search company
researchexa {
company: OpenClaw,
includeNews: true,
newsDays: 30
}
人员搜索
bash
exa-search people
searchexa {
query: Phil openclaw creator,
count: 10
}
深度研究(两步)
bash
启动研究
TASK
ID=$(exa-search deepresearcher_start {
query: Current state of AI agents in 2026,
maxSources: 20
} | jq -r .taskId)
检查状态(轮询直到完成)
while true; do
exa-search deep
researchercheck {taskId:$TASK_ID}
sleep 5
done
输出格式
所有工具返回带有 Exa MCP 响应结构的 JSON。实际内容在 result 字段中,该字段因工具而异,但通常包括:
- - content:结果项数组,包含 title、url、text(摘要)
- 有时还包括额外元数据,如 cost、duration、sources
网页搜索输出示例:
json
{
content: [
{
title: Step 3.5 Flash - MathArena,
url: https://matharena.ai/models/stepfun35_flash,
text: Step 3.5 Flash benchmarks and performance metrics...
}
]
}
在 OpenClaw 代理中使用
代理可以直接使用这些工具:
javascript
// 在代理会话中
/exec exa-search websearchexa {query:latest news}
// 或通过 API
{
sessionTarget: isolated,
payload: {
kind: agentTurn,
message: Search for recent AI developments using exa-search
}
}
注意事项
- - 速率限制取决于您的 Exa 套餐
- MCP 服务器使用服务器发送事件(SSE)流式传输;封装器会处理此问题
- 所有工具都接受各种可选参数;请参阅 Exa 文档了解完整模式
- 错误会以适当的退出代码和消息返回至 stderr
故障排除
EXAAPIKEY not set
- - 确保环境变量在运行 OpenClaw 的同一会话中已导出
- 如果使用 systemd/systemctl,请在服务文件或 /etc/environment 中设置密钥
406 Not Acceptable
- - 该工具已设置正确的 Accept 标头;封装器中不应出现此问题
结果为空或无结果
- - 验证您的 API 密钥是否有额度/配额
- 检查 Exa 仪表板:https://dashboard.exa.ai
参考
- - Exa MCP 文档:https://exa.ai/docs/reference/exa-mcp
- MCP 服务器:https://mcp.exa.ai/mcp
- API 密钥:https://dashboard.exa.ai/api-keys