MI

Minima MCP Server for Local RAG Files

Run an MCP server for local RAG on files to enable fast, secure retrieval-augmented generation and offline document search.

Overview

Minima is an MCP (Model Context Protocol) server designed to make local RAG (retrieval-augmented generation) workflows fast, private, and simple. It indexes files on disk, builds a local vector index, and exposes an MCP-compatible HTTP API so LLMs or agent frameworks can request contextual documents at inference time. Running Minima locally avoids sending sensitive content to cloud vector stores and reduces latency for document-heavy prompts.

This server is useful for developers building private assistants, offline search for documentation, or any workflow that combines a local knowledge base with an LLM. Minima is lightweight, supports multiple storage and embedding backends, and can be deployed on a developer machine, VM, or container for secure, repeatable RAG pipelines.

Features

  • MCP-compliant HTTP API for model context retrieval
  • File-system based ingestion (PDF, text, Markdown, DOCX, etc.)
  • Local vector index support (file-backed index for fast searches)
  • Configurable embedding provider (local or remote)
  • Chunking and metadata extraction for robust retrieval
  • Simple CLI for indexing and serving
  • Docker-friendly for isolated deployments
  • Designed for low-latency, private RAG workflows

Installation / Configuration

Prerequisites:

  • Git
  • Docker (optional)
  • Go toolchain (optional, for building from source)

Clone the repo:

git clone https://github.com/dmayboroda/minima.git
cd minima

Build from source (if the project is Go-based):

# build executable
go build -o minima ./cmd/minima
# run the server with a simple config
./minima serve --config config.yaml

Run with Docker (example):

docker build -t minima .
docker run -it --rm \
  -p 8080:8080 \
  -v /path/to/docs:/data/docs \
  -v /path/to/index:/data/index \
  minima:latest \
  serve --config /etc/minima/config.yaml

Example config file (config.yaml):

server:
  host: "0.0.0.0"
  port: 8080

data:
  docs_dir: "/data/docs"
  index_dir: "/data/index"

indexing:
  chunk_size: 1000
  chunk_overlap: 200
  filetypes: ["pdf", "md", "txt", "docx"]

embeddings:
  provider: "openai"        # or "hf", "local", etc.
  model: "text-embedding-3-small"
  api_key_env: "OPENAI_API_KEY"

vector_store:
  backend: "faiss"          # or "annoy", "sqlite", "pgvector"
  params:
    n_trees: 10

Configuration table (key meanings):

KeyDescription
server.portPort for the MCP HTTP API (default 8080)
data.docs_dirDirectory containing files to index
data.index_dirWhere to persist the vector index
indexing.chunk_sizeMax tokens/characters per chunk
embeddings.providerEmbedding service to use
vector_store.backendLocal vector index backend

Indexing files (CLI example):

# index a folder of documents into the local index directory
./minima index --source /path/to/docs --index /path/to/index --config config.yaml

Start the server:

./minima serve --config config.yaml
# or if using docker, the container entrypoint might run `serve`

Available Resources

  • GitHub repository: https://github.com/dmayboroda/minima
  • MCP (Model Context Protocol) spec: use an MCP client or any HTTP client that can call the server’s MCP endpoints
  • Supported vector backends: FAISS, Annoy, SQLite/PGVector (depends on build)
  • Embedding providers: OpenAI, Hugging Face, or local embedding model