PG

philschmid/gemini-api-docs-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

101 stars 17 forks Качество 69 Тренд 15MIT

philschmid/gemini-api-docs-mcp — это кандидат на MCP-сервер, импортированный из https://github.com/philschmid/gemini-api-docs-mcp.

Обзор

philschmid/gemini-api-docs-mcp — это кандидат на MCP-сервер, импортированный из https://github.com/philschmid/gemini-api-docs-mcp.

Обзор (машинный перевод)

Удалённый HTTP MCP-сервер, предоставляющий инструменты для поиска и извлечения документации Google Gemini API. Сервер размещает протокол MCP на конечной точке /mcp и может быть развернут на Cloud Run или другие контейнерные платформы. Он также поддерживает локальный режим stdio для разработки.

  • Поисковая документация: полнотекстовый поиск на всех страницах документации Gemini.
  • Получить возможности: Перечислить доступные страницы документации или получить контент для конкретной страницы.
  • Получить актуальную модель: Быстрый доступ к документации по текущим моделям Gemini.
  • Автоматические обновления: Скребят и обновляют документацию при запуске сервера.

Как это работает

  1. Ввод: При запуске сервер получает https://ai.google.dev/gemini-api/docs/llms.txt, чтобы получить список всех доступных страниц документации.
  2. Обработка: Затем одновременно загружается и обрабатывает каждую страницу, извлекая текстовое содержимое.
  3. Индексация: Обработанный контент хранится в локальной базе данных SQLite с индексом полнотекстового поиска (FTS5) для эффективной обработки запросов.
  4. Поиск: Когда вы используете инструмент search_documentation, сервер запрашивает эту базу данных SQLite, чтобы найти наиболее релевантные страницы документации.

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

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.
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

How it Works

  1. Ingestion: On startup, the server fetches https://ai.google.dev/gemini-api/docs/llms.txt to get a list of all available documentation pages.
  2. Processing: It then concurrently fetches and processes each page, extracting the text content.
  3. Indexing: The processed content is stored in a local SQLite database with a Full-Text Search (FTS5) index for efficient querying.
  4. Searching: When you use the search_documentation tool, 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.

uvx --from git+https://github.com/philschmid/gemini-api-docs-mcp gemini-docs-mcp

Option 2: Install directly from GitHub

You can install the package directly from GitHub using pip:

pip install git+https://github.com/philschmid/gemini-api-docs-mcp.git

Option 3: Manual Installation (for development)

git clone https://github.com/philschmid/gemini-api-docs-mcp.git
cd gemini-api-docs-mcp
pip install -e .
cd ..
rm -rf gemini-api-docs-mcp

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).

# Set port (optional, defaults to 8080)
export PORT=8080

# Run the server
gemini-docs-mcp

The server will be accessible at http://localhost:8080/mcp (or your configured port).

Docker Deployment

Build and run the Docker container:

# Build the image
docker build -t gemini-docs-mcp .
Открыть полный README на GitHub

Установка

uvx --from git+https://github.com/philschmid/gemini-api-docs-mcp gemini-docs-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "gemini-docs": { "url": "https://<your-service-url>/mcp" } } }