Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
4.3 KiB
The R2R Retrieval System is a Model Context Protocol (MCP) server that enhances Claude with retrieval and search capabilities. This server enables Claude to search through your knowledge base, perform vector searches, graph searches, web searches, and document searches, making it a powerful tool for retrieving relevant information.
Features
- Vector Search: Find relevant text chunks based on semantic similarity
- Graph Search: Explore relationships between entities in your knowledge graph
- Web Search: Retrieve information from online sources
- Document Search: Access and query local context documents
- RAG (Retrieval-Augmented Generation): Generate answers based on retrieved context
Installation
Prerequisites
- Claude Desktop (macOS or Windows)
- Node.js
- Python 3.6 or higher
mcpPython package
Local Installation
- Install the R2R MCP server locally:
pip install mcp
mcp install r2r/mcp.py -v R2R_API_URL=http://localhost:7272
- Start your local R2R API service at the specified URL.
Cloud Installation
For cloud deployment, use your API key:
pip install mcp
mcp install r2r/mcp.py -v R2R_API_KEY=your_api_key_here
Adding to Claude Desktop
Note: This section is only necessary if the pip installation method fails. In most cases, the pip installation above should be sufficient to make the R2R server available to Claude.
-
Open Claude Desktop and access the Settings:
- On macOS: Click on the Claude menu and select "Settings..."
- On Windows: Click on the Claude menu and select "Settings..."
-
In Settings, click on "Developer" in the left sidebar, then click "Edit Config"
-
Add the R2R server to your configuration file:
{
"mcpServers": {
"r2r": {
"command": "mcp",
"args": ["run", "/my/path/to/R2R/py/r2r/mcp.py"]
}
}
}
-
Save the configuration file and restart Claude Desktop
-
After restarting, you should see the hammer icon in the bottom right corner of the input box, indicating that MCP tools are available
Using the R2R Retrieval System
Once configured, Claude can automatically use the R2R tools when appropriate. You can also explicitly request Claude to use these tools:
-
Search: Ask Claude to search your knowledge base with specific queries Example: "Search for information about vector databases in our documentation"
-
RAG: Request Claude to generate answers based on retrieved context Example: "Use RAG to answer: What are the best practices for knowledge graph integration?"
Available Tools
The R2R server provides two primary tools:
-
search: Performs retrieval operations and returns formatted results
- Searches across vector, graph, web, and document sources
- Returns source IDs and content for further reference
-
rag: Performs Retrieval-Augmented Generation
- Retrieves relevant context and generates an answer
- Provides a coherent response based on the knowledge base
Example Outputs
When using the search tool, you'll receive structured results like:
Vector Search Results:
Source ID [abc1234]:
Text content from the vector search...
Graph Search Results:
Source ID [def5678]:
Entity Name: Sample Entity
Description: This is a description of the entity...
Web Search Results:
Source ID [ghi9012]:
Title: Sample Web Page
Link: https://example.com
Snippet: A snippet from the web page...
Local Context Documents:
Full Document ID: jkl3456...
Shortened Document ID: jkl3456
Document Title: Sample Document
Summary: A summary of the document...
Chunk ID abc1234:
Text content from the document chunk...
Troubleshooting
- If the server doesn't appear in Claude, check that the configuration file is formatted correctly
- Ensure that the R2R service is running at the specified URL for local installations
- Verify that your API key is valid for cloud installations
- Check the Claude Desktop logs for any error messages
Next Steps
- Explore other MCP servers that can be integrated with Claude
- Consider building custom tools to extend the R2R functionality
- Contribute to the MCP community by sharing your experiences and use cases
For more information on MCP and its capabilities, refer to the official MCP documentation. For specific questions about the R2R Retrieval System, please contact your system administrator or developer.