If you frequently work with the Google Gemini API, have you ever struggled to find key information while sifting through documentation? Or wished for a local tool that lets you quickly search and organize official Gemini docs? Enter Gemini Docs MCP Server—a local STDIO Model Control Protocol (MCP) server designed to solve these exact pain points. It empowers developers to efficiently manage, search, and retrieve Gemini API documentation, streamlining your development workflow.
1. What Is Gemini Docs MCP Server?
At its core, Gemini Docs MCP Server is a local tool built on the STDIO MCP framework. Its primary purpose is to simplify access to Gemini API documentation by centralizing it on your local machine. Unlike relying on constant online searches, this tool lets you pull up critical docs in seconds—no repeated visits to external websites required.
It ensures you always work with up-to-date content (thanks to automatic updates on startup) and eliminates the frustration of sifting through unorganized online resources. Whether you need to clarify a concept, check a feature’s usage, or review details about the latest Gemini models, this tool puts all that information at your fingertips.
2. What Can It Do? Core Features Explained
The tool’s features are tailored to the real-world needs of developers working with the Gemini API. Here’s a breakdown of its key capabilities:
Full-Text Search Across Documentation
This is the tool’s flagship feature. It enables full-text searches across all Gemini documentation pages. Whether you’re looking for details on “embeddings,” “model parameters,” or “API call examples,” simply enter your keywords to instantly locate relevant content. For instance, if you’re stuck on “how to generate embeddings with the Gemini API,” a quick search will pull up the official documentation’s step-by-step guidance.
Retrieve Capability Documentation
This feature serves two purposes:
- •
If you want to explore all available Gemini API documentation pages (e.g., to browse what topics are covered), it can generate a complete list of pages. - •
If you already know the name of a specific page (e.g., “Model Training Best Practices”), it lets you directly fetch that page’s full content.
This flexibility means you can either browse broadly or target specific information—whichever fits your current task.
Quick Access to Current Model Documentation
Gemini models are regularly updated, and different models have unique features, parameters, and usage limits. This feature cuts through the noise by letting you quickly pull up documentation for the current Gemini models you’re using. It eliminates the risk of relying on outdated model details that could break your code.
Automatic Documentation Updates
Outdated docs are a developer’s nightmare—and this tool solves that. Every time you start the server, it automatically scrapes the latest Gemini API documentation and updates its local storage. You’ll never have to manually check for new docs or worry about working with obsolete information again.
3. How Does It Work? The Underlying Process
The tool’s functionality relies on a streamlined, four-step workflow that ensures fast, reliable access to documentation. Here’s a detailed look at how it operates:
Step 1: Documentation Ingestion
When you launch the server, its first task is to “ingest” (collect) documentation. It fetches a list of all available Gemini documentation pages from the official URL: https://ai.google.dev/gemini-api/docs/llms.txt. This list acts like a “table of contents” for the tool, guiding it to the relevant pages.
Step 2: Documentation Processing
Next, the server processes each page in the list—concurrently (at the same time) to save time. During processing, it extracts only the core text content, stripping away unnecessary elements like formatting, ads, or irrelevant UI components. This ensures the stored content is clean, concise, and focused on what you need.
Step 3: Documentation Indexing
The processed text is then stored in a local SQLite database—a lightweight, file-based database that requires no separate server setup (perfect for a local tool). To enable fast searches, the server also creates a Full-Text Search 5 (FTS5) index for the database. FTS5 is optimized for text retrieval, so even if you have hundreds of documentation pages stored, searches will return results in milliseconds.
Step 4: Documentation Searching
When you use the search_documentation tool (e.g., to look up “embeddings”), the server queries the SQLite database using the FTS5 index. It identifies the most relevant documentation pages, formats the results for readability, and sends them back to your client (e.g., your IDE or MCP client).
The entire workflow is visualized in the sequence diagram below:
sequenceDiagram
participant Client as MCP Client / IDE
participant Server as FastMCP Server
participant DB as SQLite Database
Client->>Server: call_tool("search_documentation", queries=["embeddings"])
Server->>DB: Full-Text Search for "embeddings"
DB-->>Server: Return matching documentation
Server-->>Client: Return formatted results
As you can see, the process is fully localized (after the initial ingestion), so you won’t depend on external network connectivity for searches—ideal for working in low-connectivity environments.
4. How to Install It? 3 Options to Fit Your Needs
The tool offers three installation methods, each tailored to different user preferences (e.g., quick setup vs. development needs). Choose the one that works best for you:
Option 1: Use uvx (Recommended for Quick Setup)
If you want to start using the tool immediately without formal installation, uvx is the way to go. uvx lets you run Python packages directly from remote repositories—no need to install them to your local environment first.
To launch the server with uvx, run this command in your terminal:
uvx --from git+https://github.com/philschmid/gemini-api-docs-mcp gemini-docs-mcp
That’s it—uvx will automatically download the package and start the server.
Option 2: Install Directly from GitHub via pip
If you want to install the tool permanently (for long-term use), use pip (Python’s package manager) to install it directly from the GitHub repository.
Run this command in your terminal:
pip install git+https://github.com/philschmid/gemini-api-docs-mcp.git
Once installed, the tool will be added to your Python environment, and you can launch it with a simple command (see Section 5).
Option 3: Manual Installation (For Developers)
If you want to modify the tool’s code (e.g., add custom features) or inspect its source, use manual installation. This method clones the repository to your local machine, making it easy to edit and test changes.
Follow these steps:
-
Clone the GitHub repository to your computer: git clone https://github.com/philschmid/gemini-api-docs-mcp.git -
Navigate into the cloned folder: cd gemini-api-docs-mcp -
Install the package in “editable mode” (so changes to the code take effect immediately, no re-installation needed): pip install -e . -
(Optional) If you only want to install the tool and don’t need the source code anymore, delete the cloned folder: cd .. rm -rf gemini-api-docs-mcp
This method is ideal for developers who want to contribute to the tool or adapt it to their specific workflow.
5. How to Use It? A Complete Guide
Using Gemini Docs MCP Server is straightforward—here’s how to start the server, configure it, and integrate it with your MCP client:
1. Start the Server
The startup command depends on how you installed the tool:
- •
If you used Option 2 (pip) or Option 3 (manual installation): Run this command in your terminal: gemini-docs-mcp - •
If you used Option 1 (uvx): Re-run the uvxcommand you used to install it (see Section 4.1).
On the first run, the server will ingest, process, and index all Gemini documentation—this may take a few minutes (depending on your internet speed and the number of docs). Subsequent runs will be much faster, as the docs are already stored locally.
2. Configure the Database Path
By default, the tool stores its SQLite database at ~/.mcp/gemini-api-docs/database.db (the ~ symbol refers to your user’s home directory). If you want to store the database in a different location (e.g., an external drive or a specific project folder), use the GEMINI_DOCS_DB_PATH environment variable to specify a custom path.
For Linux/macOS:
Run this command in your terminal before starting the server:
export GEMINI_DOCS_DB_PATH="/path/to/your/custom/database.db"
For Windows (Command Prompt):
Run this command before starting the server:
set GEMINI_DOCS_DB_PATH="C:\path\to\your\custom\database.db"
The server will now use your custom path to store and access the database.
3. Integrate with an MCP Client
Gemini Docs MCP Server is an MCP server, so it works with MCP clients (e.g., IDE plugins, development tools). To use it, you need to configure your MCP client to launch the server. Below are two common configuration examples (adjust them to match your client’s requirements):
Example 1: Configuration for uvx (Option 1 Installation)
If you’re using uvx to launch the server, use this JSON configuration in your MCP client:
{
"mcpServers": {
"gemini-docs": {
"command": "uvx",
"args": ["--from", "git+https://github.com/philschmid/gemini-api-docs-mcp", "gemini-docs-mcp"]
}
}
}
Example 2: Configuration for pip/Manual Installation (Options 2 & 3)
If you installed the tool via pip or manually, use this simpler JSON configuration:
{
"mcpServers": {
"gemini-docs": {
"command": "gemini-docs-mcp"
}
}
}
Once configured, your MCP client will automatically launch the server and let you call its tools (see Section 6) directly from your workflow.
6. Detailed Tool Breakdown: What Functions Can You Call?
The tool provides three core functions (tools) that you can call from your MCP client. Each is designed for a specific use case:
1. search_documentation(queries: list[str])
- •
Purpose: Perform a full-text search across all Gemini documentation using one or more keywords. - •
Parameter: queries(a list of strings, maximum 3 keywords). - •
Use Case: When you need to find information about a specific topic. For example: - •
To learn about error handling: search_documentation(queries=["API error handling"]) - •
To find Python-specific embedding guides: search_documentation(queries=["embeddings", "Python", "Gemini API"])
- •
2. get_capability_page(capability: str = None)
- •
Purpose: Two use cases in one: - •
If you don’t provide a capabilityvalue: Returns a list of all available Gemini documentation pages (a “table of contents”). - •
If you provide a capabilityvalue (e.g., “Model Parameter Specifications”): Returns the full content of that specific page.
- •
- •
Parameter: capability(optional, string—name of the documentation page you want to retrieve). - •
Use Case: - •
Browse all docs: get_capability_page() - •
Get details about model parameters: get_capability_page(capability="Model Parameter Specifications")
- •
3. get_current_model()
- •
Purpose: Retrieve official documentation for the current Gemini models (e.g., model features, input limits, supported languages). - •
Parameter: None. - •
Use Case: When you need to confirm details about the Gemini model you’re currently using (e.g., “What’s the maximum input length for the latest Gemini Pro model?”).
7. Test Results: How Reliable Is It?
To ensure the tool delivers accurate, up-to-date documentation, the development team conducted comprehensive testing covering both Python and TypeScript SDKs. The results confirm its high reliability:
| Metric | Value |
|---|---|
| Total Tests | 117 |
| Passed Tests | 114 |
| Failed Tests | 3 |
Last Updated: 2025-11-03 13:29:01
With 114 out of 117 tests passing, the tool consistently retrieves and returns correct documentation. For detailed insights into which tests passed/failed, you can review the tests/result.json file in the project repository.
8. Frequently Asked Questions (FAQ)
Below are answers to common questions developers have about Gemini Docs MCP Server:
Why is the first startup slow?
The first startup requires the server to fetch, process, and index all Gemini documentation from the web. This depends on your internet speed and the number of docs, so it may take a few minutes. Subsequent startups are fast because the docs are already stored locally.
Can I manually delete the database file?
Yes. Deleting the database file will reset the tool’s documentation data—on the next startup, the server will re-fetch and re-index all docs. This is useful if you suspect the local docs are corrupted or outdated.
Does it support searching with multiple keywords?
Yes. The search_documentation tool accepts up to 3 keywords in the queries list. It uses these keywords to perform a combined search, returning the most relevant results.
How do I ensure my documentation is up-to-date?
The server automatically updates docs every time it starts. To keep docs current, simply restart the server periodically (e.g., once a week or before starting a new project).
Can I use it offline?
Yes—after the first startup. Once the server has ingested and stored docs locally, you can use search and retrieval features without an internet connection. Offline mode does not support doc updates, however.
Which operating systems does it support?
It’s a cross-platform tool (built with Python), so it works on Windows, macOS, and Linux. You just need Python and pip (or uvx) installed on your system.
9. License Information
Gemini Docs MCP Server is released under the MIT License. This means you can:
- •
Use it for personal or commercial projects (free of charge). - •
Copy, modify, or redistribute the tool. - •
Integrate it into other software (as long as you include the original copyright notice).
For full details, see the LICENSE file in the project repository.
Conclusion
Gemini Docs MCP Server fills a critical gap for developers working with the Gemini API: it centralizes, speeds up, and simplifies access to official documentation. With its full-text search, automatic updates, and local storage, it eliminates the frustration of hunting for docs online and ensures you always work with accurate, up-to-date information.
Whether you’re a casual Gemini API user or a full-time developer building complex projects, this tool will save you time and reduce friction in your workflow. Try it out today—you’ll wonder how you worked without it.

