RAG Documentation Search MCP server

Provides semantic document search and retrieval through vector embeddings, enabling context-aware responses backed by specific documentation sources
Back to servers
Setup instructions
Provider
Sander Kooger
Release date
Mar 13, 2025
Language
TypeScript
Package
Stats
1.1K downloads
22 stars

MCP Server RAGDocs is a specialized server implementation for the Model Context Protocol that enhances AI assistants by providing tools to retrieve and process documentation through vector search. It enables context-aware AI responses by integrating relevant documentation during interactions.

Installation

Prerequisites

Before installing the MCP Server RAGDocs, you'll need:

  • Node.js environment
  • Vector database (Qdrant)
  • Embeddings provider (either OpenAI API or Ollama)

Basic Installation

Install the package using npm:

npm install @sanderkooger/mcp-server-ragdocs

Configuration

The MCP server requires configuration to connect with your vector database and embeddings provider. You can configure it in your Claude Desktop configuration file or other MCP-compatible client.

Configuration with OpenAI Embeddings

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "rag-docs-openai": {
      "command": "npx",
      "args": ["-y", "@sanderkooger/mcp-server-ragdocs"],
      "env": {
        "EMBEDDINGS_PROVIDER": "openai",
        "OPENAI_API_KEY": "your-openai-key-here",
        "QDRANT_URL": "your-qdrant-url",
        "QDRANT_API_KEY": "your-qdrant-key"
      }
    }
  }
}

Configuration with Ollama Embeddings

{
  "mcpServers": {
    "rag-docs-ollama": {
      "command": "npx",
      "args": ["-y", "@sanderkooger/mcp-server-ragdocs"],
      "env": {
        "EMBEDDINGS_PROVIDER": "ollama",
        "OLLAMA_BASE_URL": "http://localhost:11434",
        "QDRANT_URL": "your-qdrant-url",
        "QDRANT_API_KEY": "your-qdrant-key"
      }
    }
  }
}

Running from Source Code

If you want to run from the source code:

{
  "mcpServers": {
    "ragdocs-mcp": {
      "command": "node",
      "args": [
        "/path/to/mcp-server-ragdocs/build/index.js"
      ],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDINGS_PROVIDER": "ollama",
        "OLLAMA_URL": "http://localhost:11434"
      },
      "alwaysAllow": [
        "run_queue",
        "list_queue",
        "list_sources",
        "search_documentation",
        "clear_queue",
        "remove_documentation",
        "extract_urls"
      ],
      "timeout": 3600
    }
  }
}

Environment Variables

Variable Required For Default Remarks
EMBEDDINGS_PROVIDER All ollama "openai" or "ollama"
OPENAI_API_KEY OpenAI - Obtain from OpenAI dashboard
OLLAMA_BASE_URL Ollama http://localhost:11434 Local Ollama server URL
QDRANT_URL All http://localhost:6333 Qdrant endpoint URL
QDRANT_API_KEY Cloud Qdrant - From Qdrant Cloud console
PLAYWRIGHT_WS_ENDPOINT Playwright Remote - WebSocket endpoint for remote Playwright server

Local Deployment

The easiest way to get started is by using Docker Compose for local development:

# Download the docker-compose.yml file
curl -O https://raw.githubusercontent.com/sanderkooger/mcp-server-ragdocs/main/docker-compose.yml

# Start the services
docker compose up -d

This starts:

  • Qdrant vector database on port 6333
  • Ollama LLM service on port 11434

You can access these services at:

Using Ollama Without Docker

If you prefer to use Ollama without Docker:

  1. Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh
  1. Download the embedding model:
ollama pull nomic-embed-text
  1. Verify installation:
ollama list

Using the RAG Documentation Tools

The MCP server provides several tools for working with documentation:

Search Documentation

Search through stored documentation using natural language queries:

{
  "query": "How to configure authentication?",
  "limit": 5
}

List Sources

View all documentation sources currently stored in the system:

{}

Extract URLs

Extract and analyze all URLs from a given web page:

{
  "url": "https://example.com/docs",
  "add_to_queue": true
}

Remove Documentation

Remove specific documentation sources by their URLs:

{
  "urls": ["https://example.com/docs/page1", "https://example.com/docs/page2"]
}

List Queue

View all URLs currently waiting in the processing queue:

{}

Run Queue

Process and index all URLs in the documentation queue:

{}

Clear Queue

Remove all pending URLs from the documentation queue:

{}

Playwright Integration

The server supports both local and containerized Playwright for web scraping:

  • Local mode: Used by default when no PLAYWRIGHT_WS_ENDPOINT is set
  • Remote mode: Used when PLAYWRIGHT_WS_ENDPOINT is configured

To use Playwright in Docker:

# Start the Playwright container
docker-compose up playwright

# Set the environment variable to connect to it
export PLAYWRIGHT_WS_ENDPOINT=ws://localhost:3000/

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "rag-docs" '{"command":"npx","args":["-y","@sanderkooger/mcp-server-ragdocs"],"env":{"EMBEDDINGS_PROVIDER":"ollama","QDRANT_URL":"your-qdrant-url","QDRANT_API_KEY":"your-qdrant-key"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "rag-docs": {
            "command": "npx",
            "args": [
                "-y",
                "@sanderkooger/mcp-server-ragdocs"
            ],
            "env": {
                "EMBEDDINGS_PROVIDER": "ollama",
                "QDRANT_URL": "your-qdrant-url",
                "QDRANT_API_KEY": "your-qdrant-key"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "rag-docs": {
            "command": "npx",
            "args": [
                "-y",
                "@sanderkooger/mcp-server-ragdocs"
            ],
            "env": {
                "EMBEDDINGS_PROVIDER": "ollama",
                "QDRANT_URL": "your-qdrant-url",
                "QDRANT_API_KEY": "your-qdrant-key"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later