loading…
Search for a command to run...
loading…
An MCP knowledge server that enables saving and retrieving memory across sessions, with tools to ingest text, URLs, YouTube, and files, and perform semantic sea
An MCP knowledge server that enables saving and retrieving memory across sessions, with tools to ingest text, URLs, YouTube, and files, and perform semantic search.
Persistent memory for MCP clients, powered by retrieval-augmented generation.
RAG-MCP turns documents, notes, web pages, transcripts, and local files into a searchable knowledge layer that MCP-compatible clients can ingest, retrieve, and manage over time. It is designed for assistants that need memory beyond a single chat session.
RAG-MCP is an MCP server that provides a practical memory and retrieval layer for AI clients.
It supports:
At a high level, the system parses content, chunks it, embeds it, stores vectors in ChromaDB, stores metadata in SQLite, and exposes the entire workflow through MCP tools.
Most MCP clients are excellent at reasoning in the moment, but weak at remembering useful context across sessions.
RAG-MCP solves that by giving clients a persistent, queryable memory layer.
Use it when you want to:
Store knowledge from:
ingest_textingest_urlingest_youtubeingest_filecreate_upload_session + upload UISupported local file types:
.txt.md.markdown.pdf.docx.docQuery stored knowledge using:
retrieve for compact semantic matchesretrieve_with_sources for source-aware responses with document and chunk metadataManage the knowledge base with:
list_documentssearch_documentsdelete_documentget_ingestion_statuscheck_upload_status/mcp/sse / /messages/upload/metricsThink of RAG-MCP as a dedicated memory service for MCP clients:
This makes the system practical for assistants that need to remember information across time without relying on chat history alone.
python -m venv .venv
. .venv/bin/activate
pip install -e "[dev]"
cp .env.example .env
python -m rag_mcp.main
Verify the server:
curl -i http://127.0.0.1:8080/mcp
curl -i http://127.0.0.1:8080/sse
curl -i http://127.0.0.1:8080/metrics
Install optional parsing extras when needed:
pip install -e ".[pdf]"
pip install -e ".[docx]"
docker compose up --build -d
docker compose ps
curl -i http://127.0.0.1:8080/metrics
curl -i http://127.0.0.1:8080/mcp
docker compose down
The Compose setup mounts persistent storage for:
Configuration is managed through environment variables and loaded by Settings.
Start by copying the sample file:
cp .env.example .env
RAG_MCP_CHROMA_PATH=/data/chroma
RAG_MCP_METADATA_DB_PATH=/data/metadata.db
RAG_MCP_LOG_LEVEL=INFO
RAG_MCP_EMBEDDING_MODEL=all-MiniLM-L6-v2
RAG_MCP_METRICS_ENABLED=true
RAG_MCP_METRICS_PATH=/metrics
RAG_MCP_METRICS_REQUIRE_AUTH=false
RAG_MCP_UPLOAD_SESSION_SECRET=change-me-in-production
RAG_MCP_UPLOAD_SESSION_SECRET should always be set explicitly in real deployments.RAG-MCP includes a browser-based upload flow for cases where direct local file ingestion is not convenient.
The flow is:
create_upload_sessioncheck_upload_status if needed
This is especially useful when:
{
"name": "ingest_text",
"arguments": {
"title": "Team Notes",
"namespace": "default",
"text": "Release checklist: create tag, run tests, publish image"
}
}
{
"name": "ingest_url",
"arguments": {
"url": "https://example.com/docs",
"namespace": "docs"
}
}
{
"name": "retrieve",
"arguments": {
"query": "How does release publishing work?",
"namespace": "default",
"top_k": 5
}
}
{
"name": "retrieve_with_sources",
"arguments": {
"query": "What are the deployment steps?",
"namespace": "docs",
"top_k": 5
}
}
{
"name": "list_documents",
"arguments": {
"namespace": "docs",
"limit": 20
}
}
{
"name": "create_upload_session",
"arguments": {
"namespace": "project-x"
}
}
A common lifecycle looks like this:
list_documentsThe service exposes Prometheus-compatible metrics at /metrics.
Current instrumentation includes request-level visibility such as:
Example:
curl -i http://127.0.0.1:8080/metrics
This makes it straightforward to plug RAG-MCP into:
RAG-MCP includes practical safeguards for production-style deployments:
Operational recommendations:
RAG_MCP_UPLOAD_SESSION_SECRET/dataIf the upload page does not render correctly, rebuild and restart after updating the image:
docker compose build
docker compose up -d --force-recreate
/metrics returns 503If metrics auth is enabled without the required token configuration, the endpoint can fail closed. Check your .env values.
/mcp returns a redirectThat is expected. The server supports transport-specific behavior and may redirect to the canonical mounted route.
Private IPs, loopback targets, metadata endpoints, and blocked schemes are intentionally rejected by SSRF validation.
Check these in order:
top_klist_documentsUseful entry points:
Contributions are welcome.
A solid contribution workflow is:
python -m venv .venv
. .venv/bin/activate
pip install -e "[dev]"
pytest
Before opening a PR:
MIT — see LICENSE.
Выполни в терминале:
claude mcp add rag-mcp -- npx Transcripts, channel stats, search
автор: YouTubeAI image generation using various models.
автор: modelcontextprotocolUnified GPU inference API with 30 AI services (LLM, image gen, video, TTS, whisper, embeddings, reranking, OCR) as MCP tools. Pay-per-use via x402 USDC or API k
автор: gpu-bridgeA powerful image generation tool using Google's Imagen 3.0 API through MCP. Generate high-quality images from text prompts with advanced photography, artistic,
автор: hamflxНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории media