web-search-mcp

web-search-mcp

Provides a web search tool with citations by running Claude Code CLI in an isolated Docker container, enabling search even in environments without direct Anthropic web search support.

Category
Visit Server

README

web-search-mcp

An MCP server that exposes a real, cited web_search tool by shelling out to the Claude Code CLI running inside an isolated Docker container, logged into a personal claude.ai Pro subscription.

Why this exists

Some environments proxy Claude Code through a gateway (e.g. an internal LiteLLM-style proxy) that doesn't support Anthropic's built-in web_search server tool for the model it routes to. This project sidesteps that entirely: it's a separate, single-purpose MCP tool backed by its own Claude Code CLI session, running in a container so its login never touches the host's own Claude Code config.

See docs/superpowers/specs/2026-07-28-web-search-mcp-design.md for the full design rationale, including why a raw Anthropic API key doesn't work for this and why Docker isolation is necessary.

How it works

MCP client ──tool call──▶ server.py (FastMCP, stdio) ──subprocess──▶ docker run --rm -v claude-pro-home:/root web-search-claude:latest
                                                                            │
                                                                            ▼
                                                            Claude Code CLI, logged into a Pro account
                                                            (real web_search tool, real Anthropic models)

server.py runs docker run per query, parses the CLI's JSON output, and returns the answer text (which includes a Sources: section whenever the CLI actually searched).

Setup

Requires Docker and uv.

git clone https://github.com/bartdorlandt/web-search-mcp.git
cd web-search-mcp
uv sync

# Build the image (bundles the Claude Code CLI)
docker build -t web-search-claude:latest .

# Create a volume to hold the Pro-account login, then log in (interactive, opens a browser)
docker volume create claude-pro-home
docker run --rm -it -v claude-pro-home:/root web-search-claude:latest /login

The login only needs to happen once — the OAuth session persists in the claude-pro-home volume across container runs.

Manual test

uv run python -c "from server import _web_search_impl; print(_web_search_impl('What are today\'s top technology news headlines?'))"

Using it standalone

uv run python server.py

This starts the MCP server over stdio — point any MCP client at that command directly.

Adding it to gridctl

If you're using gridctl as an MCP gateway, add it as a local-process server in your stack.yaml:

mcp-servers:
  - name: web-search
    command: [uv, run, --directory, /path/to/web-search-mcp, python, server.py]
    transport: stdio

Clone this repo to /path/to/web-search-mcp (or wherever you like) and update the path above, then gridctl reload. No env: block is needed — the only credential this tool uses lives in the claude-pro-home Docker volume, not in gridctl's variable store.

Repo: https://github.com/bartdorlandt/web-search-mcp

Notes

  • No automated test suite — the wrapper's logic is thin enough that its correctness is verified functionally (see the design doc's Testing section).
  • Calls are assumed serial, not concurrent — see "Operational assumptions" in the design doc.
  • Every query bills against the logged-in account's subscription usage.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured