R2R
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You have a fast MCP server that bridges R2R with Claude Desktop. It provides five specialized tools for retrieval-augmented generation and an OpenAPI-backed option for full R2R API access. Run locally, test with a GUI inspector, and integrate with Claude Desktop to enhance your conversational AI workflows.
How to use
You connect to the MCP server from your MCP client (the Claude Desktop integration) and call the available tools to perform knowledge retrieval, document search, graph-based queries, and RAG-enabled responses. Use the standard MCP install and run workflow, then configure your client to point at the running server. You can choose between a lightweight local stdio server (directly running Python) or a production HTTP server that is exposed on a port.
How to install
Prerequisites: Python 3.12 or newer, uv 0.6 or newer, and a running R2R instance.
# Install dependencies via uv (fast MCP workflow)
make install
# Copy default environment and tailor settings
cp .env.example .env
# Edit .env with your configuration
# Optional code quality check
make lint
# Run the MCP server
make run
OpenAPI server for full R2R API
If you need full access to all R2R API endpoints, you can run the OpenAPI server locally in stdio mode or deploy it in production as an HTTP service.
# Local development (stdio)
python r2r_openapi_server.py
# Production deployment (HTTP)
uvicorn r2r_openapi_server:app --host 0.0.0.0 --port 8000
Install OpenAPI MCP server for Claude Desktop
Attach the OpenAPI MCP server to Claude Desktop so you can access the full R2R API from the client.
# Claude Desktop installation
mcp install r2r_openapi_server.py -v R2R_BASE_URL=http://localhost:7272
Run and test in GUI inspector
For visual testing, use the MCP Inspector GUI. It starts a web interface where you can view all available MCP tools, call them with parameters, and observe results and logs in real time.
make run-inspector
Notes on tools and capabilities
The MCP server exposes five specialized tools for R2R integration: search, rag, advanced_search, graph_search, and advanced_rag. Each tool is designed to help you perform knowledge retrieval, nuanced searches, and generation-augmented responses within Claude Desktop.
Available tools
search
Search the R2R knowledge base to retrieve relevant documents, vector results, graphs, or web/document sources.
rag
Perform a retrieval-augmented generation request with automatic answer synthesis from retrieved content.
advanced_search
Advanced retrieval across multiple data sources with refined query controls.
graph_search
Query the knowledge graph to discover connections and relationships between entities.
advanced_rag
Enhanced RAG pipeline with additional control over sources and synthesis.