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.
To install and configure the RAG Documentation MCP Server, follow these steps:
You'll need:
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.
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 languagelimit
(optional): Number of results to return (1-20, default: 5)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.
To add new documentation from a website:
{
"url": "https://example.com/docs",
"add_to_queue": true
}
// Process all queued URLs
{}
To see what URLs are pending for processing:
// List all URLs in the processing queue
{}
To remove specific documentation sources:
{
"urls": [
"https://example.com/docs/page1",
"https://example.com/docs/page2"
]
}
Clear the processing queue if needed:
// Remove all pending URLs from the queue
{}
{
"query": "How to implement JWT authentication in Node.js",
"limit": 5
}
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
{
"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.
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.
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",
"@hannesrudolph/mcp-ragdocs"
],
"env": {
"OPENAI_API_KEY": "",
"QDRANT_URL": "",
"QDRANT_API_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",
"@hannesrudolph/mcp-ragdocs"
],
"env": {
"OPENAI_API_KEY": "",
"QDRANT_URL": "",
"QDRANT_API_KEY": ""
}
}
}
}
3. Restart Claude Desktop for the changes to take effect