# melchizedek

Indexes your Claude conversations and lets the agent search them: old errors, decisions, code snippets. Runs locally, no cloud, no API keys.

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

## What it does

Melchizedek parses session transcripts from `~/.claude/projects/**/*.jsonl`, splits them into request-response pairs, drops duplicates by SHA-256 and writes everything into one SQLite file in WAL mode, `~/.melchizedek/memory.db` by default. A SessionEnd hook fires the indexing after each session. Skip the hooks and you index by hand, because the server itself only searches.

Retrieval has four layers, each optional. BM25 over FTS5 with stemming is always on. On top of that come vectors through sqlite-vec — MiniLM 384d for text, Jina 768d for code — then Reciprocal Rank Fusion to merge the result lists, then a cross-encoder reranker. The vector and reranker stages need `@huggingface/transformers` or node-llama-cpp. Leave them out and search still runs, just with fewer signals.

There are 16 tools. `m9k_search` returns short snippets and is the place to start; `m9k_context` and `m9k_full` pull adjacent chunks or whole ones. Separate tools cover a file (`m9k_file_history`), an error string (`m9k_errors`) and similar past work (`m9k_similar_work`). Hits from the current project score ×1.5 and the current session ×1.2. Tune it with `m9k_config` or the env vars `M9K_DB_PATH`, `M9K_EMBEDDINGS`, `M9K_RERANKER`, `M9K_NO_DAEMON`, `M9K_LOG_LEVEL`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add melchizedek -- npx -y melchizedek
```

### Codex

**Platform CLI**
```bash
codex mcp add melchizedek -- npx -y melchizedek
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "melchizedek": {
            "command": "npx",
            "args": [
                "-y",
                "melchizedek"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "melchizedek": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "melchizedek"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add melchizedek npx -y melchizedek
```

## When to use it
- recall how a similar error was fixed before
- find sessions that touched one specific file
- pull an architecture decision out of an older project
- save a note so it resurfaces next session
- keep a project out of the index

## Example prompts
- Search my history for how we fixed this stack trace before
- Which past sessions edited `src/server.ts`?
- Save to memory: migrations in this project only run through `npm run db:migrate`

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

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