RAG Docs MCP server

Integrates semantic search and retrieval of documentation using a vector database (Qdrant), enabling efficient access to large document collections.
Back to servers
Setup instructions
Provider
qpd-v
Release date
Dec 13, 2024
Language
TypeScript
Stats
111 stars

This MCP server enables semantic search and retrieval of documentation using a vector database (Qdrant). It allows you to add documentation from URLs or local files and search through them using natural language queries, making it easier to find relevant information in your documentation.

Installation

Prerequisites

  • Node.js 16 or higher
  • Qdrant vector database (local or cloud)
  • Embedding provider (Ollama or OpenAI)

Step 1: Install the package

Install the MCP server globally using npm:

npm install -g @qpd-v/mcp-server-ragdocs

Step 2: Set up Qdrant

Option 1: Local Qdrant (recommended for getting started)

Using Docker:

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

Option 2: Qdrant Cloud

  1. Create an account at Qdrant Cloud
  2. Create a new cluster
  3. Get your cluster URL and API key from the dashboard

Step 3: Set up an embedding provider

Using Ollama (free, default option):

ollama pull nomic-embed-text

Using OpenAI (paid alternative):

  • Get an API key from OpenAI

Step 4: Configure your client

For Cline/Roo:

Edit the settings file at one of these locations:

  • Cline: %AppData%\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
  • Roo-Code: %AppData%\Roaming\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json

With Ollama:

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@qpd-v/mcp-server-ragdocs/build/index.js"],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "ollama",
        "OLLAMA_URL": "http://localhost:11434"
      }
    }
  }
}

With OpenAI:

{
  "mcpServers": {
    "ragdocs": {
      "command": "node",
      "args": ["C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@qpd-v/mcp-server-ragdocs/build/index.js"],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "openai",
        "OPENAI_API_KEY": "your-openai-api-key"
      }
    }
  }
}

For Claude Desktop:

Edit the config file at:

  • Windows: %AppData%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows with Ollama:

{
  "mcpServers": {
    "ragdocs": {
      "command": "C:\\Program Files\\nodejs\\node.exe",
      "args": [
        "C:\\Users\\YOUR_USERNAME\\AppData\\Roaming\\npm\\node_modules\\@qpd-v/mcp-server-ragdocs\\build\\index.js"
      ],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "ollama",
        "OLLAMA_URL": "http://localhost:11434"
      }
    }
  }
}

macOS with Ollama:

{
  "mcpServers": {
    "ragdocs": {
      "command": "/usr/local/bin/node",
      "args": [
        "/usr/local/lib/node_modules/@qpd-v/mcp-server-ragdocs/build/index.js"
      ],
      "env": {
        "QDRANT_URL": "http://127.0.0.1:6333",
        "EMBEDDING_PROVIDER": "ollama",
        "OLLAMA_URL": "http://localhost:11434"
      }
    }
  }
}

Step 5: Verify installation

Check that all components are running correctly:

# Check Qdrant is running
curl http://localhost:6333/collections

# Check Ollama has the model
ollama list | grep nomic-embed-text

Usage

Once configured, you can use the MCP server through your Claude interface (Desktop, Cline, or Roo). The server provides the following tools:

Adding Documentation

To add documentation from a URL:

Add this documentation: https://docs.example.com/api

Searching Documentation

To search through stored documentation:

Search the documentation for information about authentication

You can also specify the maximum number of results:

Search the documentation for API endpoints and show me the top 10 results

Listing Sources

To view all available documentation sources:

What documentation sources are available?

Configuration Options

Environment Variables

Qdrant Configuration:

  • QDRANT_URL (required): URL of your Qdrant instance
  • QDRANT_API_KEY (required for cloud): Your Qdrant Cloud API key

Embeddings Configuration:

  • EMBEDDING_PROVIDER: Choose between 'ollama' (default) or 'openai'
  • EMBEDDING_MODEL:
    • For Ollama: defaults to 'nomic-embed-text'
    • For OpenAI: defaults to 'text-embedding-3-small'
  • OLLAMA_URL: URL of your Ollama instance (defaults to http://localhost:11434)
  • OPENAI_API_KEY: Required if using OpenAI

Troubleshooting

Common Issues

Qdrant Connection Error:

Error: Failed to connect to Qdrant at http://localhost:6333
  • Check if Docker is running
  • Verify Qdrant container is running: docker ps | grep qdrant
  • Try restarting the container

Ollama Model Missing:

Error: Model nomic-embed-text not found
  • Run: ollama pull nomic-embed-text
  • Verify model is installed: ollama list

Configuration Path Issues:

  • Replace YOUR_USERNAME with your actual Windows username
  • Check file permissions
  • Verify the paths exist

npm Global Install Issues:

  • Try installing with admin privileges
  • Check npm is in PATH: npm -v
  • Verify global installation: npm list -g @qpd-v/mcp-server-ragdocs

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":["C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@qpd-v/mcp-server-ragdocs/build/index.js"],"env":{"QDRANT_URL":"http://127.0.0.1:6333","EMBEDDING_PROVIDER":"ollama","OLLAMA_URL":"http://localhost:11434"}}'

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": [
                "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@qpd-v/mcp-server-ragdocs/build/index.js"
            ],
            "env": {
                "QDRANT_URL": "http://127.0.0.1:6333",
                "EMBEDDING_PROVIDER": "ollama",
                "OLLAMA_URL": "http://localhost:11434"
            }
        }
    }
}

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": [
                "C:/Users/YOUR_USERNAME/AppData/Roaming/npm/node_modules/@qpd-v/mcp-server-ragdocs/build/index.js"
            ],
            "env": {
                "QDRANT_URL": "http://127.0.0.1:6333",
                "EMBEDDING_PROVIDER": "ollama",
                "OLLAMA_URL": "http://localhost:11434"
            }
        }
    }
}

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