Back to Blog
SERP MCP: Local Google Search for AI Agents
TutorialJanuary 16, 20264 min

SERP MCP: Local Google Search for AI Agents

TL;DR

SERP MCP is an open source MCP server that scrapes Google search results with automatic fingerprint rotation. It runs locally on your machine, giving you direct access to Google SERPs for Claude Code or any MCP-compatible client.

Links:

What is SERP MCP?

SERP MCP is a Model Context Protocol (MCP) server that lets AI agents search Google directly. Unlike API-based solutions, it scrapes Google's search results page locally using browser fingerprint rotation to avoid detection.

Key Features

  • Fingerprint Rotation - Automatic browser fingerprint rotation per request
  • Lite Mode - 50% less traffic by extracting only organic results (default)
  • Full Mode - Extracts organic results, sitelinks, PAA, related searches, knowledge graph
  • Location Support - Encode locations using protobuf (UULE format)
  • Country & Language - 243 country codes and 78 language codes supported
  • Time Filtering - Filter by hour, day, week, month, or year
  • MCP Protocol - Works with Claude Code, opencode, and any MCP client

Installation

Claude Code

claude mcp add serp-mcp -- uvx serp-mcp

opencode

Add to your ~/.config/opencode/opencode.jsonc:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "serp-mcp": {
      "type": "local",
      "command": ["uvx", "serp-mcp"],
      "enabled": true
    }
  }
}

Manual Usage

# Run with uvx (automatically installs latest version)
uvx serp-mcp

Development

git clone https://github.com/LiranYoffe/serp-mcp
cd serp-mcp
uv sync
uv run serp-mcp

Usage

The MCP server exposes a search tool with these parameters:

ParameterDefaultDescription
queryrequiredSearch query
country"us"Country code (us, uk, fr, de, etc.)
language"en"Language code (en, fr, de, es, etc.)
locationoptionalLocation for local results (e.g., "New York, NY")
time_rangeoptionalTime filter (hour, day, week, month, year)
autocorrecttrueEnable query autocorrection
page1Page number
litetrueLite mode (organic results only)

Quercle vs SERP MCP: When to Use Each

Both tools provide search capabilities for AI agents, but they solve different problems:

AspectQuercleSERP MCP
Data SourceWeb search + page contentDirect Google scraping
OutputLLM-synthesized answers with citationsRaw SERP data (URLs, snippets, features)
ExecutionHosted APILocal (your IP)
Use CaseDevelopment and production agentsLocal development
ProcessingReads pages and synthesizes answersReturns raw results
SecurityPrompt injection detectionNo filtering
Cost$0.005/searchFree (your compute + IP risk)

When to Use Quercle

  • You're building production agents - Reliable API with SLA, no infrastructure to manage
  • You need answers, not just URLs - Quercle's search tool visits pages and synthesizes information with citations
  • Security matters - Prompt injection detection protects your agent
  • You need page content - The fetch tool extracts and analyzes any webpage
  • You want both tools - Search for synthesized answers, fetch for reading specific pages

When to Use SERP MCP

  • You're developing locally - Free, no API key needed, great for experimentation
  • You need raw SERP data - URLs, snippets, featured snippets, PAA boxes, knowledge panels
  • You want to process results yourself - Feed raw data to your own LLM or pipeline
  • You need specific Google features - Sitelinks, related searches, knowledge graph
  • You're behind a residential proxy - Reduces detection risk for higher volume

Deployment Options

Personal Use

Run locally with uvx serp-mcp for personal Claude Code sessions.

Behind a Residential Proxy

For higher volume or reduced detection risk:

HTTP_PROXY=http://user:pass@proxy:port uvx serp-mcp

As an API Service

SERP MCP can be wrapped as an HTTP API for team use, though you'll need to manage proxies and rate limiting.

Contributing

SERP MCP is open source and contributions are welcome:

github.com/LiranYoffe/serp-mcp

Ready to try Quercle?

Built for AI agents. See how it compares in real-world tests.

More Articles

Quercle Chat: Open Source AI Chat with Web Tools

Quercle Chat: Open Source AI Chat with Web Tools

Quercle Chat runs entirely in your browser - no backend, no data collection. An open source, model-agnostic AI chat with web search and fetch capabilities. Use any OpenRouter model.

Jan 163 min
Building an AI Research Agent with Persistent Memory

Building an AI Research Agent with Persistent Memory

Learn how Quercle Research Agent remembers what it learns across sessions. An open source AI assistant that builds knowledge over time using Quercle, MongoDB, and OpenRouter.

Jan 164 min
Quercle + xpander.ai: Powering AI Agents with Web Data

Quercle + xpander.ai: Powering AI Agents with Web Data

Quercle integrates with xpander.ai to give AI agents reliable web access. See how to build agents that monitor GitHub trends, research topics, and more.

Jan 164 min
Testing LLM Security: A Prompt Injection Testing Ground

Testing LLM Security: A Prompt Injection Testing Ground

Sunny Valley Farm is not what it seems. An open source website for testing whether LLM web tools can defend against prompt injection attacks.

Jan 165 min
How Claude Code Web Tools Work: WebFetch and WebSearch Internals

How Claude Code Web Tools Work: WebFetch and WebSearch Internals

A deep dive into how Claude Code implements WebFetch and WebSearch tools internally. Learn about secondary conversations, Haiku processing, and how to build better alternatives.

Jan 155 min
Quercle vs Tavily: Which Web API is Best for AI Agents?

Quercle vs Tavily: Which Web API is Best for AI Agents?

A detailed comparison of Quercle and Tavily for AI agent web access. Compare features, pricing, security, and when to use each.

Jan 154 min
Quercle vs Exa: Choosing the Right Web API for Your AI Agents

Quercle vs Exa: Choosing the Right Web API for Your AI Agents

Compare Quercle and Exa for AI-powered web access. Learn about their differences in search, content extraction, and agent integration.

Jan 154 min
Quercle vs Firecrawl: Web Scraping APIs for AI Agents Compared

Quercle vs Firecrawl: Web Scraping APIs for AI Agents Compared

Compare Quercle and Firecrawl as web fetching APIs for AI agents. See how they differ in security, pricing, and developer experience.

Jan 154 min