Qdrant Docs Rag MCP server

Real-time documentation context through vector-based search and retrieval via Qdrant.
Back to servers
Setup instructions
Provider
Hannes Rudolph
Release date
Dec 13, 2024
Language
TypeScript
Package
Stats
1.8K downloads
228 stars

This MCP server implementation provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context. It uses semantic search capabilities to find and retrieve information from multiple documentation sources, making it ideal for creating documentation-aware AI assistants.

Installation

To install and configure the RAG Documentation MCP Server, follow these steps:

Prerequisites

You'll need:

  • Node.js installed on your system
  • An OpenAI API key for embeddings generation
  • A Qdrant vector database instance with its URL and API key

Setup with Claude Desktop

Add this configuration to your claude_desktop_config.json file:

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

Make sure to replace the placeholder values with your actual API keys and URLs.

Available Tools

Documentation Search

Use the search_documentation tool to search through stored documentation using natural language queries:

// Example query
{
  "query": "How to implement authentication in Express.js",
  "limit": 10
}

Parameters:

  • query (required): Your search text in natural language
  • limit (optional): Number of results to return (1-20, default: 5)

Managing Documentation Sources

Listing Available Sources

To see what documentation is currently available for searching:

// List all indexed documentation sources
{}

This returns details about all indexed documentation including source URLs, titles, and last update times.

Adding New Documentation

To add new documentation from a website:

  1. First extract URLs from a webpage:
{
  "url": "https://example.com/docs",
  "add_to_queue": true
}
  1. Process the queue to index the documentation:
// Process all queued URLs
{}

Checking Queue Status

To see what URLs are pending for processing:

// List all URLs in the processing queue
{}

Removing Documentation

To remove specific documentation sources:

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

Queue Management

Clear the processing queue if needed:

// Remove all pending URLs from the queue
{}

Practical Usage Examples

Example 1: Search for Technical Documentation

{
  "query": "How to implement JWT authentication in Node.js",
  "limit": 5
}

Example 2: Index a Documentation Website

Step 1: Extract URLs from the main documentation page

{
  "url": "https://expressjs.com/en/guide/routing.html",
  "add_to_queue": true
}

Step 2: Check what's in the queue

{}  // Using the list_queue tool

Step 3: Process the queue to index all documentation

{}  // Using the run_queue tool

Step 4: Verify indexed documentation

{}  // Using the list_sources tool

Example 3: Remove Outdated Documentation

{
  "urls": ["https://oldversion.example.com/docs"]
}

By following these steps and using the available tools, you can build a comprehensive documentation search system that enhances AI assistant responses with relevant, context-aware information.

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","@hannesrudolph/mcp-ragdocs"],"env":{"OPENAI_API_KEY":"","QDRANT_URL":"","QDRANT_API_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",
                "@hannesrudolph/mcp-ragdocs"
            ],
            "env": {
                "OPENAI_API_KEY": "",
                "QDRANT_URL": "",
                "QDRANT_API_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",
                "@hannesrudolph/mcp-ragdocs"
            ],
            "env": {
                "OPENAI_API_KEY": "",
                "QDRANT_URL": "",
                "QDRANT_API_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