
Melchizedek
io.github.louis49由 GitHub 账号 louis49 发布v1.0.2更新于 Oct 25, 2026
Persistent memory for Claude Code — offline, single-file, hybrid search.
概览
本地 MCP 服务器,把 Claude Code 对话记录索引到单个 SQLite 文件,让助手跨项目检索历史会话。
- 可以做什么
- 检索已索引的对话,返回精简片段,支持日期过滤和排序,并可继续获取上下文或完整内容逐层深入。查找涉及某个文件的过往会话、某条报错信息的历史解决方案,或类似任务的以往做法。手动保存记忆笔记,列出已索引会话,可按项目筛选。查看索引统计与配置信息,并修改设置。从索引中删除单个片段或整个会话,排除或重新纳入项目,以及重启服务器。
- 适用场景
- 适合在 Claude Code 中跨多个会话和项目工作、希望自动回忆以往调试过程、架构决策和代码模式的用户,无需反复说明背景。也适合要求这些历史完全留在本机的用户。
- 运行要求
- 以 npm 包形式通过 stdio 在本机运行,需要 Node.js 20 或更高版本、Claude Code 2.0 或更高版本,支持 macOS、Linux 或 Windows。自动索引需要在 Claude Code 设置文件中添加 SessionEnd 钩子。可选的向量与重排模型会在首次使用时下载。
安装
在 SourceWeft 中
- 打开 控制台中的 Melchizedek,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Melchizedek
[npm version] [npm downloads] [CI] [License: MIT] [Donate] [Donate]
Persistent memory for Claude Code. Automatically indexes every conversation and provides production-grade hybrid search (BM25 + vectors + reranker) via MCP tools. 100% local, zero config, zero API keys, zero invoice.
Why Melchizedek?
Claude Code forgets everything between sessions - and knows nothing about your other projects. Melchizedek fixes both.
It runs silently in the background - indexing your conversations as you work - then gives Claude the ability to search across your entire history, across all projects: past debugging sessions, architectural decisions, error solutions, code patterns.
No cloud. No API keys. No config. Plug and ask.
How it works
Search pipeline - 4 levels of graceful degradation
Every layer is optional. The plugin works with BM25 alone and gets better as more components are available.
Performance
Measured with npm run bench - 100 sessions, 1 000 chunks, on a single SQLite file.
Quick Start
npm (recommended)
Add the MCP server to Claude Code:
npx (no install)
From source
Claude Code plugin marketplace (coming soon)
Plugin review pending. In the meantime, use npm or npx install above.
Setting up hooks (automatic indexing)
The MCP server provides search tools, but hooks trigger automatic indexing. Without hooks, you'd need to manually index sessions.
For marketplace installs, hooks are configured automatically. For npm/npx/source installs, add hooks to ~/.claude/settings.json.
See docs/installation.md for the full JSON configuration, hook reference, and troubleshooting.
After setup, restart Claude Code. Indexing starts automatically.
MCP Tools
Search (start here)
Progressive retrieval pattern - search returns ~50 tokens/result, context ~200-300, full ~500-1000. Start with m9k_search, drill down only when needed. 4x token savings vs loading everything.
Context-aware ranking - results from your current project (×1.5) and current session (×1.2) are automatically promoted. Cross-project results remain visible.
Specialized search
Memory management
Usage guide
Configuration
Zero config by default. Everything is tunable via m9k_config or environment variables.
See docs/configuration.md for the full settings reference (20+ options, env vars, config file examples).
Enhanced Search
Melchizedek works out of the box with BM25 keyword search. Text embeddings (MiniLM) download automatically on first use for semantic search.
For GPU-accelerated code embeddings (Ollama), cross-encoder reranking (GGUF models), platform-specific setup guides, and the full model reference, see Enhanced Search Setup.
How is this different?
Inspirations
This project stands on the shoulders of others. Key ideas borrowed from:
Known issues
- Session boost inactive - Claude Code currently sends an empty
session_idin the SessionStart hook stdin payload, preventing the ×1.2 session boost from working. The ×1.5 project boost is unaffected and provides the primary context-aware ranking. Related upstream issues: #13668 (emptytranscript_path), #9188 (stalesession_id). Melchizedek's session boost code is tested and ready, and will activate automatically when the upstream fix lands.
Privacy
- Zero telemetry. No tracking, no analytics, no network calls (except optional lazy model download).
- Read-only on transcripts. Never writes to
~/.claude/projects/. All data in~/.melchizedek/. <private>tag support. Content between<private>...</private>is replaced with[REDACTED]before indexing.- Local-only. Your conversations never leave your machine.
Requirements
- Node.js >= 20
- Claude Code >= 2.0
- macOS, Linux, or Windows
License
MIT
"Without father, without mother, without genealogy, having neither beginning of days nor end of life."
- Hebrews 7:3
Built by @louis49
来源:README.md,提交 3053612
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分