Give Claude Code Real-Time Web Search with MCP Tools

Claude Code can do a lot without leaving your terminal, but its knowledge has a cutoff. Anything published after training — a new library version, a deprecation notice, a CVE — isn’t something it can know about unless you tell it or it can look it up. MCP tools let it look things up.

Why This Matters

The Model Context Protocol is built into Claude Code. You add an MCP server to your config and Claude Code automatically discovers the tools it exposes. For real-time search, this means Claude Code can reach out to Google or Bing mid-task without any special prompting from you.

This matters most in a few scenarios:

  • Checking whether a package version you’re about to pin is still the latest
  • Looking up whether an error message is a known bug with a fix
  • Verifying that an API endpoint or parameter you’re using hasn’t been deprecated

These are all questions Claude Code would otherwise answer from training data — which may be months out of date.

Setup

Install the AgentPatch CLI (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Then use it:

ap search "web search"
ap run agentpatch google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

Run this command to add AgentPatch as an MCP server:

claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Claude Code discovers all AgentPatch tools automatically.

Example

You’re mid-session and say:

“I want to add rate limiting to this Express app. What’s the current recommended library?”

Without web search, Claude Code answers from training data. With AgentPatch:

Searching Google for "express rate limiting library 2026 recommended"...

express-rate-limit is still the standard choice — currently at v7.5.0. It's well-maintained
and works directly as Express middleware. There's also @nestjs/throttler if you're using NestJS.

Want me to install express-rate-limit and add it to your routes?

It checked the current version, confirmed the library is still actively maintained, and offered to implement it. That’s more reliable than an answer that might reference a library that’s since been abandoned.

Wrapping Up

Real-time web search via MCP makes Claude Code more accurate for any task involving current state of the ecosystem. AgentPatch sets it up in one config block, and the same connection gives access to every other tool on the marketplace. Check out agentpatch.ai.