Documentation Fetcher & RAG Search MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/mikkelkrogsholm/documentation-mcp
cd documentation-mcp

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add documentation-fetcher -- node "<FULL_PATH_TO_DOCUMENTATION_MCP>/dist/index.js"

Replace <FULL_PATH_TO_DOCUMENTATION_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Fetch, index, and perform semantic RAG-based searches on API documentation.

Documentation Fetcher & RAG Search

A modular system for fetching API documentation and enabling semantic search via RAG (Retrieval-Augmented Generation). Designed to give AI coding assistants like Claude access to up-to-date documentation from any project.

Features

  • Fetch Documentation: Download complete documentation from API providers in markdown format
  • Semantic Search: Hybrid search combining vector embeddings with keyword matching
  • MCP Server: Expose search as tools accessible from Claude Code in any project
  • Modular Design: Easy to add new documentation sources

Supported Documentation Sources

Source Documents Description
Gemini ~2000 Google Gemini API - LLM, function calling, embeddings, multimodal
FastMCP ~1900 FastMCP framework - MCP servers, tools, resources, authentication

Quick Start

Prerequisites

  • Python 3.12+
  • Ollama with bge-m3 model
  • Claude Code (for MCP integration)

Installation

# Clone the repository
git clone <repository-url>
cd documentation

# Create virtual environment
python3.12 -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Pull the embedding model
ollama pull bge-m3

Fetch & Index Documentation

# Fetch documentation
python -m src.main fetch gemini
python -m src.main fetch fastmcp

# Index for search (requires Ollama running)
python -m src.rag.index gemini
python -m src.rag.index fastmcp

Search Documentation

# Search Gemini docs
python -m src.main search "function calling"

# Search FastMCP docs
python -m src.main search "how to create a tool" -c fastmcp

# More results
python -m src.main search "rate limits" -n 10

MCP Server Integration

The MCP server exposes documentation search as tools that Claude Code can use from any project.

Install in Claude Code

IMPORTANT: MCP configuration requires absolute paths. The cwd field is NOT supported by Claude Code.

Option 1: Using Claude CLI (recommended)

# Replace /path/to/documentation with your actual absolute path
claude mcp add docs-search --scope user --transport stdio -- \
  /path/to/documentation/.venv/bin/python \
  /path/to/documentation/src/mcp_server.py

Option 2: Add to ~/.claude.json manually

{
  "mcpServers": {
    "docs-search": {
      "command": "/path/to/documentation/.venv/bin/python",
      "args": ["/path/to/documentation/src/mcp_server.py"]
    }
  }
}

Common mistakes to avoid:

  • Do NOT use cwd - it's not a valid MCP configuration field
  • Do NOT use relative paths - they resolve from the caller's directory
  • Do NOT use -m src.mcp_server - this requires being in the project directory

Verify Installation

# Check server is registered
claude mcp list

# In Claude Code, check connection status
/mcp

Available Tools

Tool Description
search_docs(query, collection, num_results) Search documentation with hybrid semantic + keyword search
list_collections() List available documentation collections

Available Resources

Resource URI Description
docs://collections JSON list of all collections
docs://gemini/pages List of all Gemini documentation pages
docs://fastmcp/pages List of all FastMCP documentation pages
docs://gemini/search-help Search tips for Gemini docs
docs://fastmcp/search-help Search tips for FastMCP docs

Usage from Claude Code

Once installed, you can ask Claude from any project:

  • "Search the gemini docs for function calling"
  • "What documentation collections are available?"
  • "Search fastmcp for how to create tools"
  • "Find rate limit information in gemini docs"

Project Structure

documentation/
├── src/
│   ├── main.py                 # CLI entry point
│   ├── mcp_server.py           # MCP server for Claude Code
│   ├── core/
│   │   ├── fetcher.py          # HTTP/markdown fetching
│   │   └── parser.py           # Navigation parsing
│   ├── modules/
│   │   ├── base.py             # Abstract base class
│   │   ├── gemini/             # Gemini documentation module
│   │   └── fastmcp/            # FastMCP documentation module
│   └── rag/
│       ├── chunker.py          # Markdown-aware chunking
│       ├── embedder.py         # Ollama bge-m3 embeddings
│       ├── sqlite_store.py     # SQLite + sqlite-vec vector store
│       ├── search.py           # Hybrid search with RRF
│       ├── query_expander.py   # Multi-query expansion (LLM)
│       ├── reranker.py         # Cross-encoder reranking
│       └── index.py            # Indexing CLI
├── output/                     # Fetched documentation
│   ├── gemini/
│   └── fastmcp/
├── data/
│   └── docs.db                 # SQLite vector database
├── requirements.txt
└── README.md

Adding New Documentation Sources

1

Tools (2)

search_docsSearch documentation with hybrid semantic + keyword search
list_collectionsList available documentation collections

Configuration

claude_desktop_config.json
{"mcpServers": {"docs-search": {"command": "/path/to/documentation/.venv/bin/python", "args": ["/path/to/documentation/src/mcp_server.py"]}}}

Try it

Search the gemini docs for function calling
What documentation collections are available?
Search fastmcp for how to create tools
Find rate limit information in gemini docs

Frequently Asked Questions

What are the key features of Documentation Fetcher & RAG Search?

Download complete documentation from API providers in markdown format. Hybrid search combining vector embeddings with keyword matching. Expose search as tools accessible from Claude Code. Modular design for adding new documentation sources.

What can I use Documentation Fetcher & RAG Search for?

Accessing up-to-date Gemini API documentation during coding sessions. Retrieving specific implementation details for the FastMCP framework. Performing semantic searches across multiple technical documentation sets. Integrating external API knowledge directly into the AI coding assistant workflow.

How do I install Documentation Fetcher & RAG Search?

Install Documentation Fetcher & RAG Search by running: claude mcp add docs-search --scope user --transport stdio -- /path/to/documentation/.venv/bin/python /path/to/documentation/src/mcp_server.py

What MCP clients work with Documentation Fetcher & RAG Search?

Documentation Fetcher & RAG Search works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Documentation Fetcher & RAG Search docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare