ingest_documentLABSCO 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_kyou 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.indexand 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
USE CASES
Asking questions about your own documents
Index the PDFs and Markdown from a terminal, then query the store from the assistant and let it answer from the retrieved chunks.
Getting an answer that cites its source
Retrieve the chunks, then use the answer-extraction prompt so the reply names the source document and explains the relevance.
Keeping an index current as documents arrive
Re-run indexing on the folder; it adds to the existing index instead of rebuilding, and new files are embedded on the way in.
Improving results that are close but wrong
Enable cross-encoder reranking, or switch to a larger embedding model, without changing anything about how you query.
2 tools
Listed in project docs. Your client may show a different list.
query_rag_storeBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
local-faiss-mcp on PATH
Where it runs
All 3 documented setups run the server on your machine.
INSTALLATION
Connect your client
Server setup
pip install local-faiss-mcpMCP Clients
Claude Code
{
"mcpServers": {
"local-faiss-mcp": {
"command": "local-faiss-mcp",
"args": [
"--index-dir",
"./.vector_store"
]
}
}
}Claude Code — Python
{
"mcpServers": {
"local-faiss-mcp": {
"command": "python",
"args": [
"-m",
"local_faiss_mcp",
"--index-dir",
"./.vector_store"
]
}
}
}Claude Desktop
{
"mcpServers": {
"local-faiss-mcp": {
"command": "local-faiss-mcp",
"args": [
"--index-dir",
"<YOUR_PATH_TO_INDEX_DIRECTORY>"
]
}
}
}