LabscoMCP early access ↗
karaage0703MCP SERVER

MCP RAG Server

A local RAG server that indexes your Markdown, text, PowerPoint and PDF documents with multilingual embeddings and answers vector-search queries — backed by PostgreSQL and pgvector.

by karaage0703 ↗Vector Stores & RAG RetrievalCommunity

LABSCO 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