# Local FAISS MCP Server

An MCP server that keeps documents in a local FAISS vector index and answers queries by meaning. Useful when you want RAG without shipping files to a hosted service.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 36
- Author: nonatofabio
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nonatofabio/local_faiss_mcp
- Updated: 2026-04-24
- HTML: https://affpapa.org/en/nevibecode/mcp/local-faiss-mcp-server

## What it does

Documents go in through the `ingest_document` tool: the server splits them into chunks, embeds each one and writes the vectors to a FAISS index. `query_rag_store` takes a plain-language question and returns the closest chunks with their sources. Everything persists on disk as `{index-dir}/faiss.index` plus `{index-dir}/metadata.json`, so a restart does not wipe your store.

A `local-faiss` CLI covers indexing and searching straight from the shell. Pick an embedding model with `--embed`; the default is `all-MiniLM-L6-v2`. Adding `--rerank` turns on a two-stage search — FAISS pulls extra candidates, a cross-encoder rescores them, and the default model is `BAAI/bge-reranker-base`. Two MCP prompts ship with it: `extract-answer` for cited answers and `summarize-documents` for a summary across retrieved chunks.

PDF, TXT and MD parse out of the box. DOCX, HTML, EPUB and other formats need pandoc installed — without it those files simply will not load. Python 3.10 or newer is required.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add local-faiss-mcp -- uvx local-faiss-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from local-faiss-mcp <command>

### Codex

**Platform CLI**
```bash
codex mcp add local-faiss-mcp-server -- uvx local-faiss-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from local-faiss-mcp <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "local-faiss-mcp-server": {
            "command": "uvx",
            "args": [
                "local-faiss-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from local-faiss-mcp <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "local-faiss-mcp-server": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "local-faiss-mcp"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from local-faiss-mcp <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add local-faiss-mcp-server uvx local-faiss-mcp
```
uvx runs the command named after the package; if the README names another one, use uvx --from local-faiss-mcp <command>

## When to use it
- pull one passage out of a pile of PDFs without scrolling through them
- build a document index that never leaves your machine
- get answers that point back to the exact source fragment
- wire document search into an agent over MCP
- reindex a folder of files from the terminal in one go

## Example prompts
- Ingest `./docs/report.pdf` with `ingest_document`
- Use `query_rag_store` to find how FAISS does similarity search
- Run the `extract-answer` prompt over the retrieved chunks and cite the sources

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [labelhead-artist-momentum](https://affpapa.org/en/nevibecode/mcp/labelhead-artist-momentum.md) — MCP server · ★ 107423
- [Agent Skills Search Server](https://affpapa.org/en/nevibecode/mcp/agent-skills-search-server.md) — MCP server · ★ 26559
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23263
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [PraisonAI](https://affpapa.org/en/nevibecode/mcp/praisonai.md) — MCP server · ★ 9289

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
