rag-mcp
Allows using local Ollama models for embedding generation, enabling offline or private semantic search.
Enables the MCP server to generate embeddings using OpenAI's embedding models for semantic search.
Provides the vector storage and search backend using pgvector for efficient cosine similarity queries.
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-mcpsearch my notes for 'project roadmap'"
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.
rag-mcp
A RAG-over-docs MCP server: ingest text into collections, then let any LLM agent semantically search it. Backed by PostgreSQL + pgvector, embeddings via any OpenAI-compatible endpoint (OpenAI, Azure, or a local Ollama / llama.cpp server).
RAG is split the MCP-native way — this server owns retrieval (chunk → embed → store → cosine search); the calling model owns generation. Point Claude, ChatGPT, Cursor, or any MCP client at it and answers get grounded in your docs.
Tools
Tool | Purpose |
| Chunk, embed, and store text in a collection (with optional metadata) |
| Top-k semantic search over a collection; returns chunks + 0–1 cosine score |
| List collections and their chunk counts |
| Delete a collection and all its chunks |
Related MCP server: RAG-MCP Knowledge Base Server
Quickstart
# 1. Start Postgres + pgvector and the server
cp .env.example .env # set EMBEDDINGS_API_KEY
docker compose up -d --build
# — or run locally over stdio (e.g. for Claude Desktop) —
uv pip install --system .
docker compose up -d db # just the database
EMBEDDINGS_API_KEY=sk-... rag-mcpAdd to an MCP client (stdio):
{ "mcpServers": { "rag": { "command": "rag-mcp",
"env": { "EMBEDDINGS_API_KEY": "sk-...",
"DATABASE_URL": "postgresql://postgres:postgres@localhost:5432/rag" } } } }Configuration
All via environment (see .env.example): DATABASE_URL,
EMBEDDINGS_API_BASE / EMBEDDINGS_API_KEY / EMBEDDINGS_MODEL, EMBED_DIM
(must match your model's dimension — 1536 for text-embedding-3-small),
CHUNK_SIZE, CHUNK_OVERLAP, and MCP_TRANSPORT (stdio | http).
How it works
ingest_text splits text on natural boundaries with overlap, embeds each chunk,
and stores it in a chunks table with a vector(EMBED_DIM) column and an
ivfflat cosine index. search embeds the query and returns the nearest chunks
by cosine distance (<=>). Everything is namespaced by collection.
License
Copyright © 2026 Next Level Management Advisors, LLC.
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) — see LICENSE. If you run a modified version over a network, the AGPL requires you to make your modified source available to its users.
Commercial licensing: to use this in a closed-source or commercial product, or to host a modified version without publishing your source, a commercial license is available — contact forrest@nlma.io.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NextLevelManagementAdvisors/rag-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server