Skip to content
AgentSearch

How to Add Free Web Search to Zed with MCP (No API Key)

Zed is a fast open-source code editor with a built-in AI agent, the Zed Agent in the Agent Panel. Like other agentic editors, it can use extra tools from MCP servers. Zed calls them context servers. An MCP search tool lets the agent look things up on the live web and read full pages when it needs them, and the same server works in your other MCP clients too.

We use AgentSearch, which ships as the @agentsearchhq/agentsearch-mcp package on npm and also runs as a free hosted remote MCP server. You don't need an API key, an account, or a wallet:

Free tier: 25 free searches per IP, then pay per call. No key needed.

What we tested: on November 25, 2026 we ran Zed 1.29.3 (the current stable release) on Linux with a fresh settings folder and no Zed sign-in. We added both servers below, checked that Zed showed each one as "Server is active", and used the Add Remote Server form to see what it writes to settings.json. We also listed the tools of @agentsearchhq/agentsearch-mcp 1.8.7 (the current npm release) and called the hosted server directly. We did not connect a model provider, so we did not run a full agent conversation; the steps for that part are quoted from Zed's MCP docs and tool permissions docs.

Why add an MCP search tool?

  • Raw results. AgentSearch returns ranked results (title, URL, snippet, domain) as JSON, so the agent picks what to open.
  • Full pages. agentsearch_extract turns a URL into clean markdown, and agentsearch_render loads JavaScript-heavy pages in a headless browser first.
  • News and screenshots. Dated news results and page screenshots are separate tools.
  • Search + read in one call. agentsearch_search_and_read returns the top results with each page as markdown.
  • One setup for every client. The same server works in Cursor, Claude Code, Cline, VS Code and other MCP clients.

Where Zed keeps MCP servers

Zed stores MCP servers in the context_servers object of your user settings file. Per Zed's settings docs, that file is at:

OS User settings file
macOS ~/.config/zed/settings.json
Linux ~/.config/zed/settings.json (or $XDG_CONFIG_HOME/zed/settings.json)
Windows %APPDATA%\Zed\settings.json

Open it from the command palette with zed: open settings file. The file is JSON with support for // comments. You can also skip the file and use the settings UI: open Settings > AI > MCP Servers (or run agent: open settings and pick MCP Servers), click Add Server, and choose Add Local Server or Add Remote Server. The UI writes the same context_servers entries.

Option A: Add the local MCP server

In your user settings file, add:

{
  "context_servers": {
    "agentsearch": {
      "command": "npx",
      "args": ["-y", "@agentsearchhq/agentsearch-mcp"],
      "env": {}
    }
  }
}

If the file already has settings, add only the context_servers key (or the agentsearch entry inside your existing context_servers object). The -y flag skips npx's install prompt, which a background process can't answer. The server runs on your machine as a local process over stdio. You need Node.js 20 or newer.

In the settings UI, Add Local Server asks for the same things: Server Name (agentsearch), Command (npx), Arguments (space-separated: -y @agentsearchhq/agentsearch-mcp), optional Environment Variables and a Timeout in seconds.

Option B: Use the hosted server (no Node.js)

AgentSearch runs a free hosted remote MCP server at https://relay.agentsearchhq.com/mcp. It uses the Streamable HTTP transport and needs no sign-in, so there are no headers:

{
  "context_servers": {
    "agentsearch-hosted": {
      "url": "https://relay.agentsearchhq.com/mcp"
    }
  }
}

With the UI, choose Add Remote Server, enter a Server Name and the URL, and leave Headers, Timeout and OAuth Client ID as they are. In our test, saving the form wrote this entry:

"agentsearch-hosted": {
  "enabled": true,
  "url": "https://relay.agentsearchhq.com/mcp"
}

"enabled": true is the default, so the shorter block above does the same thing. Zed's docs note that when a remote server has no Authorization header, Zed may start the standard MCP OAuth flow. The AgentSearch relay doesn't ask for OAuth, and in our test the server became active without any sign-in prompt.

Pick one option. If you add both, the agent sees two copies of each tool.

Step 2: Check the connection

Open Settings > AI > MCP Servers. Each server is listed under Configured Servers with a toggle and a small indicator dot. Per Zed's docs, a green dot with the tooltip "Server is active" means it is running. In our test both agentsearch and agentsearch-hosted showed a green dot and "Server is active" a few seconds after Zed started. Other colors and tooltips tell you what's wrong.

If the local server isn't green on the first run, the first npx run may still be downloading the package. Run npx -y @agentsearchhq/agentsearch-mcp once in a terminal (it prints a "listening on stdio" line; press Ctrl+C), then turn the server off and on again with its toggle.

The local server (Option A) gives the agent these tools:

  • agentsearch_web_search: web search that returns up to 5 results (title, URL and a snippet). 25 free calls per IP.
  • agentsearch_news_search, agentsearch_search_and_read and agentsearch_screenshot: news with publish dates, search plus the top pages as markdown in one call, and page screenshots. 10 free calls per IP each.
  • agentsearch_extract: reads a URL and returns clean markdown or text. Free trial of 5 calls a day per IP.
  • agentsearch_render: loads a JavaScript-heavy page in a headless browser first, then returns its content. Free trial of 3 calls a day per IP.
  • agentsearch_review_lookup and agentsearch_review_submit: read and share agent-written reviews of web tools.

The hosted server (Option B) has the first six tools with the same free limits. The search, news, search + read and screenshot allowances are totals per IP and don't reset. The extract and render trials reset daily.

Step 3: Try it

Open the Agent Panel, start a new thread with the Zed Agent, and ask for something that needs current information:

Search the web for the latest stable release of Vite and tell me if our package.json is behind.
Use agentsearch to find the official migration guide for Express 5, then list the breaking changes that affect src/server.ts.
Find the changelog for the newest TypeScript release and extract the section on breaking changes.

By default Zed asks for approval before it runs any tool action, MCP tool calls included. Zed's docs say how reliably MCP tools get called varies from model to model, and that mentioning the server by name ("use agentsearch to...") helps. Search results are snippets. When the agent needs the whole page, it can call agentsearch_extract, or agentsearch_render for pages built with JavaScript.

Tool permissions and profiles

Pre-approve the search tool. In Zed v0.224.0 and later, approvals are controlled by agent.tool_permissions. The default is "confirm". MCP tools use the key format mcp:<server>:<tool_name>, so to let the agent search without a prompt while every other tool still asks:

{
  "agent": {
    "tool_permissions": {
      "tools": {
        "mcp:agentsearch:agentsearch_web_search": {
          "default": "allow"
        }
      }
    }
  }
}

Zed's docs say the per-tool default key is the main control for MCP tools, because pattern rules match against an empty string for them. Keep the prompts on for tools that read whole pages unless you have a reason not to.

Hide tools you don't need. Zed's context_servers entries have no list of disabled tools, but an agent profile can turn individual MCP tools on or off. This profile keeps a few built-in tools and only the AgentSearch search and page tools (the two review tools stay off):

{
  "agent": {
    "profiles": {
      "web-research": {
        "name": "Web Research",
        "tools": {
          "read_file": true,
          "grep": true,
          "edit_file": false,
          "terminal": false
        },
        "enable_all_context_servers": false,
        "context_servers": {
          "agentsearch": {
            "tools": {
              "agentsearch_web_search": true,
              "agentsearch_news_search": true,
              "agentsearch_search_and_read": true,
              "agentsearch_extract": true,
              "agentsearch_render": true,
              "agentsearch_screenshot": true
            }
          }
        }
      }
    }
  }
}

The structure follows the profile example in Zed's MCP docs. Pick it with the profile selector in the Agent Panel's message box when you want a research-only agent.

Timeout. Tool calls time out after 60 seconds by default. The MCP Server Timeout field under Settings > AI > MCP Servers changes it for all servers, and each server also takes its own Timeout in seconds. Renders of heavy pages can take a while, so raise it if you see timeouts.

Using an external agent in Zed?

Zed can also run external agents (such as Claude Agent or Codex) over the Agent Client Protocol. According to Zed's docs, MCP servers configured in Zed may be forwarded to them over ACP, and those agents may also read their own native MCP config. If a tool doesn't show up in an external agent, check both places. Terminal threads, where a CLI runs in Zed's terminal, use that CLI's own MCP config. For those, see our guides for Claude Code, Codex CLI or Gemini CLI.

Optional: pay per call with a wallet

When you need more than the free allowance, the local server can pay per call in USDC on Base over x402, with no account and no API key. Paid calls go to AgentSearch's direct x402 API: search and news $0.003, extract $0.002, render $0.005, search + read $0.005, screenshot $0.004. See pricing for details. Calls are settled only after a successful answer.

Use a new, dedicated wallet that holds only a small amount of USDC. The wallet setup guide walks through it. With release 1.8.7, a wallet key makes extract and render paid once their free trial is used up. Search, news, search + read and screenshots stay on the free tier unless you also set AGENTSEARCH_MODE=paid.

Put the key in the env block of the server entry in your user settings file:

{
  "context_servers": {
    "agentsearch-paid": {
      "command": "npx",
      "args": ["-y", "@agentsearchhq/agentsearch-mcp"],
      "env": {
        "AGENTSEARCH_WALLET_PRIVATE_KEY": "0xYOUR_DEDICATED_WALLET_KEY",
        "AGENTSEARCH_MAX_TOTAL_ATOMIC": "50000"
      }
    }
  }
}

If you sync or share your Zed settings file, the key goes with it, so keep this entry out of any dotfiles repo.

Spend caps. The server checks these before it signs anything:

  • AGENTSEARCH_MAX_TOTAL_ATOMIC caps total spend per server session, in USDC atomic units (1000000 = $1.00). The default is $1.00; the example sets $0.05.
  • AGENTSEARCH_MAX_PER_CALL_ATOMIC lowers the per-call ceiling (the default ceiling is $0.020).

When a cap is reached, the tool returns a message saying nothing was signed instead of paying.

Troubleshooting

The indicator isn't green. Hover the dot for the reason. Then run zed: open log from the command palette to see the last lines of Zed's log. On Linux the full log is at ~/.local/share/zed/logs/Zed.log, on macOS ~/Library/Logs/Zed/Zed.log, and on Windows C:\Users\YOU\AppData\Local\Zed\logs\Zed.log.

npx: command not found or an engine error. The local server needs Node.js 20 or newer with npx on the PATH Zed sees. Install Node.js and restart Zed, or use the hosted server (Option B).

The agent never calls the tool. Name the server in the prompt ("use agentsearch to..."), or switch to a profile that only has the AgentSearch tools on, as shown above.

Extract or Render says a wallet is needed. The free trial for the day is used up (5 extracts, 3 renders per IP), or you set AGENTSEARCH_FREE_TRIAL=0. Nothing was charged. Add a wallet server or wait for the next day.

Search says it needs payment. The 25 free searches for your IP are used up. Add a wallet and set AGENTSEARCH_MODE=paid, or call the direct x402 API from your own code.

FAQ

Do I need an API key to add web search to Zed?

No. The agentsearch entry in context_servers (npx -y @agentsearchhq/agentsearch-mcp) needs no key, account or wallet. You get 25 free searches per IP, then pay per call.

What are context servers in Zed?

Context servers are what Zed calls MCP servers. You add them under context_servers in settings.json, from Settings > AI > MCP Servers, or as Zed extensions.

Where is the Zed MCP config file?

There is no separate MCP file. MCP servers live in your user settings file: ~/.config/zed/settings.json on macOS and Linux, %APPDATA%\Zed\settings.json on Windows. Open it with zed: open settings file.

Does Zed support remote MCP servers?

Yes. Add an entry with "url", and "headers" if the server needs them. AgentSearch's hosted server at https://relay.agentsearchhq.com/mcp needs no headers and no sign-in.

How much do paid calls cost?

On the direct x402 API: search and news $0.003, extract $0.002, render $0.005, search + read $0.005 and screenshot $0.004 per call, in USDC on Base. You pay only after the free allowance is used up.

Is it safe to let the agent read web pages?

Treat web content as untrusted input. A page can contain text written to steer an AI. Keep Zed's tool approval prompts on for web tools and review what the agent proposes after reading external pages.

Get started

Add the agentsearch block to context_servers in your Zed settings file, check for the green "Server is active" dot under Settings > AI > MCP Servers, and ask the agent about something that changed last week. No Node.js? Use the hosted remote MCP server instead. Using other editors too? See How to Add Free Web Search to Cursor with MCP and How to Add Free Web Search to Windsurf with MCP. Setup for other clients is on the MCP page.

More from the blog

Service pages: Web Search API · Web Extract API · Web Render API