# agent-search-mcp

Web search in English and Chinese with no API key: the agent gets compact results along with source counts and visible provider failures.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 112
- Author: lennney
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/lennney/agent-search-mcp
- Updated: 2026-09-21
- HTML: https://affpapa.org/en/nevibecode/mcp/agent-search-mcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `BRAVE_API_KEY`, `TAVILY_API_KEY`, `EXA_API_KEY`, `YDC_API_KEY`, `TENCENT_WSA_API_KEY`, `BOCHA_API_KEY`, `SERPER_API_KEY`, `SEARCH_PROVIDER_MODE`, `PAID_ENGINE_ORDER` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
Replace <…> with your own values. 4 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values. 4 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-mcp
```
Replace <…> with your own values. 4 more environment variables are in the server README

## When to use it
- 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
- 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

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
