# R2R MCP for AI Agents AI Agent Connect

> R2R gives your AI agent direct access to your RAG infrastructure. It allows your agent to execute vector searches, run precise RAG queries, and manage your documents directly from your chat interface. Stop copy-pasting context; let your agent query your knowledge base on demand to get accurate, data-driven answers.

## Overview
- **Category:** friends-mcp
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_Psy9XiP4IhGY7SchHirciLtxL89aKlE6LAoJStd2/ai-agent-connect
- **Tags:** rag, vector-search, document-ingestion, knowledge-management, semantic-retrieval

## Description

Most people struggle to give their AI the right context without cluttering the chat window with massive files. If you're running a RAG pipeline, you know the pain of trying to keep your agent updated on the latest company docs or technical specs. This Connector changes that by putting your RAG deployment right into your chat interface. Your agent can now look things up itself. When you ask a question, it doesn't just guess; it goes into your database, finds the relevant chunks, and pulls out the facts. You get to stop being the middleman who copies and pastes data from a dashboard into a prompt. By adding this to your setup through the Vinkius marketplace, you're essentially giving your agent a brain that knows your specific business logic and history. It's about moving from telling your AI what to know to letting the AI find what it needs. You can check what's been ingested, see the metadata for specific files, and even make sure the connection is live without leaving your workspace. It turns a complex backend into a simple conversation. Instead of juggling multiple tabs and manual lookups, you have a unified way to interact with your knowledge base. It makes your data actually usable in a conversational way.

## Tools

### get_document
Pull the specific details and metadata for a single document. Use this to inspect how your files are indexed.

### list_collections
View all the different document collections you've organized. This keeps your data structure visible to your agent.

### get_health
Check if your R2R system is up and running correctly. It provides a quick way to verify your connection status.

### search
Run a semantic vector search to find relevant information in your data. It allows your agent to find specific context instantly.

### rag_query
Execute a full RAG query to get summarized answers from your data. This gives your agent the ability to synthesize complex info.

### list_documents
See every file currently stored in your R2R system. This helps you quickly verify your data inventory.

## Prompt Examples

**Prompt:** 
```
What is the company policy on remote work for contractors?
```

**Response:** 
```
Based on the documents in your R2R system, here is the current policy:

**Remote Work Policy - Contractors**
* **Eligibility:** All contractors with a performance rating of 'Exceeds Expectations' are eligible.
* **Schedule:** Up to 3 days per week, subject to manager approval.
* **Equipment:** Company will provide a VPN license but not hardware.

*Source: `Contractor_Handbook_2024.pdf`*
```

**Prompt:** 
```
Is the R2R system currently online and healthy?
```

**Response:** 
```
I checked the system status for you.

**System Status:** ✅ OK

The R2R system is currently responsive and ready to accept vector searches and RAG queries.
```

**Prompt:** 
```
List the documents in the 'HR_Policy' collection.
```

**Response:** 
```
I found 4 documents in the `HR_Policy` collection:

| Document Name | Last Updated |
| :--- | :--- |
| Employee_Handbook.pdf | 2024-01-15 |
| Benefits_Summary.pdf | 2023-11-20 |
| Leave_Policy.pdf | 2024-02-01 |
| Remote_Work_Addendum.pdf | 2024-03-10 |
```

## Capabilities

### Search your vector database
Let your agent perform semantic similarity queries to find relevant information.

### Get summaries from your RAG pipeline
Have your agent summarize data based on your specific vector results.

### List all ingested documents
See a full list of everything your system has indexed.

### Retrieve specific document details
Get the metadata and details for any single file in your database.

### Browse your document collections
View and organize your various document groups in one place.

### Check system health status
Verify that your connection is live and the system is responding.

## Use Cases

### Finding specific policies
An engineer needs to find the remote work policy in a 500-page PDF. They ask the agent, which uses `search` to find the exact section and summarizes it instantly.

### Auditing document ingestion
A data manager wants to see if the latest HR docs were indexed. They ask the agent to `list_documents` to show the current inventory in the chat.

### Checking system uptime
A developer needs to know if the RAG engine is responding. They ask the agent to check the system status using `get_health` to confirm the connection is live.

### Summarizing technical manuals
A user wants a summary of a complex technical manual. The agent uses `rag_query` to synthesize a summary from the actual vector data instead of guessing.

## Benefits

- Stop manual copy-pasting by letting the agent use `search` to find context automatically.
- Get accurate summaries of your private data using `rag_query` instead of generic AI answers.
- Audit your data ingestion status quickly with `list_documents` and `list_collections` in one place.
- Verify your system's uptime instantly with `get_health` without opening a new terminal.
- Access specific file metadata via `get_document` to ensure your RAG chunks are accurate.

## How It Works

The bottom line is your AI gets a direct line to your private knowledge base.

1. Connect the Connector and provide your R2R Base URL and Auth Key.
2. Your AI client gains the ability to call your specific R2R endpoints.
3. Ask questions and get answers based on your private data.

## Frequently Asked Questions

**How does the R2R MCP help with my private data?**
It gives your AI a direct line to your private knowledge base. Instead of feeding files manually, your agent can query your RAG infrastructure to find facts on demand.

**Can I use R2R MCP to search my company's PDFs?**
Yes, it uses vector search to find specific sections of your PDFs. This means your agent can pull out the exact context it needs from your company's documents.

**Do I need to set up a database first?**
You need an active R2R deployment. This Connector connects to an existing RAG infrastructure, so you'll need your Base URL and Auth Key ready to go.

**How does R2R MCP handle summaries?**
It uses the RAG query tool to synthesize answers. Your agent will look at your vector data and provide a summary based on what's actually in your files.

**Can I check my document status with R2R MCP?**
Yes, you can list all ingested documents directly in the chat. This makes it easy to see what's been processed without checking a separate dashboard.

**Will R2R MCP work with my existing RAG setup?**
Yes, as long as your RAG system is compatible with the R2R protocol. You just need to provide the correct connection details in your settings.

**What URL should I use for the R2R API URL?**
If you are running R2R locally via Docker, it's typically `http://localhost:7272`. If you are using SciPhi Cloud or have it deployed on your own infrastructure, provide the exact public or private endpoint.

**Do I need an R2R API Key?**
It depends on your deployment. Open deployments for local testing may not require a key. Production deployments or SciPhi Cloud environments require you to provide the generated key.

**What is the difference between RAG and Search?**
The `search` tool issues a standard vector similarity match—it returns relevant raw snippets from your database. The `rag_query` tool asks the R2R server to perform the search and compute an intelligent answer wrapping those snippets using an LLM.

**Are document ingestions possible via chat?**
No. This integration is designed for observational toolsets (listing documents, inspecting states, querying the index). Heavy ingestions of PDFs or websites should be handled through scripts or the dashboard.