home / mcp / rag documentation mcp server

RAG Documentation MCP Server

An MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "hannesrudolph-mcp-ragdocs": {
      "command": "npx",
      "args": [
        "-y",
        "@hannesrudolph/mcp-ragdocs"
      ],
      "env": {
        "QDRANT_URL": "YOUR_QDRANT_URL",
        "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
        "QDRANT_API_KEY": "YOUR_QDRANT_API_KEY"
      }
    }
  }
}

You can run the RAG Documentation MCP Server to augment AI responses with relevant documentation excerpts using vector search. It retrieves and processes documents from multiple sources, making it easy to build documentation-aware AI assistants and tooling for developers.

How to use

You run the MCP server as a local process and connect to it with an MCP client. Once running, you can query the server to search across indexed documentation, retrieve relevant excerpts, and combine them with your AI workflow. Use it to build semantic documentation search into your AI assistants, enable aware responses with context, and flexibly manage multiple documentation sources.

How to install

Prerequisites you need before starting: a recent version of Node.js and npm. You will run the MCP server using npx to execute the package that provides the server.

# Install Node.js (download from official site and install) or use your system package manager
# Verify Node.js and npm versions
node -v
npm -v

# Start the MCP server for rag documentation using npx
npx -y @hannesrudolph/mcp-ragdocs

Configuration and usage notes

The server is designed to be run with environment variables that provide access to model APIs and the vector database. Set the following environment variables when starting the server to enable embeddings and vector storage.

OPENAI_API_KEY=YOUR_OPENAI_API_KEY
QDRANT_URL=YOUR_QDRANT_URL
QDRANT_API_KEY=YOUR_QDRANT_API_KEY

Available tools

search_documentation

Search stored documentation using natural language queries and return matching excerpts with context, ranked by relevance.

list_sources

List all documentation sources currently stored and indexed, including URLs, titles, and last update times.

extract_urls

Extract and analyze all URLs from a given web page, optionally adding found URLs to the processing queue.

remove_documentation

Remove specific documentation sources by their URLs; removal is permanent and affects future search results.

list_queue

List all URLs waiting in the documentation processing queue to monitor pending work.

run_queue

Process and index all URLs in the queue sequentially with error handling and retries, updating progress as it runs.

clear_queue

Remove all pending URLs from the processing queue to reset the state and start fresh.