DEV Community

AgentSearch
AgentSearch

Posted on Originally published at agentsearchhq.com

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

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

Cline can edit files and run commands, but it can't check today's docs or a fresh error thread unless you give it a tool. This guide adds Cline MCP web search with one entry in cline_mcp_settings.json, with no API key and no signup. Here's the whole setup:

{
  "mcpServers": {
    "agentsearch": {
      "command": "npx",
      "args": ["-y", "@agentsearchhq/agentsearch-mcp"],
      "disabled": false,
      "autoApprove": []
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

That entry runs AgentSearch, the @agentsearchhq/agentsearch-mcp package on npm, which is also listed in the official MCP Registry as io.github.agentsearchhq-coder/agentsearch-mcp. It gives Cline a free agentsearch_web_search tool:

Free tier: up to 25 searches/day per IP, no key needed (shared daily capacity; paid calls have no cap).

What we tested: we ran @agentsearchhq/agentsearch-mcp 1.3.5 (npm latest) on Linux with Node.js 20 over raw stdio to list its tools. We loaded the config above with the Cline CLI 3.0.74 (npm i -g cline), which reads the same cline_mcp_settings.json format, and drove it with a stub model so we could watch Cline start the server, offer the tools, and run a real free search. We also checked the no-wallet and spend-cap messages for Extract and Render, plus disabled and timeout. We didn't click through the VS Code extension; the panel steps below come from Cline's documentation.

Using a different editor? See add web search to Cursor with MCP or add web search to Claude Code with MCP.

Prerequisites

  • Cline installed: the VS Code extension, or the CLI (npm i -g cline).
  • Node.js 20 or newer with npx on your PATH (node -v). The server's package requires Node 20+.
  • A model set up in Cline. Search doesn't need any extra key.

Step 1: Open cline_mcp_settings.json

In the VS Code extension, Cline's docs give this path:

  1. In the Cline panel, click the MCP Servers icon (the stacked server icon in the top toolbar).
  2. Open the Configure tab.
  3. Click Configure MCP Servers near the bottom.

That opens the MCP settings JSON the extension uses. You don't need to know where the file lives on disk.

In the Cline CLI, the file is ~/.cline/data/settings/cline_mcp_settings.json. You can point the CLI at a different file with the CLINE_MCP_SETTINGS_PATH environment variable.

Step 2: Add the AgentSearch server

Paste the agentsearch block from the top of this post inside mcpServers. If the file already lists servers, add the block next to them and mind the commas.

  • agentsearch is the server name Cline shows in its panel and CLI.
  • command and args run npx -y @agentsearchhq/agentsearch-mcp. The -y skips npx's install prompt, which nobody can answer for a background process.
  • There's no type field. Cline's docs describe a local stdio server as command plus args; type only matters for remote URL servers.
  • disabled: false keeps the server on. autoApprove: [] means Cline asks before every call (more on that in Step 4).

No env block is needed for free search. Save the file.

CLI shortcut. The Cline CLI can write the entry for you:

cline mcp add agentsearch --yes -- npx -y @agentsearchhq/agentsearch-mcp
Enter fullscreen mode Exit fullscreen mode

In our test, that wrote an equivalent entry (with command and args nested under a transport object), and cline config mcp --json listed it as "transportType":"stdio","disabled":false.

Step 3: Check that Cline sees the tools

In the extension, the server should appear in the MCP Servers panel. Cline's docs say you can enable or disable servers, restart unresponsive ones, and set request timeouts from MCP settings.

The server offers five tools:

  • agentsearch_web_search: web search that returns up to 5 results (title, URL, and a passage of page text). Free with no configuration.
  • agentsearch_extract: reads a URL and returns clean markdown or text. Paid; needs a wallet.
  • agentsearch_render: loads a JavaScript-heavy page in a headless browser and returns markdown, text, HTML, links, or a screenshot. Paid; needs a wallet.
  • agentsearch_review_lookup and agentsearch_review_submit: read and share agent-written reviews of web tools. Free.

In our CLI run, Cline offered these to the model with the server name as a prefix, for example agentsearch__agentsearch_web_search. Here's a trimmed result from the real search Cline ran through it with max_results: 2:

{
  "query": "cline mcp settings",
  "result_count": 2,
  "results": [
    {
      "title": "MCP",
      "url": "https://docs.cline.bot/mcp/mcp-overview",
      "content": "Add, configure, and use MCP servers in Cline. In the Cline panel, click the MCP Servers icon. Open the Configure tab...",
      "domain": "docs.cline.bot"
    },
    {
      "title": "Config",
      "url": "https://docs.cline.bot/getting-started/config",
      "content": "Global provider settings, global settings, and MCP settings are stored under ~/.cline/data/settings/ ...",
      "domain": "docs.cline.bot"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Results are passages, not whole pages. For full pages, use Extract and Render.

Step 4: Use it, and decide what to auto-approve

Ask Cline something it can't know from your code:

Search the web for the current stable version of Vite and tell me whether package.json is behind.
Enter fullscreen mode Exit fullscreen mode

Approval in the extension. Cline asks before each MCP tool call unless you allow it. You have two levers:

  • Per tool: list tool names in autoApprove. Cline's docs say to limit autoApprove to safe tools. Search is a good fit, since the server marks it read-only in its MCP annotations:
"autoApprove": ["agentsearch_web_search"]
Enter fullscreen mode Exit fullscreen mode
  • Globally: Cline's Auto Approve settings include a Use MCP servers toggle. The docs recommend leaving it off until you have a specific reason, and warn that YOLO mode auto-approves everything, MCP tools included.

Keep Extract and Render out of autoApprove if you add a wallet, so you see each paid call before it runs. (You may find alwaysAllow in older examples; Cline's current docs use autoApprove.)

Approval in the CLI. The CLI has its own --auto-approve flag, and its help says prompt runs start with auto-approve on. Pass --auto-approve false to review tool calls. In our headless test with --auto-approve false, the search call was held for approval even when we listed it in autoApprove, so for the CLI, rely on the flag.

Step 5 (optional): Turn on paid Extract and Render

Search and Extract cost $0.005 per call on the Pocket Agentic Portal, paid in USDC over x402, with no signup, no API key, and no minimums. Render is for pages that only show their content after JavaScript runs. See pricing for current rates. New to per-call payments? Read x402 pay-per-call APIs for AI agents.

The server pays over x402 with USDC on Base. Give it the key for a new, dedicated wallet that holds only a small amount of USDC. Cline's docs put server variables in an env block:

{
  "mcpServers": {
    "agentsearch": {
      "command": "npx",
      "args": ["-y", "@agentsearchhq/agentsearch-mcp"],
      "env": {
        "AGENTSEARCH_WALLET_PRIVATE_KEY": "0xYOUR_DEDICATED_WALLET_KEY",
        "AGENTSEARCH_MAX_TOTAL_ATOMIC": "50000"
      },
      "disabled": false,
      "autoApprove": ["agentsearch_web_search"],
      "timeout": 120
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Search stays free by default, even with a wallet key. In 1.3.5, the key only turns on paid Extract and Render. agentsearch_web_search stays on the free tier unless you also set AGENTSEARCH_MODE=paid (or auto). We confirmed this through Cline: with a key set and no mode, search still came back free.

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. The count resets when the server restarts.
  • AGENTSEARCH_MAX_PER_CALL_ATOMIC is a per-call ceiling. You can only lower it.

With the cap at 0, Extract through Cline returned Session spend cap reached ... Nothing was signed.

Timeout. timeout is in seconds. Cline's source sets the default to 60 and clamps values to 1–3600. Search answers well inside that; a higher value gives slow pages room when you use Render.

Keep the key in your global settings file, never in a repo. In the CLI, the server also inherited variables from the shell that started cline in our test, so you can export AGENTSEARCH_WALLET_PRIVATE_KEY=... instead of writing it into the file.

For single-page apps, ask for Render instead of Extract. Our guide on reading JavaScript pages from an AI agent explains when you need each.

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.

Invalid JSON. A trailing comma breaks the whole file. The CLI reported Failed to parse MCP settings JSON ... Property name must be a string literal and loaded nothing.

Tools missing. Check that disabled is false. With disabled: true, the CLI kept the entry but offered the model none of its tools.

Enterprise accounts. Admins can restrict MCP servers. If your organization uses an allowlist or blocks local servers, ask them to allow agentsearch.

Windows. We didn't test Windows. If Cline can't start npx there, wrapping it as "command": "cmd" with "args": ["/c", "npx", "-y", "@agentsearchhq/agentsearch-mcp"] is a common fix.

Extract or Render says "No wallet is configured, so no call was made". That's expected without a key. Nothing was charged, and search keeps working.

Search says "AGENTSEARCH_MODE must be one of 'free', 'paid' or 'auto'". Fix the typo or remove the variable. No call is made.

For retry and fallback patterns, see error handling for AI agent web tools.

Other ways to connect

  • Pocket Agentic Portal MCP. An entry running npx -y @pocket-network/agentic-portal-mcp connects Cline to the Pocket Agentic Portal, where AgentSearch is one of the listed services.
  • Plain HTTP. To call search from your own code, see the free web search API page.

More clients are on the AgentSearch MCP page, and MCP web search for AI agents covers the bigger picture.

FAQ

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

No. The config at the top has no key, no account, and no env block. Free tier: up to 25 searches/day per IP, no key needed (shared daily capacity; paid calls have no cap).

Where is cline_mcp_settings.json?

In the VS Code extension, open it from the MCP Servers icon, then the Configure tab, then Configure MCP Servers. For the Cline CLI, it's ~/.cline/data/settings/cline_mcp_settings.json, or whatever CLINE_MCP_SETTINGS_PATH points to.

Should I auto-approve the search tool?

That's up to you. Search is read-only and free by default, so many people add agentsearch_web_search to autoApprove. Keep paid Extract and Render on manual approval.

Does adding a wallet key make search cost money?

Not by default. In 1.3.5, search stays free with a wallet key set. Only AGENTSEARCH_MODE=paid (or auto) makes search a paid call at $0.005. Extract and Render are the calls that use the wallet.

How many results does a search return?

Up to 5 per call. The model can ask for fewer with max_results (1 to 5).

Does it work in the Cline CLI?

Yes. We added it with cline mcp add, listed it with cline config mcp, and ran a real search through the CLI 3.0.74.

Is it safe to let Cline 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 Cline proposes after it reads external pages.

How do I turn it off?

Set "disabled": true (or use the toggle in MCP Servers) to keep the config without starting the server, or delete the block. In the CLI, cline mcp remove agentsearch removes it.

Get started

Paste the agentsearch block into cline_mcp_settings.json, check that the tools show up, and ask Cline about something that changed last week. When you need full pages, add a capped wallet key for Extract and Render. See pricing and the MCP setup page, or browse more guides on the AgentSearch blog.


Originally published on the AgentSearch blog.

Top comments (0)