QDrant RagDocs MCP server

Integrates Retrieval-Augmented Generation using Qdrant vector database and embeddings to enable semantic search and management of documentation.
Back to servers
Setup instructions
Provider
Helton Teixeira
Release date
Dec 20, 2024
Language
TypeScript
Package
Stats
422 downloads
15 stars

The RagDocs MCP Server provides Retrieval-Augmented Generation (RAG) capabilities using Qdrant vector database with Ollama or OpenAI embeddings. It allows you to manage and search through documentation using semantic similarity, making information retrieval more efficient and context-aware.

Prerequisites

Before installing the RagDocs MCP Server, ensure you have:

  • Node.js 16 or higher
  • One of the following Qdrant setups:
    • Local instance using Docker (free)
    • Qdrant Cloud account with API key (managed service)
  • One of the following for embeddings:
    • Ollama running locally (default, free)
    • OpenAI API key (optional, paid)

Installation

Install the RagDocs MCP Server globally using npm:

npm install -g @mcpservers/ragdocs

Setting Up Qdrant

If you don't have a Qdrant instance, you can run it locally using Docker:

docker run -d --name qdrant -p 6333:6333 -p 6334:6334 qdrant/qdrant

Configuration

Configure the MCP server by creating a configuration file with the appropriate environment variables.

Basic Configuration (Local Qdrant + Ollama)

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["@mcpservers/ragdocs"],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "ollama"
      }
    }
  }
}

Using Qdrant Cloud

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["@mcpservers/ragdocs"],
      "env": {
        "QDRANT_URL": "https://your-cluster-url.qdrant.tech",
        "QDRANT_API_KEY": "your-qdrant-api-key",
        "EMBEDDING_PROVIDER": "ollama"
      }
    }
  }
}

Using OpenAI for Embeddings

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["@mcpservers/ragdocs"],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "openai",
        "OPENAI_API_KEY": "your-api-key"
      }
    }
  }
}

Environment Variables

Available configuration options:

  • QDRANT_URL: URL of your Qdrant instance
    • Local default: "http://127.0.0.1:6333"
    • Cloud format: "https://your-cluster-url.qdrant.tech"
  • QDRANT_API_KEY: Required when using Qdrant Cloud
  • EMBEDDING_PROVIDER: Choose "ollama" (default) or "openai"
  • OPENAI_API_KEY: Required if using OpenAI
  • EMBEDDING_MODEL: Model for generating embeddings
    • Ollama default: "nomic-embed-text"
    • OpenAI default: "text-embedding-3-small"

Using the RagDocs MCP Server

The server provides four main tools for managing and retrieving documentation.

Adding Documents

Use the add_document tool to add content to the RAG system:

{
  "url": "https://example.com/docs/page1",
  "content": "This is the content of the document...",
  "metadata": {
    "title": "My Document Title",
    "contentType": "text/markdown"
  }
}

Searching Documents

The search_documents tool lets you perform semantic searches:

{
  "query": "How to configure authentication?",
  "options": {
    "limit": 10,
    "scoreThreshold": 0.75,
    "filters": {
      "domain": "auth.example.com",
      "hasCode": true,
      "after": "2023-01-01T00:00:00Z"
    }
  }
}

Listing Documents

Use list_documents to browse through the stored content:

{
  "page": 2,
  "pageSize": 15,
  "groupByDomain": true,
  "sortBy": "timestamp",
  "sortOrder": "desc"
}

Deleting Documents

Remove documents with the delete_document tool:

{
  "url": "https://example.com/docs/page1"
}

Advanced Search Options

When searching documents, you can use these filtering options:

  • limit: Maximum number of results (1-20, default: 5)
  • scoreThreshold: Minimum similarity score (0-1, default: 0.7)
  • filters:
    • domain: Filter by domain
    • hasCode: Filter for documents containing code
    • after: Filter for documents after date (ISO format)
    • before: Filter for documents before date (ISO format)

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 "ragdocs" '{"command":"node","args":["@mcpservers/ragdocs"],"env":{"QDRANT_URL":"http://127.0.0.1:6333","EMBEDDING_PROVIDER":"ollama"}}'

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": {
        "ragdocs": {
            "command": "node",
            "args": [
                "@mcpservers/ragdocs"
            ],
            "env": {
                "QDRANT_URL": "http://127.0.0.1:6333",
                "EMBEDDING_PROVIDER": "ollama"
            }
        }
    }
}

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": {
        "ragdocs": {
            "command": "node",
            "args": [
                "@mcpservers/ragdocs"
            ],
            "env": {
                "QDRANT_URL": "http://127.0.0.1:6333",
                "EMBEDDING_PROVIDER": "ollama"
            }
        }
    }
}

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