How to Add Web Search to Roo Code (and Kilo Code) with MCP
Roo Code and Kilo Code are both VS Code coding agents that grew out of Cline. They can read your repo, edit files and run commands, but they can't look anything up on the live web: a library release from last week, a changelog, a fresh answer to the error you're staring at. Both get new tools through the Model Context Protocol (MCP), so the fix is one config entry. This guide adds Roo Code web search (and the Kilo Code equivalent) with the AgentSearch MCP server.
Search works right away with no API key, no signup and no wallet: 25 free searches per IP in total, then pay per call. The 25 is a lifetime allowance, not a daily one, and it never resets.
First, a note on Roo Code itself. The Roo Code team shut the extension down on May 15, 2026. Its GitHub repository is archived (last release 3.54.0), the VS Code Marketplace listing is gone, and the README points users to Zoo Code, a community fork that keeps the same MCP setup, and to Cline. If Roo Code is still installed, the steps below work in it as they are. If you're installing today, install Zoo Code (VS Code Marketplace or Open VSX): it reads the same mcp_settings.json and .roo/mcp.json files, so everything in the Roo Code section applies unchanged. Kilo Code is a separate, active project with its own config format, covered further down.
What we actually ran (November 27, 2026): @agentsearchhq/agentsearch-mcp 1.8.7 (npm latest) on Linux with Node 24. For Roo Code and Zoo Code, we checked both JSON files below against the settings schema in Zoo Code's source (3.98.2, the same schema as Roo Code 3.54.0), then started the server the way their MCP hub does (stdio, with the default minimal environment plus the entry's env), listed its tools and made one real free search. For Kilo Code, we loaded the exact kilo.jsonc blocks below in the Kilo CLI 7.8.40 (@kilocode/cli, the same config files the Kilo VS Code extension reads): kilo mcp list showed the server as connected, and kilo debug config showed the paid block resolving. We did not click through the VS Code extensions or run a model.
What the agent gets (and what it costs)
The server exposes eight tools, all of which we saw in the tool list:
agentsearch_web_search, agentsearch_extract, agentsearch_search_and_read,
agentsearch_news_search, agentsearch_render, agentsearch_screenshot,
agentsearch_review_lookup, agentsearch_review_submit
For coding research, three matter most:
| Tool | What it does | Cost |
|---|---|---|
agentsearch_web_search |
Live web search, up to 5 results with title, URL and a text snippet | 25 free searches per IP in total (never resets), then $0.003 per call |
agentsearch_extract |
Any public URL as clean markdown | Free trial: 5 a day per IP, then $0.002 per call |
agentsearch_search_and_read |
Search plus the page text of the top hits, in one call | 10 free calls per IP in total, then $0.005 per call |
There's no account and no API key at any tier, and no minimum spend. Paid calls use x402: the API answers with a 402 and a price, the MCP server signs a small USDC payment on Base, and you're only charged when a usable answer comes back. The other tools cover news, JavaScript-heavy pages (Web Render), screenshots and a free board of agent-written reviews of web tools. Every tool except agentsearch_review_submit is marked read-only in its MCP annotations.
Before you start
- Roo Code (already installed), Zoo Code, or Kilo Code in VS Code.
- Node.js 20 or newer with
npxon your PATH (node -v), because the server runs withnpx. - A model set up in the extension that supports tool calling. Search itself needs no extra key.
Roo Code and Zoo Code: add the server
Roo Code (and Zoo Code) reads MCP servers from two places:
- Global:
mcp_settings.json, used in every workspace. Open the MCP view from the server icon at the top of the Roo Code pane, scroll down, and click Edit Global MCP. You don't need to know where the file lives on disk. - Project:
.roo/mcp.jsonin your project root. Edit Project MCP in the same view opens it, and creates it if it doesn't exist. Commit it to share the server with your team. If the same server name is in both files, the project file wins.
Both files use the same shape. Paste this in (or add the agentsearch block next to your existing servers, minding the commas):
{
"mcpServers": {
"agentsearch": {
"command": "npx",
"args": ["-y", "@agentsearchhq/agentsearch-mcp"],
"alwaysAllow": ["agentsearch_web_search"],
"disabled": false,
"timeout": 120
}
}
}
What each field does:
commandandargsrunnpx -y @agentsearchhq/agentsearch-mcp. The-yskips npx's install prompt, which nobody can answer for a background process.- There's no
type. For a local server with acommand, Roo defaults to stdio.typeis only required for URL-based servers. alwaysAllowlists tools Roo may run without asking. Search is read-only and free by default, so it's a reasonable one to allow. Leave paid tools out.timeoutis the per-call timeout in seconds (1 to 3600, default 60). 120 gives slow pages room if you later use Render.disabled: falsekeeps it on. Flip it totrue(or use the toggle in the MCP view) to keep the entry without starting the server.
No env block is needed for free search. Save the file. The server should appear in the MCP view with its tools listed.
Auto-approve has two switches. Roo's docs say per-tool alwaysAllow (the Always allow checkbox next to each tool) only takes effect when the global Use MCP servers auto-approval option is on. If it's off, Roo asks before every MCP call, whatever alwaysAllow says.
Windows. Roo Code's and Zoo Code's MCP hub wraps the command in cmd.exe /c on Windows by itself, so "command": "npx" works there as written. We didn't test on Windows.
Kilo Code: add the server
Kilo Code moved to a new config format with its 7.x releases. The old files are only converted on load now: per Kilo's migration notes, the VS Code extension (and Kilo's background daemon) still converts the global mcp_settings.json, and the CLI converts a project .kilocode/mcp.json. New setups should skip the old format (our Kilo Code post covers 7.x in detail). MCP servers now live in Kilo's main config file under a top-level mcp key, and the CLI and the VS Code extension read the same files:
- Global:
~/.config/kilo/kilo.jsonc(on Windows,C:\Users\<you>\.config\kilo\kilo.jsonc). - Project:
.kilo/kilo.jsoncin your project root (orkilo.jsoncat the root). Project settings take precedence.
In the extension you can also go to Settings → Agent Behaviour → MCP Servers. Here's the entry:
{
"$schema": "https://app.kilo.ai/config.json",
"mcp": {
"agentsearch": {
"type": "local",
"command": ["npx", "-y", "@agentsearchhq/agentsearch-mcp"],
"enabled": true,
"timeout": 60000
}
}
}
Note the differences from Roo: mcp instead of mcpServers, "type": "local", the command and its arguments in one array, enabled instead of disabled, environment instead of env, and timeout in milliseconds. The 60 seconds here gives the first npx run time to download the package. With this file as .kilo/kilo.jsonc, kilo mcp list printed:
✓ agentsearch connected
npx -y @agentsearchhq/agentsearch-mcp
Permissions in Kilo. MCP tools use Kilo's normal permission system, and each tool's key is {server}_{tool}. With the server named agentsearch, search is agentsearch_agentsearch_web_search. Click Approve Always when Kilo asks, or add a rule to your config:
"permission": {
"agentsearch_agentsearch_web_search": "allow"
}
Use it
Ask something the agent can't know from your code:
Search the web for the latest release notes of the HTTP client we use,
read the changelog page, and tell me if anything breaks our usage. Cite the URLs.
The model sees each tool's own description and arguments: query, max_results, freshness, include_domains and more for search; url and max_chars for extract. A good pattern is to search first and then read only the page you need.
Here's what one real free search through the server returned for Kilo Code MCP servers kilo.jsonc with max_results: 3 (trimmed):
{
"query": "Kilo Code MCP servers kilo.jsonc",
"result_count": 3,
"results": [
{
"title": "Using MCP in Kilo Code",
"url": "https://kilo.ai/docs/automate/mcp/using-in-kilo-code",
"content": "MCP server configurations are stored inside the main Kilo config file. There are two levels: Global Configuration: ~/.config/kilo/kilo.jsonc ...",
"domain": "kilo.ai"
},
{
"title": "Using MCP in CLI",
"url": "https://kilo.ai/docs/automate/mcp/using-in-cli",
"domain": "kilo.ai"
},
{
"title": "MCP Overview",
"url": "https://kilo.ai/docs/automate/mcp/overview",
"domain": "kilo.ai"
}
]
}
Results are snippets, not whole pages. For full pages, use Extract or Search + Read.
Going past the free tier: pay per call with x402
When the 25 free searches are used up, add a wallet. Use a new, dedicated wallet holding a few dollars of USDC on Base, never your main one. The MCP server reads these environment variables:
| Variable | What it does |
|---|---|
AGENTSEARCH_WALLET_PRIVATE_KEY |
Key of the dedicated wallet. Turns on the paid tools. |
AGENTSEARCH_MODE=paid |
Also makes search paid ($0.003 per call). A wallet key alone keeps search on the free tier. |
AGENTSEARCH_MAX_TOTAL_ATOMIC |
Spend cap per server session in USDC atomic units (default 1000000, which is $1.00). |
AGENTSEARCH_MAX_PER_CALL_ATOMIC |
Optional lower cap per call. |
Roo Code / Zoo Code. Put the variables in the entry's env block, in the global mcp_settings.json, never in a committed .roo/mcp.json:
{
"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": "200000"
},
"alwaysAllow": ["agentsearch_web_search"],
"disabled": false,
"timeout": 120
}
}
}
The env block matters. In Roo's and Zoo's source, a stdio server starts with only a minimal default environment (things like HOME, PATH and USER) plus the entry's env, so a variable you export in your shell does not reach the server by itself. The source also replaces ${env:NAME} anywhere in the entry with the variable from the environment VS Code itself was started with, so "AGENTSEARCH_WALLET_PRIVATE_KEY": "${env:AGENTSEARCH_WALLET_PRIVATE_KEY}" works when VS Code was launched from a shell that has it set. The 200000 cap is $0.20 per session.
Kilo Code. Use environment in your global ~/.config/kilo/kilo.jsonc. Kilo resolves {env:NAME} there, so the key can stay in your shell:
{
"$schema": "https://app.kilo.ai/config.json",
"mcp": {
"agentsearch": {
"type": "local",
"command": ["npx", "-y", "@agentsearchhq/agentsearch-mcp"],
"environment": {
// read from your shell, so the key never sits in this file
"AGENTSEARCH_WALLET_PRIVATE_KEY": "{env:AGENTSEARCH_WALLET_PRIVATE_KEY}",
"AGENTSEARCH_MODE": "paid",
"AGENTSEARCH_MAX_TOTAL_ATOMIC": "200000"
},
"enabled": true,
"timeout": 60000
}
},
"permission": {
"agentsearch_agentsearch_web_search": "allow"
}
}
Live prices on November 27, 2026, from AgentSearch's own x402 API at api.agentsearchhq.com: search $0.003, news $0.003, extract $0.002, search-and-read $0.005, paid in USDC on Base. No signup, no API key, no minimums. We checked the variable names against the package README and loaded this Kilo block with a dummy key in kilo debug config. We didn't run a paid call for this post. New to per-call payments? Read x402 pay-per-call APIs for AI agents.
Gotchas we hit
Kilo skipped the whole project file over one {env:} line. We first put the paid block in .kilo/kilo.jsonc. The CLI logged ConfigInvalidError skipped config due to error and loaded no MCP servers at all. Kilo treats project config files as untrusted and only resolves {env:} in your global config. The same block in ~/.config/kilo/kilo.jsonc loaded and resolved the key. Keep wallet settings global, and keep project files to the free block.
Old Kilo examples use the old format. Configs with mcpServers, args and disabled were written for the legacy Kilo extension. Kilo 7.x only converts those files as a migration step (see above), so convert them yourself: mcpServers → mcp, command + args → one command array, env → environment, disabled: false → enabled: true.
Troubleshooting
Run the server by itself. Run npx -y @agentsearchhq/agentsearch-mcp in a terminal. A healthy server prints a line starting agentsearch-mcp listening on stdio to stderr and waits (Ctrl+C to stop). On npx: command not found or an engine error, install Node.js 20+. With nvm or similar, put the full path to npx in command.
Server shows as failed or timed out in Kilo. The first npx run downloads the package. Raise timeout (milliseconds), or install the package globally (npm i -g @agentsearchhq/agentsearch-mcp) and use "command": ["agentsearch-mcp"].
No tools in Roo or Zoo. Check the file is valid JSON (a trailing comma breaks it), that disabled isn't true, and that Enable MCP Servers is checked in the MCP view.
HTTP 429 from search or extract. You've used the free allowance: the 25 lifetime searches for your IP, the 10 lifetime search-and-read calls, or the daily extract trial (5). Add a wallet as shown above to keep going.
Wallet set but search still free. That's expected. Search only switches to paid with AGENTSEARCH_MODE=paid.
FAQ
Does Roo Code web search need an API key?
Not with this setup. The AgentSearch MCP server gives you 25 free searches per IP in total with no key, account or wallet, then you pay per call over x402. You still need whatever key your chat model uses.
Is Roo Code still maintained?
No. The Roo Code team shut the extension down on May 15, 2026 and archived the repository. Existing installs keep reading their MCP config, and Zoo Code, the community fork the Roo Code README points to, uses the same mcp_settings.json and .roo/mcp.json files, so this guide applies to it unchanged.
Can I reuse my Roo Code MCP config in Kilo Code?
Not as is. Kilo Code 7.x uses kilo.jsonc with a top-level mcp key, a single command array, environment, enabled and a timeout in milliseconds. Convert the entry as shown in the Kilo section above.
Should I auto-approve the search tool?
That's up to you. Search is read-only and free by default, so many people allow agentsearch_web_search (in Roo with alwaysAllow plus the global Use MCP servers switch, in Kilo with a permission rule). Keep paid tools on manual approval.
Is it safe to let the agent read web pages?
Treat web content as untrusted input, because a page can contain text written to steer an AI. Keep approval on for edits and commands, and review what the agent proposes after it reads external pages.
Next steps
- How to add free web search to Cline, the project Roo Code was forked from.
- How to add free web search to OpenCode, whose config format Kilo's new
kilo.jsoncfollows closely. - How to add free web search to Continue (VS Code/JetBrains).
- How to add free web search to VS Code Copilot agent mode.
- All clients on the AgentSearch MCP page.
Paste the agentsearch block into mcp_settings.json (Roo Code or Zoo Code) or kilo.jsonc (Kilo Code), check that the tools show up, and ask the agent about something that changed last week. You get 25 free searches per IP in total with no key, then $0.003 per paid search.
More from the blog
- Add Free Web Search to Cline with MCP
- Add Free Web Search to OpenCode with MCP
- Add Free Web Search to Continue with MCP
- Add Free Web Search to VS Code Copilot with MCP
Service pages: Web Search API · Web Extract API · Search + Read API · Web Render API