MCP Web Search Server: Add Live Web Search to Any MCP Client (No API Key)
An MCP web search server gives any Model Context Protocol client, such as Claude Code, Cursor, VS Code or an agent you wrote yourself, a tool it can call to search the live web. This guide sets one up with a single command, shows the config for the common clients, and then calls the server from your own code with the official MCP TypeScript SDK. There's no API key and no signup:
npx -y @agentsearchhq/agentsearch-mcp
That runs AgentSearch's MCP server, @agentsearchhq/agentsearch-mcp on npm, over stdio. Out of the box, its agentsearch_web_search tool uses the free tier: 25 free searches per IP in total, then pay per call. That allowance is a lifetime total and doesn't reset. After that, you add a small wallet and pay per call in USDC over x402.
What we tested: @agentsearchhq/agentsearch-mcp 1.8.7 (npm latest on November 23, 2026) on Linux with Node.js 24. We connected over raw stdio JSON-RPC and with @modelcontextprotocol/sdk 1.32.2, listed the tools, and ran real free searches. We didn't click through each editor's UI; the client configs below are the same ones in our per-client guides.
What an MCP web search server does
MCP splits an AI app into a client (the editor or agent runtime) and servers that expose tools. A web search server is a small process the client starts. It advertises a search-style tool with a JSON schema, the model decides when to call it, and the server returns results the model can read.
Why use MCP instead of calling a search API from your code?
- One config, many clients. The same
command+argsentry works in Claude Code, Cursor, VS Code, Cline and most other MCP hosts. - No glue code. The client handles tool schemas, calls and results.
- The model picks when to search. You don't hard-code a search step; the agent calls the tool when your question needs fresh information.
Prerequisites
- Node.js 20 or newer with
npxon your PATH (node -v). - An MCP client. Any of the ones below, or your own code.
- Nothing else for free search. No key, no account.
Step 1: Run the server once by hand (optional)
npx -y @agentsearchhq/agentsearch-mcp
It prints one line to stderr and then waits for JSON-RPC on stdin. In 1.8.7, with no configuration, that line says search uses the free tier (25 free searches per IP in total) and that Extract and Render run on a free trial. Press Ctrl+C to stop it. Your client will start it the same way. The -y matters: it skips npx's install prompt, which a background process can't answer.
Step 2: Add it to your MCP client
Most clients use an mcpServers object. The server name (agentsearch here) is up to you.
Claude Code (one command):
claude mcp add agentsearch -- npx -y @agentsearchhq/agentsearch-mcp
On native Windows, if npx can't be launched directly, use cmd /c npx -y @agentsearchhq/agentsearch-mcp after the --. Full walkthrough: add web search to Claude Code with MCP.
Cursor (~/.cursor/mcp.json for every project, or .cursor/mcp.json in one repo):
{
"mcpServers": {
"agentsearch": {
"command": "npx",
"args": ["-y", "@agentsearchhq/agentsearch-mcp"]
}
}
}
See add web search to Cursor with MCP.
VS Code (.vscode/mcp.json). Note that VS Code uses servers, not mcpServers:
{
"servers": {
"agentsearch": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@agentsearchhq/agentsearch-mcp"]
}
}
}
See add web search to VS Code Copilot with MCP.
Other hosts (Claude Desktop, Cline, Windsurf-style editors and agent frameworks with an MCP adapter) take the same command and args. Restart or refresh the client after you save the file.
Step 3: Check the tools
Once connected, the server lists eight tools in 1.8.7:
| Tool | What it does | With no config |
|---|---|---|
agentsearch_web_search |
Live web search, 1–5 results with title, URL and a text passage | Free tier: 25 searches per IP in total |
agentsearch_search_and_read |
Searches, then returns the top pages as markdown in one call | 10 free calls per IP in total |
agentsearch_news_search |
Recent news results | 10 free calls per IP in total |
agentsearch_extract |
Any URL to clean markdown or text | Free trial: 5 calls/day per IP |
agentsearch_render |
Loads JavaScript-heavy pages in a headless browser | Free trial: 3 calls/day per IP |
agentsearch_screenshot |
Page screenshots | 10 free calls per IP in total |
agentsearch_review_lookup / agentsearch_review_submit |
Read and post short reviews of agent web tools | Free |
Every tool except agentsearch_review_submit is marked readOnlyHint: true in its MCP annotations, which helps clients that auto-approve read-only tools.
Here's a trimmed result from a real call we made with max_results: 2:
{
"query": "windsurf mcp_config.json location",
"result_count": 2,
"results": [
{
"title": "Cascade MCP Integration - Windsurf Plugins",
"url": "https://docs.devin.ai/windsurf/plugins/cascade/mcp",
"content": "The editor's MCP discovery uses a separate, build-specific file: ~/.codeium/windsurf/mcp_config.json ...",
"domain": "docs.devin.ai"
},
{
"title": "Filesystem - MCP Server | Windsurf Directory",
"url": "https://windsurf.run/mcp/filesystem",
"content": "Create a JSON file at ~/.codeium/windsurf/mcp_config.json ...",
"domain": "windsurf.run"
}
]
}
Results are passages, not whole pages. When the agent needs the page itself, it calls Extract on the best URL, or uses Search + Read to get both in one step.
Step 4: Call the MCP web search server from your own code
You don't need an editor to use an MCP server. Any agent can be an MCP client. This is the script we ran with @modelcontextprotocol/sdk 1.32.2:
npm i @modelcontextprotocol/sdk
// search.mjs
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "npx",
args: ["-y", "@agentsearchhq/agentsearch-mcp"],
});
const client = new Client({ name: "my-agent", version: "1.0.0" });
await client.connect(transport);
const { tools } = await client.listTools();
console.log(tools.map((t) => t.name));
const res = await client.callTool({
name: "agentsearch_web_search",
arguments: { query: "model context protocol stdio transport", max_results: 3 },
});
const data = JSON.parse(res.content[0].text);
for (const r of data.results) console.log(r.title, "-", r.url);
await client.close();
node search.mjs
Our run printed the eight tool names, then three results, starting with the MCP specification's transports page. To hand the tools to an LLM, pass each tool's name, description and inputSchema from listTools() to your model's tool-calling API, and route the model's tool calls back through client.callTool.
Using a framework instead? Most have an MCP adapter, and some have a dedicated package: LangChain (Python) with langchain-agentsearch, CrewAI with crewai-agentsearch, the OpenAI Agents SDK with openai-agents-agentsearch, and Mastra through its MCP client.
The tool's inputs
agentsearch_web_search needs only query (at least 2 characters). max_results takes 1–5 (default 5; values outside that are clamped). Paid searches also accept filters: freshness (day, week, month, year) or date_from/date_to in YYYY-MM-DD, country (two-letter code), language, and include_domains / exclude_domains.
A good system prompt line for agents that use it:
When the answer depends on current information (versions, prices, news, docs), call agentsearch_web_search first and cite the URLs you used. Read a page with agentsearch_extract only when the passage isn't enough.
Step 5 (optional): Pay per call over x402
When the free allowance runs out, the tool returns a message explaining how to upgrade. Paid calls go to AgentSearch's own x402 API, paid in USDC on Base, with no signup, no API key and no minimums. Current per-call prices from the live pricing endpoint:
- Search: $0.003
- News: $0.003
- Extract: $0.002
- Search + Read: $0.005 (one payment for search plus the top pages as markdown)
- Render is for pages that only show content after JavaScript runs; see pricing.
To turn it on, create a new, dedicated wallet with a small amount of USDC on Base and pass its key in the server's env:
{
"mcpServers": {
"agentsearch": {
"command": "npx",
"args": ["-y", "@agentsearchhq/agentsearch-mcp"],
"env": {
"AGENTSEARCH_WALLET_PRIVATE_KEY": "0xYOUR_DEDICATED_WALLET_KEY",
"AGENTSEARCH_MODE": "paid",
"AGENTSEARCH_MAX_TOTAL_ATOMIC": "50000"
}
}
}
}
How the settings combine in 1.8.7:
- Wallet key alone makes Extract and Render paid. Search, news, Search + Read and screenshots stay on their free allowances.
- Wallet key plus
AGENTSEARCH_MODE=paidmakes search and the other tools paid too. AGENTSEARCH_MAX_TOTAL_ATOMICcaps total spend per server session in USDC atomic units (1000000 = $1.00), so50000is $0.05. The default cap is $1.00.AGENTSEARCH_MAX_PER_CALL_ATOMICcan lower the per-call ceiling (never raise it).AGENTSEARCH_FREE_TRIAL=0turns off the Extract/Render free trial if you want no unpaid calls.
The server checks every limit before it signs: the scheme, USDC on Base, the pinned payee, the per-call ceiling and the session cap. It signs once, and the API settles only after a successful, non-empty answer. New to this payment flow? Read x402 pay-per-call APIs for AI agents.
Keep the key out of version control. Put paid config in your user-level file, not a project file you commit.
Troubleshooting
- The server doesn't show up. Run
npx -y @agentsearchhq/agentsearch-mcpin a terminal. If that fails, checknode -v(20+) and thatnpxis on the PATH your client uses. GUI apps on macOS sometimes don't see your shell's PATH; use the full path tonpx. - VS Code ignores the file. Use
servers, notmcpServers, in.vscode/mcp.json. - Searches stop working. You've likely used the 25 free searches for your IP. The tool's message explains the upgrade; add a wallet and
AGENTSEARCH_MODE=paid. - Extract returns little text. The page probably needs JavaScript. Try
agentsearch_render, or Search + Read withrender_fallback: true. - Too many tools for your client. Some clients limit tool counts. Most let you turn off single tools in their MCP settings.
FAQ
Is this MCP web search server free?
Search is free for 25 searches per IP in total, then pay per call ($0.003 per search). The free allowance is a lifetime total, not a daily one.
Do I need an API key?
No. Free search needs no key or account. Paid calls use an x402 payment from your own wallet, still with no signup.
Which MCP clients does it work with?
Any client that runs stdio servers: Claude Code, Claude Desktop, Cursor, VS Code, Cline and agent frameworks with an MCP adapter. We tested it directly with the official TypeScript SDK.
Can it read full pages, not just results?
Yes. agentsearch_extract turns a URL into markdown, and agentsearch_search_and_read returns the top pages as markdown in one call. See web search API with full page content.
Where's the source and listing?
The package is @agentsearchhq/agentsearch-mcp on npm, and it's also listed on Smithery and Glama.
Next steps
- Try a research loop: Claude Code web research workflow with MCP
- Read JavaScript-heavy pages: read JavaScript pages from an AI agent
- Check prices any time: pricing
More from the blog
- How to Add Free Web Search to Claude Code with MCP (No API Key)
- How to Add Free Web Search to Cursor with MCP (No API Key)
- How to Add Free Web Search to VS Code Copilot Agent Mode with MCP (No API Key)
- Free Remote MCP Server for Web Search: Hosted, No Install, No API Key
- Web Search API With Full Page Content: Search and Read in One Call (Free, No API Key)
Service pages: Web Search API · Web Extract API · Web Render API · Search + Read API