This server provides search and retrieval tools for Google Gemini API documentation through an MCP (Model Context Protocol) interface.
Available Tools:
search_documentation: Performs keyword-based, full-text searches across all Gemini documentation pages using short queries (1-3 keywords maximum, max 3 queries at once)get_capability_page: Retrieves the complete content of a specific documentation page by its exact title, or call without arguments to get a master list of all available page titlesget_current_model: Quickly accesses the dedicated "Gemini Models" documentation page with details about model variants (Pro, Flash, etc.), their capabilities, versioning, and context window sizes
Key Features:
Automatic documentation updates on server startup by scraping from
ai.google.devLocal SQLite database with FTS5 full-text search indexing for efficient querying and offline access
Supports Python and TypeScript SDK documentation
Provides tools for searching and retrieving Google Gemini API documentation, including full-text search across documentation pages, listing available capabilities, and accessing current model documentation.
Gemini Docs MCP Server
A remote HTTP MCP server that provides tools to search and retrieve Google Gemini API documentation. The server exposes the MCP protocol at the /mcp endpoint and can be deployed to Cloud Run or other containerized platforms. It also supports local stdio mode for development.
Search Documentation: Full-text search across all Gemini documentation pages.
Get Capabilities: List available documentation pages or retrieve content for a specific page.
Get Current Model: Quickly access documentation for current Gemini models.
Automatic Updates: Scrapes and updates documentation on server startup.
How it Works
Ingestion: On startup, the server fetches
https://ai.google.dev/gemini-api/docs/llms.txtto get a list of all available documentation pages.Processing: It then concurrently fetches and processes each page, extracting the text content.
Indexing: The processed content is stored in a local SQLite database with a Full-Text Search (FTS5) index for efficient querying.
Searching: When you use the
search_documentationtool, the server queries this SQLite database to find the most relevant documentation pages.
Installation
Option 1: Use uvx (Recommended)
You can use uvx to run the server directly without explicit installation. This is the easiest way to get started.
Option 2: Install directly from GitHub
You can install the package directly from GitHub using pip:
Option 3: Manual Installation (for development)
Usage
Running as a Remote HTTP Server
The server runs as an HTTP server and exposes the MCP protocol at the /mcp endpoint. It respects the PORT environment variable (defaults to 8080).
The server will be accessible at http://localhost:8080/mcp (or your configured port).
Docker Deployment
Build and run the Docker container:
Cloud Run Deployment
Deploy to Google Cloud Run:
The server will be accessible at https://<your-service-url>/mcp.
Running in Stdio Mode (Local)
If you don't set the PORT environment variable, the server runs in stdio mode for local MCP clients:
Configuration
The database is stored at:
/tmp/gemini-api-docs/database.dbin containerized environments~/.mcp/gemini-api-docs/database.dbin local environments
You can override this by setting the GEMINI_DOCS_DB_PATH environment variable.
Using with an MCP Client
For remote HTTP servers, configure your MCP client to connect via HTTP:
For local development with stdio (if supported by your client):
Tools
search_documentation(queries: list[str]): Performs a full-text search on Gemini documentation for the given list of queries (max 3).get_capability_page(capability: str = None): Get a list of capabilities or content for a specific one.get_current_model(): Get documentation for current Gemini models.
License
MIT
Test Results
We run a comprehensive evaluation harness to ensure the MCP server provides accurate and up-to-date code examples. The tests cover both Python and TypeScript SDKs.
Metric | Value |
Total Tests | 117 |
Passed | 114 |
Failed | 3 |
Last updated: 2025-11-03 13:29:01
You can find the detailed test results in tests/result.json.