agent-search-mcp — Claude Code MCP server for web search
Web search in English and Chinese with no API key: the agent gets compact results along with source counts and visible provider failures.
claude mcp add agent-search-mcp -e BRAVE_API_KEY=<BRAVE_API_KEY> -e TAVILY_API_KEY=<TAVILY_API_KEY> -e EXA_API_KEY=<EXA_API_KEY> -e YDC_API_KEY=<YDC_API_KEY> -e TENCENT_WSA_API_KEY=<TENCENT_WSA_API_KEY> -e BOCHA_API_KEY=<BOCHA_API_KEY> -e SERPER_API_KEY=<SERPER_API_KEY> -- npx -y agent-search-mcpWhat agent-search-mcp does
The server is written in Node.js and starts with npx -y agent-search-mcp. You can search right away without signing up for a search API. Node.js 18.17 or newer is the one thing to have on the machine beforehand.
Each response carries more than links. A Search Evidence Packet reports which adapters ran, why the router stopped, and how much of the evidence budget was used. Failures are not hidden — timeouts, rate limits and challenges stay in partialFailures. source_count counts provider families rather than adapters, so one upstream reached through several adapters does not look like several independent sources. Chinese queries go to Sogou and Baidu directly, no translation step in between.
The default free_first policy never spends a configured paid credential. free_only shuts paid providers out entirely. quality_escalation allows one paid provider once free evidence falls short of the quality gate. Request and evidence budgets keep the output inside a known size. Leave the keys unset and the paid routes never activate, which leaves you with free search only.
What it helps with
- find fresh sources without a search API account
- verify a claim against official pages and see where each link came from
- run Chinese-language searches without translating the query first
- keep a search response inside an agent session's token budget
- find out why some results vanished when a provider failed
Example prompts for the agent
- Search agent-search for the official docs on this feature and list the sources
- Use $agent-search to verify this claim against official sources
- Run a Chinese-language search on this library and keep the provider links
How to install agent-search-mcp
Platform CLI
claude mcp add agent-search-mcp -e BRAVE_API_KEY=<BRAVE_API_KEY> -e TAVILY_API_KEY=<TAVILY_API_KEY> -e EXA_API_KEY=<EXA_API_KEY> -e YDC_API_KEY=<YDC_API_KEY> -e TENCENT_WSA_API_KEY=<TENCENT_WSA_API_KEY> -e BOCHA_API_KEY=<BOCHA_API_KEY> -e SERPER_API_KEY=<SERPER_API_KEY> -- npx -y agent-search-mcpReplace <…> with your own values. 4 more environment variables are in the server README
Platform CLI
codex mcp add agent-search-mcp --env BRAVE_API_KEY=<BRAVE_API_KEY> --env TAVILY_API_KEY=<TAVILY_API_KEY> --env EXA_API_KEY=<EXA_API_KEY> --env YDC_API_KEY=<YDC_API_KEY> --env TENCENT_WSA_API_KEY=<TENCENT_WSA_API_KEY> -- npx -y agent-search-mcpReplace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"mcpServers": {
"agent-search-mcp": {
"command": "npx",
"args": [
"-y",
"agent-search-mcp"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>",
"EXA_API_KEY": "<EXA_API_KEY>",
"YDC_API_KEY": "<YDC_API_KEY>",
"TENCENT_WSA_API_KEY": "<TENCENT_WSA_API_KEY>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"servers": {
"agent-search-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agent-search-mcp"
],
"env": {
"BRAVE_API_KEY": "<BRAVE_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>",
"EXA_API_KEY": "<EXA_API_KEY>",
"YDC_API_KEY": "<YDC_API_KEY>",
"TENCENT_WSA_API_KEY": "<TENCENT_WSA_API_KEY>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
Platform CLI
gemini mcp add -e BRAVE_API_KEY=<BRAVE_API_KEY> -e TAVILY_API_KEY=<TAVILY_API_KEY> -e EXA_API_KEY=<EXA_API_KEY> -e YDC_API_KEY=<YDC_API_KEY> -e TENCENT_WSA_API_KEY=<TENCENT_WSA_API_KEY> agent-search-mcp npx -y agent-search-mcpReplace <…> with your own values. 4 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agent-search-mcp
How do I install agent-search-mcp in Claude Code?
Run `claude mcp add agent-search-mcp -e BRAVE_API_KEY=<BRAVE_API_KEY> -e TAVILY_API_KEY=<TAVILY_API_KEY> -e EXA_API_KEY=<EXA_API_KEY> -e YDC_API_KEY=<YDC_API_KEY> -e TENCENT_WSA_API_KEY=<TENCENT_WSA_API_KEY> -e BOCHA_API_KEY=<BOCHA_API_KEY> -e SERPER_API_KEY=<SERPER_API_KEY> -- npx -y agent-search-mcp`. Skip filling the keys if you do not plan to use paid providers.
What does agent-search-mcp do?
It is a search MCP server that hands the agent results with an independent source count, the router's stop reason and a list of failures. The free providers need no key.
Do I need an API key to use it?
No — it runs without any keys, and paid routes stay off until credentials exist. Keys such as TAVILY_API_KEY or BRAVE_API_KEY matter only for policies that permit paid providers.