Web Search in Claude Code, Cursor and Codex: Built-In Search vs. TinyFish

Ninad Pathak
Web Search in Claude Code, Cursor and Codex — TinyFish Insights

Claude Code already has web search built in. Is there ever a use case for another search tool? A recent preprint from UPenn found that 3–13% of the links that LLM search tools cite are hallucinated, meaning they likely never existed, and that 5–18% don’t load at all (the hallucinated links are part of that group).

Users have also reported Claude web search struggling with structured data extraction and entering certain websites. A lot of it comes down to how it navigates the web: not through a live browser, but via search indexes and static HTML fetches, which can fail on JavaScript-rendered sites.

The alternative is a search tool like TinyFish that uses a live browser to find results and even perform actions on the web. Does that make TinyFish better at web search than Claude Code? We’re biased, so you shouldn’t take our word for it. Instead, we ran a benchmark to find out.

We ran five queries about recent developer changes through Claude Code with:

  1. Its built-in WebSearch tool
  2. TinyFish MCP
  3. TinyFish CLI

If you’re a developer wondering whether you need to add a search tool for your everyday work, the results are waiting for you below.

The results, in short

Choose built-in for quick lookups with no setup. It added the least context (about 2.9k tokens, against 4.6k for the CLI and 5.9k for the MCP server). It returned 8 fully correct answers out of 15, behind the CLI and MCP server.

Choose the CLI if you pay for Claude through the API and your agent has a shell. It cost about 26% less per run than built-in and had the most fully correct answers: 13 out of 15.

Choose the MCP server if you want TinyFish’s date and result-type filters. It returned 11 fully correct answers out of 15, finished about 14% faster than built-in and cost about the same. Location and language filters are available in the CLI too, so only the date and result-type filters are exclusive to the MCP server.

Results

Each method was tested on the same five questions, three times each, for 15 runs per method.

Claude Code benchmark: cost $0.147, $0.148, $0.109; fully correct answers 8, 11, 13 of 15; mean context 2,895, 5,904, 4,613 tokens for built-in, TinyFish MCP and CLI. Source dates available in 7, 15, 15 runs. MCP and CLI used 14.2% and 8.5% less time.

The test methods

We ran Claude Code headless on Claude Sonnet 5.5 with the same prompt for every method and restricted each run to a single search tool, with no fetching.

The test. We ran each of the five queries three times per method (built-in, TinyFish MCP and CLI): 15 runs per search tool and 45 runs in total.

The five questions. We picked the following five questions because the search tools gave different answers to them in an initial pre-test run, so the results might better show where the choice of tool matters.

  1. What is the maximum request size for the Claude Messages API?
  2. What is changing for fast mode on Claude Opus 4.8, and what should developers do about it?
  3. I upgraded the Anthropic Python SDK and now get this error: TypeError: Messages.create() got an unexpected keyword argument 'temperature'. What changed, and how do I fix it?
  4. What does an OpenAI API 429 error with the code slow_down mean, and how should I handle it?
  5. After I upgraded to Next.js 16.4, my import.meta.glob results with the base option had different keys, and my code silently broke. What changed?

What we measured, and where each result appears below:

  • Cost per run. The dollar figure Claude Code’s usage counter reports at the end of each run, which prices the model’s tokens at API rates.
  • Accuracy. A separate instance of Claude graded each answer against a fixed list of facts we had checked against official pages beforehand. The grader was not told which search tool produced the answer.
  • Time per run. Seconds for the whole run, as reported by Claude Code’s duration_ms.
  • Dates. Whether the tool associated a date with its facts.
  • Context added. The prompt size of the last search tool call minus a baseline from a one-word prompt, so it shows what searching added over the whole run, including any follow-up searches. Every run is a fresh session, so the figure includes loading the search tool for the first time. The CLI uses the Bash tool, which is already loaded.

The prompt. We asked it to answer a developer query with at most 120 words, a source URL for each key fact and a date only where the source showed one.

Cost: TinyFish is 26% cheaper with API billing

Through the CLI, TinyFish search cost about 26% less per run than the built-in tool: an average of $0.109 per run over 15 runs, against $0.147 for built-in (it was cheaper 14 of 15 times). The MCP server cost $0.148, about the same as built-in.

Mean cost per run: built-in $0.147, TinyFish MCP $0.148 and TinyFish CLI $0.109. CLI costs about 26% less than built-in at API rates.

Cost per run is what Claude Code reported for the model’s tokens at API rates. It applies when you pay per token, for example, when running Claude Code with an API key your team shares. These token costs aren’t billed separately on a Claude subscription, and TinyFish search itself is free within published limits. So, if you’re using the app with a subscription, these per-token costs aren’t a factor for you.

Accuracy and speed

The CLI leads with 13 out of 15 fully correct answers (86.7%), followed by MCP with 11 (73.3%) and built-in with 8 (53.3%). Each method answered five queries three times. The remaining answers are grouped as not fully correct, combining partial and wrong answers.

Fully correct answers: built-in 8 of 15 (53.3%), TinyFish MCP 11 of 15 (73.3%), TinyFish CLI 13 of 15 (86.7%). The remaining 7, 4 and 2 answers are not split into partial and wrong.

The CLI matched or exceeded the other methods on every question. It led outright on Opus fast mode changes and the OpenAI 429 question. MCP and CLI tied on Messages API request size and Next.js glob keys, while all three methods answered the SDK TypeError question correctly in all three runs. This is still a small, selected question set; larger samples are needed to establish how well the pattern generalizes.

Correct answers out of three, in built-in/MCP/CLI order: Messages API size 1/2/2; Opus fast mode 1/2/3; SDK temperature error 3/3/3; OpenAI slow_down 1/1/2; Next.js glob keys 2/3/3.

Time per run was a little better with TinyFish. The MCP server used 14.2% less time than built-in on average, and the CLI used 8.5% less. The CLI’s median run matched built-in’s, so treat its speed gain as small.

Relative mean run time: built-in 100%, TinyFish MCP 85.8% and CLI 91.5%, corresponding to 14.2% and 8.5% less time.

Dates: TinyFish stands out

For context, Claude web search’s built-in tool doesn’t seek out dates. You might still find some in the summaries it returns, though. Meanwhile, TinyFish specifically seeks out dates for its results. According to our November 10, 2026 checks, about 60% to 75% of results come with a date field (187 of 311 links pulled by MCP and 292 of 400 links pulled by the CLI had dates).

The chart below shows how many answers cited a date.

Date citations on all, some or no facts: built-in 0/2/13, TinyFish MCP 5/9/1 and TinyFish CLI 3/11/1. Any date cited in 2, 14 and 14 of 15 answers.

Built-in search pulled up a date in 7 of 15 runs. TinyFish, meanwhile, saw dates in 14 of 15 runs for both the MCP server and the CLI.

The dates didn’t mean fresher sources, however. The average age of sourced URLs for each search tool was 20 days for built-in, 55 days for TinyFish MCP and 35 days for TinyFish CLI.

Context: where built-in wins

We measured context because every token a search adds stays in the session and takes up room that could be used for your code and conversation. Built-in is lighter here. Over a single run, it added about 2.9k tokens on average, against 4.6k for the CLI and 5.9k for the MCP server. TinyFish adds roughly 1.7k to 3.0k more per run. Part of that is how often the model searched: 1.5 times per run with built-in, 2.3 with the MCP server and 2.7 with the CLI. TinyFish’s search output is longer, too (about 8.7k characters for the MCP server and 9.7k for the CLI, against 4.3k for built-in).

To put that in perspective, Anthropic lists the context window for Claude Sonnet 5.5 at 1 million tokens. A single run’s searching took about 0.3% of it with built-in, 0.5% with the CLI and 0.6% with the MCP server. A new Claude Code session also starts at roughly 22k to 26k tokens before you type anything, which is about 2% to 3% of the window.

See our Claude Code context window guide for what else fills a session.

Mean added tokens: built-in 2,895; TinyFish MCP 5,904; CLI 4,613. Medians 3,242, 5,759, 4,634. Average searches per run 1.5, 2.3, 2.7.

What else TinyFish search can do

The TinyFish MCP server supports the following parameters to refine your search (from TinyFish MCP integration docs):

  • Date range. after_date and before_date take dates in YYYY-MM-DD format, and recency_minutes sets a rolling window. We tried 1 October 2026 on two of the five questions, three runs each, outside the main test: median context added fell from 7,870 to 4,069 tokens on the Opus 4.8 question and from 7,652 to 7,002 on the Next.js question. We didn’t score accuracy on those runs. Additionally, the CLI (version 0.59.0) has no date option.
  • Location and language. Available in both the MCP tool and the CLI.
  • Result type. domain_type is web (the default), news or research_paper.
  • Include and exclude domains. include_domains and exclude_domains take comma-separated lists of domains to restrict results to or leave out (--include-domains and --exclude-domains in the CLI).
  • Pagination. Ask for the next page of results when the first page isn’t enough (page in the MCP tool, --page in the CLI).
  • Search intent. The optional purpose parameter takes a short phrase explaining why you’re searching, such as “Find X for Y”. This gives the tool extra context to improve results.

Add TinyFish search to Claude Code

Claude Code can call TinyFish search in two ways: as a remote MCP server or as a command-line tool through the Bash tool. Both reach the same search, and it’s free within published limits.

Option 1: MCP server

The MCP server signs in with OAuth the first time you use it, so there’s no API key to copy.

Step 1. Add the server. Run this command in your terminal:

bash
claude mcp add --transport http tinyfish https://agent.tinyfish.ai/mcp

The “Added HTTP MCP server tinyfish” line is the confirmation.

Step 2. Sign in. Start Claude Code, run /mcp, pick tinyfish, and sign in when the browser opens.

Step 3. Check the connection. Back in the /mcp panel, tinyfish should now show as connected, with its tools listed. The search tool appears as search.

You’re looking for “connected” next to tinyfish. If it says “needs authentication” instead, repeat step 2.

Option 2: CLI

Step 1. Install the CLI. The CLI needs Node.js 24 or newer.

bash
npm install -g @tiny-fish/cli@latest

Look out for an “Unsupported engine” warning. It means your Node.js version is older than the CLI requires (the screenshot was taken with Node.js 22). Update Node.js if this step fails.

Step 2. Log in. Run this once:

bash
tinyfish auth login

It opens the TinyFish API keys page in your browser. Copy your key from there.

Step 3. Paste the key into the terminal. The CLI asks for it and saves it. The CLI uses an API key, not OAuth.

You want to see “API key saved” in the output. You can check later with tinyfish auth status.

When running a search

Add --pretty for human-readable output. tinyfish search query --help lists the options: --location, --language, --include-domains, --exclude-domains and --page.

If you want one of these filters, either mention it in your prompt or add a line to CLAUDE.md:

text
Use tinyfish search query "<query>" for web searches.

MCP server or CLI?

Use the CLI when your agent has a shell. With API billing, the CLI cost about 26% less per run than built-in in our runs, which fits what we found last time in “We shipped an MCP server. Then we shipped a CLI. The CLI won.” Use the MCP server when:

  • the host has no shell, like a chat app
  • you want one OAuth connection that also gives the agent fetch_content and run_web_automation
  • you want MCP-specific filters like date or result type

For choosing between MCP servers more broadly, see Best MCP servers for Claude Code. If you’re comparing search APIs rather than coding-agent setups, see Best web search API for AI agents.

Cursor and Codex web search with TinyFish

Codex setup

Step 1. Add the server. Codex detects that the server uses OAuth and starts the sign-in for you.

bash
codex mcp add tinyfish --url https://agent.tinyfish.ai/mcp

Make sure you see “Detected OAuth support” and the sign-in URL (blurred here). The “Successfully logged in” line at the bottom appears after you approve in step 2.

Step 2. Approve the sign-in. Open the URL Codex printed. If the sign-in doesn’t start, run codex mcp login tinyfish to trigger it again.

Look out for: the Allow button. The 127.0.0.1 address in the warning is Codex’s own local sign-in return address.

Step 3. Check it’s connected.

bash
codex mcp list

Make sure the status is “enabled” and Auth is set to “OAuth”.

Cursor setup

Step 1. Install the server. Run this in a terminal (it needs Node.js installed). It adds TinyFish to Cursor’s connected tools for you.

bash
npx -y install-mcp@latest https://agent.tinyfish.ai/mcp --client cursor

Step 2. Authenticate. Open Cursor’s Customize screen and find tinyfish under MCPs. Click Authenticate.

Look out for: tinyfish under MCPs, marked “Needs authentication”, with Authenticate on the right.

Step 3. Approve the sign-in. Your browser opens the TinyFish consent page. Click Allow.

Look out for: the Allow button, with “Cursor” named at the top of the page.

Step 4. Go back to Cursor. After you approve, the browser asks to open Cursor. Click Open Cursor.

Look out for: the “Open Cursor?” prompt. If you miss it, switch back to Cursor yourself.

Step 5. Check it’s connected. Back in Customize, the tinyfish entry should now be enabled.

Look out for: a green dot on tinyfish, with its tool count shown underneath.

Prefer to set it up by hand? Cursor keeps its connected tools in a settings file: ~/.cursor/mcp.json for all projects or .cursor/mcp.json inside a single project. Add this configuration:

json
{
  "mcpServers": {
    "tinyfish": {
      "url": "https://agent.tinyfish.ai/mcp"
    }
  }
}

How TinyFish search performed in Codex and Cursor

We ran the same test structure as before: the same five queries in Codex and Cursor using built-in, TinyFish MCP and TinyFish CLI. On Codex, TinyFish search over MCP used about 28% fewer tokens than built-in, but took longer. On Cursor, the averages were close, with built-in slightly ahead on time and token use.

Codex: built-in 14.7 seconds and 38,475 total tokens; MCP 27.1 seconds and 27,787. Cursor Auto: built-in 21.2 seconds and 61,192 tokens; MCP 22.2 seconds and 66,485.

Accuracy remained stochastic, so we will revisit that in a later post with larger sample sizes.

Try it

Give TinyFish a question from your own development work: an API change you need to understand, an SDK error you’re debugging, or a migration that has left you with conflicting answers. Run the same prompt with built-in search and TinyFish, then compare the answers, the sources they cite, and how much follow-up you need before you can get back to coding. Use a few questions that matter to your project to see where another search tool earns its place.

Start with TinySearch to find current sources and return structured results with titles, URLs and snippets. To use it in Claude Code, Cursor or Codex, follow the MCP integration guide for your host. If your agent has a shell and you want to try the CLI approach from this benchmark, the CLI setup guide walks you through installation and authentication.

When a search result points to a page you need to read in full, use TinyFetch to turn that URL into clean Markdown, HTML or JSON. It renders the page in a browser and removes navigation, ads and other boilerplate, so your agent can work with the page’s content. Try it on a documentation page or changelog you already use.

TinySearch and TinyFetch are free to get started with, with no credit card required. Check the pricing page for current usage limits and Wallet rates if you later need browser sessions or multi-step automation.

Create your free TinyFish account, connect your coding agent, and try your first question.

AI disclosure

Content on this website may be created or refined with the assistance of AI tools and is subject to human editorial review.

FAQ

Questions, answered.

Does Claude Code have built-in web search?

Should I use an MCP server or a CLI for web search in a coding agent?

Is TinyFish search free?

Get started

Start building.

No credit card. No setup. Run your first operation in under a minute.

Get $8 in Wallet fundsRead the docs