# Gnosis MCP

Builds a local index over your project docs and hands the agent ranked snippets instead of whole files. Useful when context keeps filling up with READMEs.

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

## What it does

Gnosis MCP ingests markdown, `.txt`, `.ipynb`, `.toml`, `.csv` and `.json` files, plus git commit history and pages crawled from a site via sitemap. Retrieval mixes BM25 keyword matching with semantic search over local ONNX embeddings, so no API key is involved. Setup is three commands: `pip install gnosis-mcp`, then `gnosis-mcp ingest ./docs/`, then `gnosis-mcp serve`. The SQLite database is created on its own.

The pitch is token math. A `search_docs` call comes back with 200–500 tokens of highlighted excerpts where a full-file read would have cost 3000–15000. Watch mode re-ingests on file changes, `--prune` drops chunks whose source file is gone, `--wipe` resets before a fresh ingest, and `gnosis-mcp savings` tallies what you avoided. PostgreSQL with pgvector and tsvector is there for larger corpora.

Think twice before turning on cross-encoder reranking. The bundled MS-MARCO model costs 27 points of nDCG@10 on dev docs and adds 400× latency in the author's measurements, which is why it ships off. Test it against your own corpus first. And `gnosis-mcp eval` is a smoke test — nine hardcoded documents, ten bundled queries — not a score for your docs; use `python tests/bench/bench_real_corpus.py --corpus <docs-root> --golden <golden.jsonl>` for that.

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

## Install

### Claude Code (native platform)

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

### Codex

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

### Cursor

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

### GitHub Copilot

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

### Gemini CLI

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

## When to use it
- find the right section of docs without reading ten files
- cut token spend on repeated lookups against the same docs
- feed commit history to the agent as searchable context
- index a documentation site from its sitemap
- drop chunks of deleted files from the index

## Example prompts
- Search my local docs for how OAuth login is configured
- Ingest the `./docs/` folder and show me corpus stats
- How many tokens did doc lookups save over the last 7 days?

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

From the same set: [nicholasglazer/gnosis-mcp](https://affpapa.org/en/nevibecode/by/nicholasglazer/gnosis-mcp.md) — 2 cards

---
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
