google-mcp/README.md
Jarian Cottingham 4bae588d05
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / docker-build (push) Waiting to run
CI / security (push) Waiting to run
CI / build-result (push) Blocked by required conditions
refactor: split into google-mcp and duckduckgo-mcp
Move the DuckDuckGo MCP server into its own repository. This repo
keeps the Google MCP server, shared search library, and tests.
Compose trimmed to the Google service.
2026-08-21 18:37:53 +00:00

2.6 KiB

Google MCP Server

Model Context Protocol (MCP) server that exposes Google search as a tool for LLM clients (Claude Desktop, Cursor, VS Code, ...), backed by a self-hosted SearXNG metasearch instance.

SearXNG aggregates results from Google, DuckDuckGo, Brave, Wikipedia, and more with its own request handling — no browser fingerprinting, no API keys, fully self-hosted.

Part of the MCP Search Servers project:

Repo What it is
duckduckgo-mcp Same design for DuckDuckGo search

Service

Service Port MCP tool Description
google-mcp 3001 google_search Google results via SearXNG
searxng Internal metasearch engine (not published)

The server exposes:

  • /sse + /messages/ — MCP SSE transport
  • /search?q=...&num=N — plain HTTP JSON endpoint
  • /health — liveness probe

Quick Start

cp .env.example .env        # fill in SEARXNG_SECRET
docker compose up -d --build

Generate a SearXNG secret:

python3 -c "import secrets; print(secrets.token_hex(32))"

Verify:

curl http://localhost:3001/health
curl "http://localhost:3001/search?q=python&num=3"

Then point your LLM client at http://localhost:3001/sse. Client configuration examples for Claude Desktop, Cursor/Windsurf, and VS Code are in USAGE.md.

Tool Contract

{
  "name": "google_search",
  "arguments": { "query": "Python programming language", "num_results": 5 }
}

Returns numbered results with title, URL, and snippet (max 20 results, queries capped at 500 characters).

Architecture

LLM client (Claude Desktop, Cursor, ...)
        |  MCP / SSE
        v
+---------------+      +----------------+
|   google-mcp  | ---- |      SearXNG   | --> Google, Brave, Wikipedia, ...
|   (:3001)     |      |  (internal)    |
+---------------+      +----------------+

Project Structure

.
├── google-mcp/        # MCP server (SSE transport + tools)
│   ├── server.py
│   └── Dockerfile
├── lib/               # Shared search engine implementations
│   ├── google_search.py
│   ├── duckduckgo_search.py  # also used by the duckduckgo-mcp sibling repo
│   ├── playwright_manager.py
│   └── rate_limiter.py
├── tests/             # Unit tests (rate limiter, result parsing)
├── integration_test.py
├── test_client.py
├── searxng-settings.yml
└── docker-compose.yml