trackmcp
Back to directory
anysearch-ai

anysearch-mcp-server

View on GitHub

Unified real-time search MCP server supporting general web search, vertical domain search, parallel batch search, and full-page URL content extraction.

1,840 starsOthers Updated Sep 3, 2026
anysearchhermesmcpmcp-serveropenclawqclaw

Documentation

AnySearch MCP Server

> English | 简体中文

Unified real-time search MCP server supporting general web search, vertical domain search, parallel batch search, and full-page URL content extraction.

Features

  • General Web Search — open-ended natural language queries
  • Vertical Domain Search — structured queries across finance, academic, security, legal, code, and more
  • Parallel Batch Search — execute multiple independent queries in one call
  • URL Content Extraction — fetch and extract full page content as Markdown
  • Anonymous Access — works without an API key (with lower rate limits)

API Key Configuration

An API key is optional but recommended. Without a key, all features still work via anonymous access with lower rate limits.

The agent can register the user and obtain an API key in a single call — no verification code, no manual signup. Ask the user for a real email address: it becomes the account username.

bash
curl -s -X POST "https://api.anysearch.com/v1/auth/email/register" \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

Success response (`code: 0`) returns the account info and a one-time plaintext API key:

json
{
  "code": 0,
  "message": "success",
  "data": {
    "username": "you@example.com",
    "email": "you@example.com",
    "login_url": "https://www.anysearch.com/login",
    "api_key": {
      "id": "key_xxxxxxxx",
      "key": "as_sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "key_prefix": "as_sk_xxxxxx...",
      "name": "default",
      "rate_limit": 100,
      "quota_limit": 0,
      "expires_at": null,
      "created_at": "2026-06-23T10:23:00Z"
    }
  }
}

On success the agent MUST:

1. Put `data.api_key.key` into the MCP server config as the `Authorization: Bearer ` value (and/or set `ANYSEARCH_API_KEY`) — it is shown only once (it can also be retrieved later from the dashboard).

2. Tell the user their username (= email) and the `login_url`.

Error handling (always `code: -1` on error; branch on the `message` string):

messagewhat to do
`Invalid email address.`ask the user to re-enter the email
`email_already_registered`email is taken — tell the user to sign in at `login_url`; do not retry
contains `Rate limited`read retry seconds from message (e.g. `"Rate limited, retry after 300 seconds."`), wait, then retry
starts with `Key creation failed.`account created but key failed — extract the email and URL from the message (`"Key creation failed. Your account was created; sign in at ."`) and tell the user to sign in there to create a key manually
`Internal server error.`retry later or fall back to anonymous

> The email must be real and reachable.

Get an API Key

Alternatively, visit https://anysearch.com/console/api-keys to create a free API key.

Key Priority

PrioritySource
1 (highest)`--api_key` CLI flag / `Authorization` header
2Environment variable `ANYSEARCH_API_KEY`
3`.env` file (`ANYSEARCH_API_KEY=`)
4Anonymous access (lower rate limits)

Key Behavior

ScenarioBehavior
No keyProceed with anonymous access (lower rate limits)
Has keySent via `Authorization: Bearer ` header, higher rate limits
Key exhausted, auto-registered key returnedAgent should ask user for confirmation, then persist the new key
Key exhausted, no new keyInform user and suggest configuring a new API key

MCP Transport

The production endpoint is:

text
https://api.anysearch.com/mcp

It natively uses Streamable HTTP. Current OpenCode, Claude Code, Cursor, VS Code, Windsurf, and Cline releases can connect to it directly; no SSE or stdio proxy is needed. The configurations below follow each client's current official documentation.

Installation

The API key is optional. In clients that support custom headers, the examples use the recommended authenticated setup. To use anonymous access, remove only the `Authorization` entry and keep `X-Anysearch-Client`.

OpenCode

Official docs: MCP servers and configuration locations.

Use `~/.config/opencode/opencode.json` for a global configuration or `opencode.json` in the project root. On Windows, the global path is `%USERPROFILE%\.config\opencode\opencode.json`.

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "anysearch": {
      "type": "remote",
      "url": "https://api.anysearch.com/mcp",
      "enabled": true,
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {env:ANYSEARCH_API_KEY}",
        "X-Anysearch-Client": "mcp/1.0.0"
      }
    }
  }
}

OpenCode uses `{env:NAME}` for environment-variable substitution. `"oauth": false` prevents an unnecessary OAuth discovery flow for this API-key-authenticated server.

Claude Code

Official docs: Connect Claude Code to tools via MCP.

For a private, user-wide installation, run:

bash
claude mcp add --transport http anysearch https://api.anysearch.com/mcp --scope user --header "Authorization: Bearer " --header "X-Anysearch-Client: mcp/1.0.0"

The `user` scope stores the server in `~/.claude.json` and makes it available across all projects on the machine. For anonymous access, omit the `Authorization` `--header` option.

For a shareable project configuration, create `.mcp.json` in the project root:

json
{
  "mcpServers": {
    "anysearch": {
      "type": "http",
      "url": "https://api.anysearch.com/mcp",
      "headers": {
        "Authorization": "Bearer ${ANYSEARCH_API_KEY}",
        "X-Anysearch-Client": "mcp/1.0.0"
      }
    }
  }
}

Claude Code expands `${VAR}` and `${VAR:-default}` in `.mcp.json`, including inside `url` and `headers`. Set `ANYSEARCH_API_KEY` before starting Claude Code. Project-scoped servers require approval when first opened interactively.

Verify the connection with:

bash
claude mcp get anysearch
claude mcp list

Inside Claude Code, `/mcp` shows the server status and available tools.

Cursor

Official docs: Model Context Protocol.

Use `.cursor/mcp.json` for a project or `~/.cursor/mcp.json` globally:

json
{
  "mcpServers": {
    "anysearch": {
      "url": "https://api.anysearch.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:ANYSEARCH_API_KEY}",
        "X-Anysearch-Client": "mcp/1.0.0"
      }
    }
  }
}

Cursor automatically recognizes the remote HTTP endpoint and supports `${env:NAME}` interpolation in `url` and `headers`.

VS Code

Official docs: MCP configuration reference.

Run MCP: Open User Configuration for a user-wide server, or create `.vscode/mcp.json` in a workspace. This example uses a password input so the key is prompted for and stored securely instead of being committed:

json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "anysearch-api-key",
      "description": "AnySearch API key",
      "password": true
    }
  ],
  "servers": {
    "anysearch": {
      "type": "http",
      "url": "https://api.anysearch.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:anysearch-api-key}",
        "X-Anysearch-Client": "mcp/1.0.0"
      }
    }
  }
}

For anonymous access, remove the `Authorization` entry and the entire `inputs` array.

Windsurf

Official docs: Cascade MCP integration.

Open Settings > Tools > Windsurf Settings > Add Server, or edit `~/.codeium/mcp_config.json` via View Raw Config:

json
{
  "mcpServers": {
    "anysearch": {
      "serverUrl": "https://api.anysearch.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:ANYSEARCH_API_KEY}",
        "X-Anysearch-Client": "mcp/1.0.0"
      }
    }
  }
}

Windsurf supports environment-variable interpolation in `serverUrl`, `url`, and `headers`. Refresh the MCP server list after saving.

Cline

Official docs: MCP.

In the Cline panel, open MCP Servers > Configure > Configure MCP Servers, or add a hosted endpoint from the Remote Servers tab. Use the explicit `streamableHttp` type; omitting it falls back to legacy SSE behavior.

json
{
  "mcpServers": {
    "anysearch": {
      "type": "streamableHttp",
      "url": "https://api.anysearch.com/mcp",
      "headers": {
        "Authorization": "Bearer ",
        "X-Anysearch-Client": "mcp/1.0.0"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

For Cline CLI, the config file is `~/.cline/mcp.json`; `cline mcp` opens the interactive MCP wizard.

Client Quick Reference

ClientOfficial connectionConfiguration locationDirect Streamable HTTP?
OpenCodeRemote MCP config`~/.config/opencode/opencode.json` or project `opencode.json`Yes
Claude CodeRemote HTTP MCPUser `~/.claude.json` or project `.mcp.json`Yes
CursorRemote MCP config`.cursor/mcp.json` or `~/.cursor/mcp.json`Yes
VS CodeHTTP MCP configUser MCP config or `.vscode/mcp.json`Yes
WindsurfRemote HTTP MCP`~/.codeium/mcp_config.json`Yes
ClineRemote Streamable HTTPCline MCP settings or `~/.cline/mcp.json`Yes

Available Tools

Execute a search query — general or vertical domain.

ParameterTypeRequiredDescription
`query`stringYesNatural language search query. ONE intent per call
`domain`stringNoVertical domain (e.g. `finance`, `academic`, `security`). Must come from `get_sub_domains` enum
`sub_domain`stringNoSub-domain routing key (e.g. `finance.us_stock`). Must come from `get_sub_domains` output
`sub_domain_params`objectNoStructured params from `get_sub_domains` params column. NEVER invent values
`max_results`integerNo1–10, default 10

`get_sub_domains`

Query the vertical domain directory. Required before any search that uses a domain — returns valid sub_domains and their parameter schemas.

ParameterTypeRequiredDescription
`domain`stringOne ofSingle domain to query
`domains`string[]One ofBatch up to 5 domains (preferred — covers more ground)

Returns a Markdown table: `sub_domain | description | params`

Execute 1–5 independent search queries in parallel. Single failure does not block others.

ParameterTypeRequiredDescription
`queries`object[]Yes1–5 query objects, each with same fields as `search`

`extract`

Fetch full page content from a URL and return as Markdown. Truncated at 50,000 characters. HTML pages only.

ParameterTypeRequiredDescription
`url`stringYesTarget URL (`http://` or `https://`)

Frequently asked questions

What is anysearch-mcp-server?

anysearch-mcp-server is Unified real-time search MCP server supporting general web search, vertical domain search, parallel batch search, and full-page URL content extraction.

How do I install anysearch-mcp-server?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is anysearch-mcp-server open source?

Yes — it is hosted on GitHub at https://github.com/anysearch-ai/anysearch-mcp-server and has 1,840 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP