Labsco
MCP SERVER

Universal Context Pipeline

by akshay2211

Index your own notes, code and past AI conversations locally, and search them from any MCP client.

Vector Stores & RAG Retrieval
Summary
Nothing leaves the machine, and that is the entire point.

Paired with a local model, indexing, embeddings, retrieval and generation all run offline — which is what makes it viable for NDA-bound or air-gapped work where a cloud index is simply not allowed. Two limits stated plainly by the author: this is v0.1 and headless, and scanned image-only PDFs are not handled because there is no OCR yet. Citation line numbers refer to the extracted text, not PDF page numbers.

What it is

A single Rust binary that indexes folders on your machine and exposes them as one tool. Retrieval is hybrid — BM25 full-text and vector search merged by reciprocal-rank fusion — with tree-sitter chunking for code, heading-aware chunking for Markdown, and citations back to the source lines.

What you get
  • One tool, `search_local_context`, which any MCP client can call — Claude Desktop, Cursor, LM Studio and others
  • A `folder_filter` that scopes a search to one indexed folder, which is how one index serves several clients without them bleeding into each other
  • Conversation memory: ingest a Claude conversations.json export and search every past chat from any future session
  • Indexing by extension — md, markdown, txt, rs, py, ts, tsx, js, jsx, mjs, go and pdf — skipping .git, node_modules, target, .venv, dist, build and the other usual directories
  • A filesystem watcher that re-indexes an edited file in about 500ms, and a content-hash embedding cache so re-indexing unchanged content makes zero embedding calls
  • PII masking on by default, covering email addresses, OpenAI keys, AWS keys, GitHub tokens and JWTs
  • Terminal commands for indexing, watching, clearing, searching without a model, and asking a question answered by a local chat model with citations
Requirements

The crate ucp-local, version 0.1.0, installed with cargo — the binary on your PATH is `ucp-local` and MCP clients launch it as `ucp-local serve`. Ollama is required for embeddings, with the nomic-embed-text model pulled; a chat model is optional and only needed for the ask command. Poppler's pdftotext is recommended for PDFs — without it, body text goes missing from files whose fonts lack a ToUnicode map. Configuration lives at ~/.config/ucp/config.toml.

Setup effort

One command — cargo install ucp-local