searchLABSCO SUMMARY
Your documents, searchable by meaning.
This is a self-contained RAG setup: point it at a folder, index once, and an agent can retrieve passages by meaning rather than keyword. The multilingual embedding model and the context features — pulling neighbouring chunks or the whole document alongside a hit — are what make the results usable rather than fragmentary. It expects Postgres with pgvector, which the README makes easy via Docker, and incremental indexing keeps updates cheap after the first full build.
What it is
An MCP server that adds retrieval-augmented generation over your own documents. It reads Markdown, text, PowerPoint and PDF files, indexes them with the multilingual-e5-large embedding model into PostgreSQL with pgvector, and returns relevant passages for a natural-language query — with the surrounding chunks or the full document included for context.
What you get
- Vector search over the indexed documents, with neighbouring chunks and optional full-document context —
search - The number of documents in the index —
get_document_count - Multiple formats ingested — Markdown, text, PowerPoint and PDF, converted via markitdown
- A choice of embedding model through the environment — multilingual-e5-large by default, or a model like ruri, with query and passage prefixes applied automatically
- Incremental indexing that processes only new or changed files, plus a CLI to clear, index and count
Requirements
Python 3.10 or higher and PostgreSQL 14 or higher with the pgvector extension — the README shows running it as the pgvector/pgvector:pg17 Docker container. Install dependencies with uv sync. A .env file sets the PostgreSQL connection, the source and processed directories, and the embedding model — EMBEDDING_MODEL, EMBEDDING_DIM, and the query/passage prefixes. Documents go in data/source; index them with python -m src.cli index, then run the server with uv run python -m src.main. The pyproject names the package mcp-rag-server at 0.1.0. Changing the embedding model changes the vector dimension, so the README says clear and rebuild the index when you switch.
Setup effort
Build from source — git clone https://github.com/karaage0703/mcp-rag-server.git
USE CASES
Answering from your own document set
Search the index for passages relevant to a question and let the agent ground its answer in them.
Keeping context around a hit
Retrieve the neighbouring chunks or the full document alongside a match so the passage is not read in isolation.
Indexing mixed document formats
Drop Markdown, text, PowerPoint and PDF files into the source directory and index them together.
Updating the index cheaply
Run incremental indexing so only new or changed files are reprocessed.
2 tools
Listed in project docs. Your client may show a different list.
get_document_countBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- Python 3.10 or later
- uv
- PostgreSQL 14 or later with the pgvector extension (the README runs it in Docker)
Where it runs
All 3 documented clients run the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/karaage0703/mcp-rag-server.git
cd mcp-rag-server
uv sync
docker run --name postgres-pgvector -e POSTGRES_PASSWORD=password -p 5432:5432 -d pgvector/pgvector:pg17
docker exec -it postgres-pgvector psql -U postgres -c "CREATE DATABASE ragdb;"Create a .env file in the clone with POSTGRES_HOST=localhost, POSTGRES_PORT=5432, POSTGRES_USER=postgres, POSTGRES_PASSWORD=password, POSTGRES_DB=ragdb, SOURCE_DIR=./data/source, PROCESSED_DIR=./data/processed, EMBEDDING_MODEL=intfloat/multilingual-e5-large and EMBEDDING_DIM=1024 (on your own PostgreSQL instead of the container, use its connection details and run CREATE EXTENSION vector; in the database).
Put your documents (Markdown, text, PowerPoint, Word or PDF) in data/source
uv run python -m src.cli indexAdd the block for your client below; <YOUR_PATH_TO_MCP_RAG_SERVER> is the full path of the clone
MCP Clients
Claude Desktop, Cline, Cursor
{
"mcpServers": {
"mcp-rag-server": {
"command": "uv",
"args": [
"run",
"--directory",
"<YOUR_PATH_TO_MCP_RAG_SERVER>",
"python",
"-m",
"src.main"
]
}
}
}