LabscoMCP early access ↗
nonatofabioMCP SERVER

Local FAISS

A local RAG store an agent can write to and query — FAISS index, sentence-transformer embeddings, PDF/TXT/MD out of the box and 40+ formats with pandoc, all on your own disk.

by nonatofabio ↗Vector Stores & RAG RetrievalCommunity

LABSCO SUMMARY

Two tools, and reranking is the switch worth turning on.

Plain vector search returns near-misses; the two-stage retrieve-and-rerank pass pulls a wider candidate set and rescores it with a cross-encoder, which is the production pattern and costs one flag. The CLI matters more than it looks — bulk-indexing a folder from a terminal, then querying it from the assistant, is a far better shape than feeding documents one tool call at a time.

What it is

An MCP server that gives an assistant a local vector database. Documents are chunked, embedded and stored in a FAISS index with metadata on disk; queries come back as the most relevant chunks. Nothing is sent to a hosted service — embeddings run locally from a Hugging Face model you choose. A local-faiss CLI does the same indexing and searching outside the assistant.

What you get

  • A document ingested from raw text or a file path, auto-detecting which it was given, with an optional source label — ingest_document
  • The store queried in natural language with a top_k you control, defaulting to 3 — query_rag_store
  • Native support for TXT, MD and PDF, and DOCX, ODT, HTML, RTF, EPUB and 40+ more once pandoc is installed
  • Two-stage retrieve-and-rerank: FAISS pulls 10x more candidates than requested, a cross-encoder rescores them, and the top-k comes back re-sorted
  • Any Hugging Face sentence-transformers model as the embedder, defaulting to all-MiniLM-L6-v2
  • MCP prompts that turn retrieved chunks into an answer with citations, or into a focused summary — extract-answer, summarize-documents
  • A standalone CLI for indexing files, folders, glob patterns or recursive trees, and for searching — incremental, so re-indexing adds rather than overwrites
  • Persistent storage: the FAISS index at {index-dir}/faiss.index and metadata at {index-dir}/metadata.json, created if absent

Requirements

No account and no key — everything runs locally. Python 3.10+ and pip install local-faiss-mcp; the published package is local-faiss-mcp, registered as io.github.nonatofabio/local-faiss-mcp, and the client runs the local-faiss-mcp command over stdio. --index-dir chooses where the index and metadata live, defaulting to the current directory; --embed names an alternative Hugging Face embedding model; --rerank turns on cross-encoder reranking, defaulting to BAAI/bge-reranker-base. Pandoc is optional and only needed for the extended format list — brew install pandoc or apt install pandoc.

Setup effort

One command — pip install local-faiss-mcp