local_faiss_mcp
Local FAISS vector store as an MCP server – drop-in local RAG for Claude / Copilot / Agents.
claude mcp add --transport stdio nonatofabio-local_faiss_mcp python -m local_faiss_mcp --index-dir /path/to/index
How to use
The Local FAISS MCP Server provides a self-contained vector store powered by FAISS for retrieval-augmented generation workflows. It ingests documents, builds a local vector index, and serves MCP-compatible tool calls for ingestion and querying. You can use the ingest_document tool to add content to the vector store and the query_rag_store tool to retrieve relevant document chunks based on a natural language query. Optional built-in prompts like extract-answer and summarize-documents help you generate structured, citation-backed responses from the retrieved chunks. The server exposes three main usage modes: running the installed CLI, running as a Python module, or running the server directly for development/testing. When running, you specify an index directory where FAISS and metadata are stored, and you can customize the embedding model and re-ranking options via command-line arguments.
To interact with the MCP server, use:
- ingest_document to add new content to the index (e.g., local and remote documents).
- query_rag_store to search the vector store for relevant chunks.
- Then apply prompts like extract-answer to generate a formatted answer with citations, or summarize-documents to create focused summaries from multiple chunks.
How to install
Prerequisites:
- Python 3.10+ installed on your system
- Pip available for installing Python packages
Install the MCP server package from PyPI:
pip install local-faiss-mcp
Usage variants after installation:
- Run the server using the installed CLI (easiest):
local-faiss-mcp --index-dir /path/to/index/directory
- Run the server as a Python module (recommended for MCP workflows):
python -m local_faiss_mcp --index-dir /path/to/index/directory
- For development or testing, run the server module directly:
python local_faiss_mcp/server.py --index-dir /path/to/index/directory
Optional to enable broader file format support, install pandoc if you plan to ingest DOCX, HTML, EPUB, and more formats:
# macOS
brew install pandoc
# Linux
sudo apt install pandoc
Note: PDF, TXT, and MD ingestion works without pandoc. To upgrade later:
pip install --upgrade local-faiss-mcp
Additional notes
Tips and common considerations:
- The index directory is created automatically if it does not exist. Ensure the path has read/write permissions.
- By default, embeddings use the configured Hugging Face model; you can pass --embed to customize the model (e.g., all-MiniLM-L6-v2, all-mpnet-base-v2).
- Re-ranking can improve results. Use --rerank to enable the default cross-encoder-based reranker, or specify a model with --rerank <model-name>.
- The server listens for MCP tool calls via stdin/stdout. When integrating with an MCP client, ensure proper I/O handling in your environment.
- If you encounter memory issues with large corpora, consider reducing top_k during query_rag_store or using smaller embedding models for resource-constrained setups.
Related MCP Servers
flyto-core
The open-source execution engine for AI agents. 412 modules, MCP-native, triggers, queue, versioning, metering.
mikrotik
MCP server for Mikrotik
oxylabs
Official Oxylabs MCP integration
pubmed
A Model Context Protocol (MCP) server enabling AI agents to intelligently search, retrieve, and analyze biomedical literature from PubMed via NCBI E-utilities. Includes a research agent scaffold. STDIO & HTTP
mcp-batchit
🚀 MCP aggregator for batching multiple tool calls into a single request. Reduces overhead, saves tokens, and simplifies complex operations in AI agent workflows.
context-engineering
Context Engineering is a MCP server that gives AI agents perfect understanding of your codebase. Eliminates context loss, reduces token usage, and generates comprehensive feature plans in minutes. Compatible with Cursor, Claude Code, and VS Code.