This MCP server implementation provides tools for retrieving and processing documentation through vector search, allowing AI assistants to enhance their responses with relevant documentation context. It offers semantic search capabilities across multiple documentation sources for real-time context augmentation.
To use the RAG Documentation MCP server, you'll need to configure it with Claude Desktop by adding the following to your claude_desktop_config.json
:
{
"mcpServers": {
"rag-docs": {
"command": "npx",
"args": [
"-y",
"@hannesrudolph/mcp-ragdocs"
],
"env": {
"OPENAI_API_KEY": "",
"QDRANT_URL": "",
"QDRANT_API_KEY": ""
}
}
}
}
You must provide values for these environment variables:
OPENAI_API_KEY
: Your OpenAI API key for generating embeddingsQDRANT_URL
: URL of your Qdrant vector database instanceQDRANT_API_KEY
: API key for Qdrant authenticationThe search_documentation
tool lets you search through stored documentation using natural language queries.
Inputs:
query
(string): Text to search for in the documentation (natural language query, specific terms, or code snippets)limit
(number, optional): Maximum results to return (1-20, default: 5)Use list_sources
to view all documentation sources currently stored in the system. This returns a comprehensive list of indexed documentation including source URLs, titles, and last update times.
The extract_urls
tool crawls a specified webpage and identifies all hyperlinks.
Inputs:
url
(string): Complete URL of the webpage to analyze (must include protocol)add_to_queue
(boolean, optional): If true, automatically adds extracted URLs to the processing queueTo remove specific documentation sources from the system:
Inputs:
urls
(string[]): Array of URLs to remove from the database (must exactly match the URL used when adding documentation)Three tools help you manage the documentation processing queue:
list_queue
: Shows all URLs waiting in the processing queuerun_queue
: Processes and indexes all URLs in the queue sequentiallyclear_queue
: Removes all pending URLs from the queueThe RAG Documentation tool can be effectively used for:
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 > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.