Locus product guide · Updated
Claude Code web search: WebSearch, WebFetch and MCP
Claude Code searches the web with its built-in WebSearch tool. It runs on Anthropic’s search backend, returns titles and URLs, and can make up to 8 backend searches per call. WebFetch then reads a page and answers a prompt about it. An interactive session allows 200 searches by default. The search engine cannot be changed, so to use Brave, Perplexity or another provider, add a search MCP server.
Setup, step by step
Step 1
Ask Claude Code to search
In a session, ask for something current, such as "Search the web for the latest Node.js LTS release." Claude calls WebSearch, then WebFetch to read a result. In Manual mode each tool asks for permission first.
Step 2
Allow the tools without prompts
Open /permissions and add an allow rule. WebSearch takes no specifier, so the rule is just WebSearch. WebFetch takes a domain, such as WebFetch(domain:nodejs.org).
/permissions
Step 3
Raise the search limit if you need more
Start Claude Code with a higher cap. The cap can be raised but not turned off.
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION=500 claude
Step 4
Add a search MCP server for other engines
Add a remote MCP server that exposes search tools, then run /mcp, pick it and choose Authenticate. The command below adds Locus Pro, which reaches several search providers from one credit balance.
claude mcp add --transport http locus-pro https://api.paywithlocus.com/api/credits/mcp
How does web search work in Claude Code?
WebSearch sends a query to Anthropic’s web search backend and returns result titles and URLs. It does not open the pages. To read one, Claude follows up with WebFetch.
One WebSearch call can run up to 8 backend searches as it refines the query. Claude can limit results to some domains with allowed_domains, or exclude domains with blocked_domains, but not both in one call.
WebSearch works on the Claude API, Claude Platform on AWS and Microsoft Foundry. On Google Cloud’s Agent Platform it works with Opus 4, Sonnet 4, Haiku 4.5 and later models. Amazon Bedrock does not offer it.
What does WebFetch do?
WebFetch takes a URL and a prompt. It converts the page to Markdown, runs your prompt against it in a separate model call, and gives Claude that answer, not the raw page. So a result that says a page does not mention something may only mean the prompt did not ask for it.
- Reads up to 100,000 characters of a page per call.
- Upgrades http to https and refuses localhost or any hostname without a dot.
- Caches each page for 15 minutes, and fails on a page that has not downloaded within 5 minutes.
- Does not follow a redirect to another host. It returns the new URL and Claude fetches it in a second call.
- Sends a User-Agent that starts with Claude-User.
- Can be turned off with CLAUDE_CODE_DISABLE_WEB_FETCH=1 on v2.1.285 or later.
What are the limits of Claude Code web search?
These defaults come from the Claude Code tools reference. When a session hits the search limit, further searches do nothing and Claude is told to work with what it has.
| Limit | Default | How to change it |
|---|---|---|
| Searches per interactive session | 200, shared with subagents | Set CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION, or run /clear |
| Refill rate | About 100 searches an hour, on v2.1.290 or later | Set CLAUDE_CODE_WEB_SEARCH_REFILLS_PER_HOUR |
| Non-interactive runs with -p | The limit applies per turn | Same variable as above |
| WebFetch page size | 100,000 characters per call | Claude fetches the next part |
| WebFetch cache | 15 minutes | Set CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS |
| WebFetch deadline | 5 minutes | Set CLAUDE_CODE_WEBFETCH_DEADLINE_MS, or 0 for none |
Does web search cost extra?
The Claude Code tools reference lists no separate price for WebSearch. On the Claude API, Anthropic’s web search tool costs $10 per 1,000 searches, plus tokens for the results. A search that fails is not billed. Prices checked November 10, 2026.
In the Claude app, web search and web fetch count toward your plan’s usage limits. On Team and Enterprise plans an Owner must turn web search on in Organization settings, under Capabilities. Then anyone can switch it on per chat from the + menu. In the new Claude experience there is no toggle, and Claude searches when it helps.
When should I add a search MCP server instead?
The built-in search backend is not configurable. The Claude Code docs say to add an MCP server that exposes a search tool if you want another provider.
- You want a specific index, such as Brave’s independent index, or ranked results with dates and domain filters.
- You need more than 200 searches in a session without changing settings.
- You run Claude Code on Amazon Bedrock, which has no WebSearch.
- WebFetch’s summary loses detail you need, and you want the page as Markdown from a scraper.
Which search tools does Locus Pro add?
Locus Pro gives Claude Code several search and scraping providers through one MCP server and one prepaid balance. Searching the catalog and reading prices are free, and each paid call can carry a price ceiling.
| Locus Pro tool | How it is priced |
|---|---|
| Firecrawl search | Fixed price per call |
| Perplexity search | Capped price per call |
| Locus web search router | By search mode |
| Parallel search | By request |
| Brave web search | Fixed price per search |
| Firecrawl scrape | Varies by request |
Should I use built-in search or an MCP server?
Pick by how much you search, which engine you need and where Claude Code runs.
- Quick lookups while coding: the built-in WebSearch and WebFetch. Nothing to set up.
- A chosen engine, more volume, or Amazon Bedrock: a search MCP server.
- Several engines and scrapers on one bill, with a price ceiling per call: Locus Pro.
- Thousands of searches a day on one engine: that engine’s own API. At that volume, searches can cost less with your own Brave or Perplexity account and API key.
Frequently asked questions
Can Claude Code search the web?
Yes. Claude Code has a built-in WebSearch tool and a WebFetch tool for reading pages. In Manual mode it asks before each search or fetch unless you add allow rules.
Why is WebSearch missing from my Claude Code session?
Amazon Bedrock does not offer it, and on Google Cloud it needs a supported model. An admin can also turn web search off for an organization. Run /status to check your organization policy.
Can I make Claude Code search with Google or Brave?
Not through WebSearch, because its backend is fixed. Add an MCP server that offers the engine you want, such as a Brave or SERP search tool, and Claude can call it.
Why did WebFetch say a page does not mention something that is on it?
WebFetch answers your prompt from the page instead of returning the page. Ask again with a more specific prompt, or fetch the raw page with curl through Bash.
Implementation references
Use these first-party references for current request contracts and account requirements. Tool availability, prices, and negotiated terms can change.
Sources
Third-party details were checked on November 10, 2026. Vendors change pricing and features often, so confirm on their site before you decide.