Skip to main content
Glama
LeomaiaJr

Gemini Docs MCP Server

by LeomaiaJr
README.md
# Gemini Docs MCP Server

An MCP (Model Context Protocol) server that provides tools to search and fetch Google's Gemini API documentation.

## Features

- **Search Documentation**: Search through the Gemini API documentation index to find relevant pages
- **Fetch Documentation**: Fetch and parse specific documentation pages with structured content extraction

## Installation

```bash
npm install
npm run build
```

## Usage

### As an MCP Server (stdio)

```bash
node dist/index.js
```

### Configuration for Claude Desktop

Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "gemini-docs": {
      "command": "node",
      "args": ["/path/to/gemini-docs-mcp/dist/index.js"]
    }
  }
}
```

## Tools

### `search_gemini_docs`

Search the Gemini API documentation for relevant pages.

**Parameters:**
- `query` (string, required): Search query (e.g., "function calling", "embeddings")
- `max_results` (number, optional): Maximum results to return (1-20, default: 10)
- `response_format` (string, optional): Output format - "markdown" or "json" (default: "markdown")

**Example:**
```json
{
  "query": "function calling",
  "max_results": 5,
  "response_format": "json"
}
```

### `fetch_gemini_doc`

Fetch and parse a specific Gemini API documentation page.

**Parameters:**
- `path` (string, required): Documentation path (e.g., "embeddings", "function-calling"). Use empty string for the main overview page.
- `response_format` (string, optional): Output format - "markdown" or "json" (default: "markdown")

**Common paths:**
- `""` - Main overview page
- `quickstart` - Getting started guide
- `function-calling` - Function calling / tool use
- `embeddings` - Text embeddings
- `structured-output` - JSON structured output
- `text-generation` - Text generation basics
- `image-understanding` - Vision / image analysis
- `live` - Live API (real-time streaming)
- `api-key` - API key setup
- `models` - Available models

**Example:**
```json
{
  "path": "function-calling",
  "response_format": "markdown"
}
```

## Development

```bash
# Install dependencies
npm install

# Development mode with auto-reload
npm run dev

# Build
npm run build

# Run tests
npm run test
```

TDQS

A4.4/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes with no overlap: fetch_gemini_doc retrieves and parses specific documentation pages, while search_gemini_docs searches across the documentation index to find relevant pages. The descriptions explicitly guide users to use search first when unsure of the path, then fetch for detailed content, creating a logical workflow without confusion.

Naming Consistency5/5

Both tools follow a perfect verb_noun pattern with consistent snake_case naming: fetch_gemini_doc and search_gemini_docs. The naming clearly indicates the action (fetch/search) and the target (gemini_doc/gemini_docs), making them predictable and easy to understand as a set.

Tool Count3/5

With only 2 tools, this server feels thin for a documentation exploration domain. While the tools cover the core workflow of search-then-fetch, additional operations like listing available documentation categories or getting metadata about the documentation set would enhance completeness. The count is borderline minimal but functional.

Completeness4/5

For a documentation server, the surface covers the essential workflow: searching for relevant pages and fetching detailed content. The main gap is the lack of a tool to browse or list available documentation sections without searching, which could help agents discover content. However, the search tool with its comprehensive examples mitigates this gap reasonably well.

Maintenance

ActivityInactive
ResponsivenessNo issues