anysearch-ai/anysearch-mcp-server
Unified real-time search MCP server supporting general web search, vertical domain search, parallel batch search, and full-page URL content extraction.
AnySearch MCP Server
What it is – A lightweight HTTP MCP (Model‑Context‑Protocol) server that lets AI‑coding assistants (OpenCode, Claude Code, Cursor, VS Code, Cline, OpenAI Codex, Google Antigravity, DeepSeek Harness, Hermes Agent, Oh My Pi, etc.) perform real‑time web searches, domain‑specific searches, batch searches, and full‑page content extraction.
Why it matters – Modern LLM‑powered agents need up‑to‑date information. AnySearch MCP exposes a single endpoint (https://api.anysearch.com/mcp) that returns structured tool calls (search, get_sub_domains, batch_search, extract). The server works with an optional API key (higher rate limits) or anonymously (lower limits), making it usable out‑of‑the‑box for demos and production.
Core capabilities
| Capability | What you can do |
|---|---|
| General web search | Send a natural‑language query and receive up to 10 results. |
| Vertical domain search | Query structured data in finance, academic, security, legal, code, etc. – you first call get_sub_domains to discover allowed sub‑domains and their parameter schema. |
| Parallel batch search | Run 1‑5 independent searches in a single request; failures are isolated. |
| URL content extraction | Retrieve the full HTML page and return it as Markdown (truncated at 50 k characters). |
| Anonymous access | No API key required; the server still answers all calls but enforces stricter rate limits. |
Getting an API key (optional)
- One‑click registration – POST to
https://api.anysearch.com/v1/auth/email/registerwith a real, reachable email. The response contains a one‑time plaintext key. - Dashboard – Alternatively, create a key at https://anysearch.com/console/api-keys.
- Key priority – CLI flag >
ANYSEARCH_API_KEYenv var >.envfile > anonymous.
Tip: Store the key in an environment variable or secret manager; never commit it to source.
How to connect (MCP client examples)
All clients use the same remote endpoint and send two headers:
Authorization: Bearer <YOUR_KEY> # omit for anonymous
X-Anysearch-Client: mcp/1.0.0
Below are the minimal configuration snippets for the most common agents.
OpenCode (global)
{
"$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"
}
}
}
}
Run opencode mcp list to verify.
Claude Code (user‑wide)
claude mcp add --transport http anysearch https://api.anysearch.com/mcp \
--scope user \
--header 'Authorization: Bearer ${ANYSEARCH_API_KEY}' \
--header 'X-Anysearch-Client: mcp/1.0.0'
For project‑level config, create .mcp.json with the same fields.
Cursor (project)
{
"mcpServers": {
"anysearch": {
"url": "https://api.anysearch.com/mcp",
"headers": {
"Authorization": "Bearer ${env:ANYSEARCH_API_KEY}",
"X-Anysearch-Client": "mcp/1.0.0"
}
}
}
}
Check under Customize > MCPs.
VS Code (secure prompt)
{
"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"
}
}
}
}
Remove the Authorization line for anonymous use.
(The README provides analogous snippets for Cline, OpenAI Codex, Google Antigravity, DeepSeek Harness, Hermes Agent, and OMP – all follow the same header pattern.)
Tool contract (what the server expects and returns)
search
{
"query": "string", // required, single intent
"domain": "finance"?, // optional vertical
"sub_domain": "finance.us_stock"?,
"sub_domain_params": {…}?, // must match schema from get_sub_domains
"max_results": 10 // 1‑10, default 10
}
get_sub_domains
{ "domain": "finance" } // or "domains": ["finance","academic"]
Returns a Markdown table sub_domain | description | params.
batch_search
{ "queries": [ {…search‑object…}, {…} ] }
Up to five queries; each follows the search schema.
extract
{ "url": "https://example.com" }
Returns the page content as Markdown (max 50 k chars).
Rate‑limit & error handling (as described in the README)
| Situation | Recommended response |
|---|---|
| Invalid email during registration | Prompt user to re‑enter a valid address. |
409 / email_already_registered |
Tell user to sign‑in via the provided login_url; do not retry. |
429 (rate limited) |
Respect Retry‑After header or message; fall back to anonymous mode if needed. |
Key creation failed… |
Extract the email and URL from the message and ask the user to create a key manually. |
500 internal error |
Retry later or switch to anonymous access. |
When to use it
- Agent‑driven research – LLMs that need fresh web data can call
searchorextractdirectly from the IDE. - Domain‑specific workflows – Finance analysts, legal researchers, or developers can first call
get_sub_domainsto discover the exact schema for their vertical. - Batch processing – Run several independent queries in parallel with
batch_searchto reduce round‑trips. - Demo or prototype – No API key required; just point the client at the endpoint.
Limitations
- Anonymous mode enforces stricter rate limits (exact numbers are account‑specific).
extractonly works on HTML pages and truncates at 50 k characters.- The server does not host any model; it is purely a search‑tool provider.
- Errors must be interpreted from HTTP status,
code, ormessagefields – there is no uniform error object.
Quick start checklist
- (Optional) Register an API key via the one‑click email flow.
- Set
ANYSEARCH_API_KEYin your environment or add it to a client‑specific config file. - Add the MCP server configuration for your preferred IDE/agent (see snippets above).
- Verify the connection with the client’s
mcp list/mcp testcommand. - Call
search,get_sub_domains,batch_search, orextractfrom your LLM‑powered tool.
Bottom line – AnySearch MCP Server is a ready‑to‑use, standards‑compliant bridge that gives LLM agents instant, structured access to the open web and many vertical data sources, with simple key management and broad IDE support.
Related
- Project
- Project
- Project
- Project
- Project