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.
Before installing the RagDocs MCP Server, ensure you have:
Install the RagDocs MCP Server globally using npm:
npm install -g @mcpservers/ragdocs
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
Configure the MCP server by creating a configuration file with the appropriate environment variables.
{
"mcpServers": {
"ragdocs": {
"command": "node",
"args": ["@mcpservers/ragdocs"],
"env": {
"QDRANT_URL": "http://127.0.0.1:6333",
"EMBEDDING_PROVIDER": "ollama"
}
}
}
}
{
"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"
}
}
}
}
{
"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"
}
}
}
}
Available configuration options:
QDRANT_URL
: URL of your Qdrant instance
QDRANT_API_KEY
: Required when using Qdrant CloudEMBEDDING_PROVIDER
: Choose "ollama" (default) or "openai"OPENAI_API_KEY
: Required if using OpenAIEMBEDDING_MODEL
: Model for generating embeddings
The server provides four main tools for managing and retrieving documentation.
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"
}
}
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"
}
}
}
Use list_documents
to browse through the stored content:
{
"page": 2,
"pageSize": 15,
"groupByDomain": true,
"sortBy": "timestamp",
"sortOrder": "desc"
}
Remove documents with the delete_document
tool:
{
"url": "https://example.com/docs/page1"
}
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 domainhasCode
: Filter for documents containing codeafter
: Filter for documents after date (ISO format)before
: Filter for documents before date (ISO format)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.
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.
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"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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