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.
Before installing the MCP Server RAGDocs, you'll need:
Install the package using npm:
npm install @sanderkooger/mcp-server-ragdocs
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.
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"
}
}
}
}
{
"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"
}
}
}
}
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
}
}
}
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 |
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:
You can access these services at:
If you prefer to use Ollama without Docker:
curl -fsSL https://ollama.com/install.sh | sh
ollama pull nomic-embed-text
ollama list
The MCP server provides several tools for working with documentation:
Search through stored documentation using natural language queries:
{
"query": "How to configure authentication?",
"limit": 5
}
View all documentation sources currently stored in the system:
{}
Extract and analyze all URLs from a given web page:
{
"url": "https://example.com/docs",
"add_to_queue": true
}
Remove specific documentation sources by their URLs:
{
"urls": ["https://example.com/docs/page1", "https://example.com/docs/page2"]
}
View all URLs currently waiting in the processing queue:
{}
Process and index all URLs in the documentation queue:
{}
Remove all pending URLs from the documentation queue:
{}
The server supports both local and containerized Playwright for web scraping:
PLAYWRIGHT_WS_ENDPOINT
is setPLAYWRIGHT_WS_ENDPOINT
is configuredTo 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/
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.
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": {
"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"
}
}
}
}
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": {
"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