Purpose
mcp-gemini-search is an MCP (Model Context Protocol) server that gives AI agents the ability to search the web via Google. It is suitable for self-built agent environments, for using open-weight models, or for accessing models through platforms that do not support server-side search (such as Claude on Amazon Bedrock).
Key capabilities
The server provides two tools:
- search: Always registered. Sends a natural language question to the Gemini API with Grounding with Google Search enabled and returns three parts: Gemini's answer text, cited sources with real URLs (each source lists the answer passages it supports), and the search queries Gemini actually executed.
- analyze_url: Disabled by default; requires setting
ANALYZE_URL_ENABLED=trueto enable. Answers a question about a public URL, supports PDFs, retrieves the page via Gemini URL Context, and does not return the raw page content.
The server parses redirect URLs returned by Gemini, validates citations, merges sources by target URL, and truncates to max_sources.
Usage
- Self-hosted, single-tenant service.
- Local clients use stdio; remote clients use stateless Streamable HTTP with a bearer token.
- Provides multi-architecture container images (GHCR).
- Requires your own Gemini API key, and you must use the paid tier (the free tier is unavailable).
Use cases
- Running open-weight models in self-built or open-source frameworks and needing web search.
- Using models through platforms that do not support server-side web search.
- Multiple agents or clients sharing one search endpoint, one API key, and fixed operational limits.
- Small or locally hosted models cannot crawl and read many web pages on their own, so Gemini does the reading and returns the answer.
Limitations
- Does not return Google search result lists, rankings, or SEO data; it returns only answers and citations.
- Answers are model output based on Google Search and may vary between runs and may be incomplete or wrong; important facts should be verified by loading the cited pages.
- Does not support multi-user operation; there is only one static bearer token and no user management.
- Queries leave local infrastructure and are retained by Google.
- The project is at version 0.1.0, and tool descriptions and result formats may change.
- analyze_url is not suitable for paywalled content, private or local addresses, video, or audio; long documents may be truncated; whether a given host can be retrieved is unpredictable.
- Currently uses the Gemini Developer API and cannot control the processing region; the Gemini Enterprise Agent Platform (formerly Vertex AI) backend is on the roadmap but not yet implemented.