rag-retrieval-mcp
Provides embedding generation for semantic search using OpenAI's text-embedding models.
Enables vector similarity search in PostgreSQL via the pgvector extension.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rag-retrieval-mcpfind relevant documents about renewable energy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server for RAG Retrieval
A generic Retrieval-Augmented Generation (RAG) Model Context Protocol (MCP) server with pluggable embedding providers and vector stores.
Why this server?
Vendor MCP servers usually only support their (own) integrated embedding models. If your index uses external embeddings (e.g., OpenAI), those servers can't query it. This server fills that gap — it embeds your query with the provider of your choice, then searches any supported vector store.
Related MCP server: OpenAI Vector Store MCP Server
Currently Supports
Embedding Providers:
OpenAI (
text-embedding-3-small,text-embedding-3-large,text-embedding-ada-002, etc.)
Vector Stores:
Pinecone
pgvector (PostgreSQL)
Tools
retrieve
Search a knowledge base and return relevant content.
Parameters:
query(string, required) — The search query to find relevant content.
Returns a JSON array of results, each with text, score, and metadata fields.
Install & Run
Run directly with uvx (no install needed):
uvx rag-retrieval-mcp[all]Or install with pip:
pip install rag-retrieval-mcp[all]
rag-retrieval-mcpMCP client configuration
{
"mcpServers": {
"rag-retrieval": {
"command": "uvx",
"args": ["rag-retrieval-mcp[all]"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key",
"PINECONE_API_KEY": "your-pinecone-api-key",
"PINECONE_HOST": "your-pinecone-index-host-url"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| No |
| Embedding provider to use |
| No |
| Vector store to use |
| No |
| Number of results to return |
| Yes (if using OpenAI) | OpenAI API key | |
| No |
| OpenAI embedding model |
| Yes (if using Pinecone) | Pinecone API key | |
| Yes (if using Pinecone) | Pinecone index host URL | |
| No |
| Metadata field containing text |
| Yes (if using pgvector) | PostgreSQL connection string | |
| No |
| Table name containing vectors |
| No |
| Column containing text content |
| No |
| Column containing embedding vectors |
Adding New Providers
Implement the EmbeddingProvider or VectorStore abstract base class and register it in server.py's factory function. See src/rag_retrieval_mcp/embedding_providers/base.py and src/rag_retrieval_mcp/vector_stores/base.py for the interfaces.
License
Apache License 2.0
Available Tools
1 toolretrieveC
Search a knowledge base and return relevant content.
Args: query: The search query to find relevant content.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It only mentions 'return relevant content' without detailing side effects, authentication requirements, rate limits, or whether the tool is read-only. This is insufficient for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short (two sentences) and front-loaded with the main purpose. The second sentence restates the parameter name without adding value, which could be removed. It is not overly verbose but could be tighter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple tool (one required parameter, no nested objects) and the presence of an output schema, the description provides baseline completeness. However, it lacks context about result format, pagination, or what 'relevant content' entails, leaving some ambiguity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema coverage is 0%, so the description must compensate. It describes the 'query' parameter as 'The search query to find relevant content,' which adds some semantic meaning beyond the schema's type string. However, it lacks details on expected format, length, or examples, which would be more helpful.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'search' and the resource 'knowledge base', making the tool's purpose unambiguous. However, it lacks specificity about the type of knowledge base, which could be improved.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. Without sibling tools or usage context, the agent has no basis for deciding when this search is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.2.0- First observed
retrieve
TDQS
Scored across 1 tool
With only one tool, there is no ambiguity. The tool has a clear, single purpose to retrieve content from a knowledge base.
There is only one tool, so naming consistency is not an issue. The name 'retrieve' is a straightforward verb describing the action.
A single tool for a RAG retrieval server feels insufficient. Typically, such a server would require additional tools for knowledge base management, such as adding or deleting documents.
The tool surface is severely incomplete. Only retrieval is supported, with no tools for managing the knowledge base (e.g., create, update, delete documents), leaving agents unable to perform basic lifecycle operations.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search your knowledge bases from any AI assistant using hybrid RAG.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
- AmberOAuthcom.ambermem
Long-term memory for AI assistants. Hybrid retrieval, query expansion, auto-topics.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables storing and retrieving information using vector embeddings with semantic search capabilities. Integrates with the AI Embeddings API to automatically generate embeddings for content and perform similarity-based searches through natural language queries.2-
- FlicenseNot gradedqualityDmaintenanceEnables semantic search and document retrieval from OpenAI Vector Store, allowing users to search documents using natural language queries and fetch complete document contents through ChatGPT.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search through structured databases and unstructured content (documents, videos, files) using natural language queries with semantic understanding.MIT
- FlicenseNot gradedqualityDmaintenanceEnables RAG (Retrieval-Augmented Generation) capabilities with document processing, vector storage, and intelligent Q\&A using OpenAI embeddings and semantic search.-