Aletheia

MCP文档知识

提供方 未标注

文档知识 stdio · 本地进程 会话登录 社区 / 第三方 Claude DesktopClaudeCursorVS Code
查看接入方式

一个免费、本地的 AI 编程工具记忆与规则中心。单一 SQLite 存储,可通过 MCP(stdio)、REST 或 CLI 读取。规则可同步至 CLAUDE.md、AGENTS.md 和 Cursor 规则。Alpha 阶段,Apache-2.0 许可,无需账户。

一句话选型结论

按资料字段整理

Aletheia 属于文档知识类 MCP 服务器,stdio · 本地进程,会话登录,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式stdio · 本地进程 鉴权会话登录 部署方式本地部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

记忆

安装与配置

stdio · 本地进程 会话登录
客户端在本机拉起子进程,数据不出本机
npx

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好会话登录对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Aletheia当前 未标注 stdio · 本地进程 本地部署 有 2026-11-20
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类文档知识本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式会话登录远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-11-20上游最后核验时间

详细介绍

19.5 KB
来自项目仓库与上游目录的原文,未做删改

Aletheia

A free, local memory and rules hub for AI coding tools.
One store on your machine. Any tool reads it over MCP, REST or the CLI.
Persistent memory for Claude Code, Codex CLI, Cursor, Gemini CLI, Windsurf and OpenCode: a local, tool-neutral alternative to claude-mem.

Listed in the official MCP Registry, Glama, mcpservers.org, TensorBlock awesome-mcp-servers and AlternativeTo.

Install and run. Bun 1.1 or newer is required; the CLI runs on Bun, not Node.

npm install -g aletheia-mem
aletheia-server
# open http://127.0.0.1:37790

Docs site · Project page · Frontend guide · Changelog · Issues

Status: alpha. The memory engine and the installers work in tests. The real Claude Code, Command Code, Codex CLI and
OpenCode listed the generated MCP config. Hooks have run in real sessions of Claude Code (two days of use), Command Code (one short session) and Codex CLI (one interactive session), all on the author's machine and one user, with secrets redacted and no leaks found by the checker. No hook has run inside Cursor, Gemini CLI, Windsurf or OpenCode yet, and answer accuracy is not measured. CI runs the test suite on Linux, macOS and Windows. On Windows, two hook checks (Windsurf and Gemini CLI) are skipped and no real tool was tried there, so Windows is tested in CI only.

1,835 tests — 0 failures (run bun test).

English · 中文 · Español · Português (Brasil) · 日本語 · Deutsch · Français · 한국어 · हिन्दी · العربية · Русский.

What it is

Aletheia is a free, local memory and rules hub for AI coding tools. One SQLite store is read by any tool over MCP,
REST or the CLI, and your rules are written into each tool's own instruction file. It is built to give Claude Code,
Codex CLI, Cursor, Gemini CLI, Windsurf and OpenCode one shared, persistent memory; the sections below say which of
them has been checked on a real install.

Every coding agent forgets between sessions, and each one remembers differently. Aletheia keeps the memory and the
rules once, on your machine, and lets each tool read them in the format it already understands. There is no account,
no telemetry and no network call unless you configure a model provider. It listens on loopback only.

Install in three commands```bash

git clone https://github.com/mohamed-ashraf-elsaed/aletheia-mem
cd aletheia-mem
bun bin/aletheia-server.mjs


Open . Needs Bun 1.1 or newer. To install the published package instead,
run `npm install -g aletheia-mem`, then start it with `aletheia-server`. There are no runtime dependencies to
install.

The first screen has five tabs: **Home** (start here: pick a project and see what Aletheia knows about it, its rules and its connected
tools, in plain words), **Activity** (Aletheia's own view of the requests and sessions your tools worked on), **Knowledge** (search, edit, pin, hide, export),
**Rules** (write once and sync) and **Connections** (installer status and audit).

## How capture works```bash
aletheia install claude-code --write
aletheia install cursor --write
aletheia install --list          # capability level and verification per tool

Without --write the command is a dry run. It prints every file it would change and writes nothing. Each changed
file gets a timestamped backup. Hooks call the installed aletheia command, redact secrets and `` blocks
before storing, spool to disk if the database is unavailable, and always exit 0 so they never block the host.
Compression is queued, not run inside the hook. Details and the exact hook list per host: docs/25.

Which tools it connects to

Aletheia does not depend on any one tool. It speaks MCP (stdio and HTTP), a plain REST API and a CLI, and it writes
the instruction file each tool already reads. What has and has not been checked:

Check Result
MCP server against the official MCP SDK client Passes (protocol versions 2025-11-25 to 2024-11-05)
Config formats for Claude Code, Command Code, Cursor, Codex CLI, Gemini CLI, Windsurf, OpenCode Written from official docs fetched 2026-10-26 and tested against fixtures. The real CLI listed the aletheia MCP server for Claude Code, Command Code, Codex CLI and OpenCode on 2026-10-27; Cursor, Gemini CLI and Windsurf are Not tested on a real install.
Claude Desktop MCP config Documented and merge-tested against a fixture; not opened in the app
Rules files: CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules/*.mdc, .windsurf/rules/*.md, Copilot, Aider Written and tested in temp folders (docs/verification/rules-targets.md)
Any of the above on a real install of that tool MCP config was read back by the real CLI for Claude Code, Command Code, Codex CLI and OpenCode on 2026-10-27. Hooks ran in real sessions of Claude Code (two days of use), Command Code (one short session) and Codex CLI (one interactive session), all on the author's machine and one user (prompts and tool events captured, secrets redacted, no leaks). No hook ran inside Cursor, Gemini CLI, Windsurf or OpenCode.
Automatic capture through a tool's hooks Built for Claude Code, Command Code, Cursor, Codex CLI, Gemini CLI and Windsurf. Each installed hook command is exercised end to end in a temp HOME with a recorded payload. Hooks ran in real sessions of Claude Code (two days of use), Command Code (one short session) and Codex CLI (one interactive session), one user on one machine; Cursor, Gemini CLI, Windsurf and OpenCode hooks have not run. OpenCode is MCP+rules.
Tool Capture Context Verification Hook events installed
claude-code yes yes MCP connection 2.1.312 on 2026-10-27; hooks ran in real sessions over two days of use; PreToolUse (read gate, off by default), PostToolUseFailure and SubagentStop have run in tests only; one user on one machine SessionStart, UserPromptSubmit, PreToolUse (tests only), PostToolUse, PostToolUseFailure (tests only), Stop, SubagentStop (tests only), SessionEnd
command-code yes yes MCP connection 1.88.1 on 2026-10-27; hooks ran in one short session; one user on one machine SessionStart, PostToolUse, Stop
cursor yes yes config written from docs, not tested on a real install sessionStart, beforeSubmitPrompt, postToolUse, afterAgentResponse, stop, sessionEnd
codex yes yes MCP connection 0.165.0 on 2026-10-29; hooks ran in one interactive session (reviewed once with /hooks); one user on one machine SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd
gemini-cli yes yes config written from docs, not tested on a real install SessionStart, BeforeAgent, AfterTool, AfterAgent, SessionEnd
windsurf yes no config written from docs, not tested on a real install pre_user_prompt, post_run_command, post_write_code, post_cascade_response
opencode no no MCP connection 1.18.33 on 2026-10-27; hooks not run none (MCP and rules only)

Generated from src/hub/install.mjs via aletheia install --list. Capture means a hook event records activity; context means a hook injects memory at session start. A row says MCP connection when the real CLI listed the server. Hooks have run in real sessions of Claude Code (two days of use), Command Code (one short session) and Codex CLI (one interactive session), one user on one machine; Cursor, Gemini CLI, Windsurf and OpenCode hooks have not run.

Measured numbers

On LoCoMo, claude-mem (15.2.0 and 15.17.0, as shipped) vs this project. These are retrieval numbers, not answer accuracy.

Run Questions Recall@5 MRR ms/query
claude-mem 15.2.0 (as shipped), raw turns — measured-by-us 1,536 36.0% 0.285 p50 1,699 ms, p95 2,824 ms (idle, 40 queries)
claude-mem 15.17.0 (as shipped), raw turns — measured-by-us 1,536 43.5% 0.377 mean 1,079 ms (HTTP)
Raw turns, all 10 conversations 1,536 57.4% 0.497 3.72
Dataset facts, all 10 1,536 64.8% 0.591 5.53
Dataset facts, 3 conversations 383 67.4% 0.620 5.80
Dataset facts, 3 conversations, + rerank (bench only) 383 73.9% 0.686 251.16
Dataset facts, all 10, + rerank (bench only) 1,536 72.3% 0.680 646.19
Our rule-extracted facts, all 10 1,536 57.7% 0.492 4.94

Retrieval only: Recall@5 asks whether the gold evidence is in the top five results. It is not answer accuracy. Every row is measured-by-us on the same LoCoMo questions; no vendor-claimed benchmark number is in this table. Generated from bench/results/2026-10-26/ (bench/claude-mem-baseline.mjs, bench/results/2026-11-11/claude-mem-15.17.0.json, raw-turns.json (hybrid), dataset-facts.json (hybrid+facts), dataset-facts-3-rerank.json (hybrid+facts), dataset-facts-3-rerank.json (hybrid+facts+rerank), dataset-facts-rerank.json (hybrid+facts+rerank), our-facts-rules.json (hybrid+facts)); re-run with bun scripts/compare-bench.mjs.

Read the table this way:

  • Recall@5 is retrieval. It asks whether the gold evidence is in the top five results. It is not a judgment of
    whether an answer was right.
  • Answer accuracy is not measured. There is no reader or judge harness yet.
  • The gap is not 2× when both systems receive the same extracted facts. The speed difference is larger than the
    quality difference.
  • The first local extraction run failed. Ollama llama3.2:1b answered a trivial call, but the facts-v1 prompt
    over a two-turn window returned HTTP 500 after 4 min 41 s. No fact was extracted from that run.
  • Our rule extractor does not reproduce the fact gain. It added 1,672 facts and moved Recall@5 from 57.3% to
    57.7%; the dataset's own facts added 7.3 points. Method, raw files and the negative result:
    bench/results.

How it compares

Capability Aletheia (today) claude-mem Mem0 Zep/Graphiti Supermemory Basic Memory
Local-first yes yes yes OSS partial (Graphiti only) yes self-host yes
Free yes yes OSS yes OSS partial (Graphiti free) yes OSS yes OSS
No account yes yes local yes OSS yes Graphiti yes self-host yes
MCP yes stdio + HTTP yes yes partial (reference servers) yes yes
REST yes /v1 yes worker API yes yes yes partial
CLI yes yes npx partial no partial yes
Rules sync to tool files yes 10 targets no no no no partial (AGENTS.md)
Import/export between tools partial (own bundle, claude-mem, Claude Code / Command Code / Codex transcripts, Claude Code auto-memory) partial (export/import) partial (platform migration) partial partial yes Markdown
Hook capture yes six hosts; ran in real Claude Code, Command Code and Codex CLI sessions, the other three from docs only yes no no no partial
Vector search partial (optional ONNX) yes Chroma yes yes yes yes
Graph / entity memory partial (entity rows exist; graph retrieval) no yes yes UNVERIFIED yes wikilinks
Temporal reasoning partial (bi-temporal facts, invalidation; as-of query) partial (dates) yes yes yes partial
Team sharing partial (self-hosted sync and devices; team mode) partial (paid) yes paid yes paid yes paid no
Benchmark published and reproducible partial (retrieval yes; answer no) no vendor only vendor only vendor only no

Competitor cells are copied from each project's own public documentation, fetched 2026-10-26. Aletheia cells were updated 2026-10-26 from tested features; installer sources are in docs/25-installers.md. Cells the source did not state read UNVERIFIED.

Sync and remote MCP

Both are self-hosted and free; neither is tested across two real machines.

  • Aletheia Sync is an append-only operation log with one result per operation, device pairing, tombstones,
    compaction, purge and scoped tokens. Optional end-to-end encryption encrypts payloads on the device before they
    are sent; it does not hide metadata such as device id, operation kind, entity id, timing or ciphertext size.
    Unencrypted accounts keep plaintext payloads on the hub. Tested on loopback only. docs/29
  • Remote MCP serves the read tools (and, with a sync or admin token, the write tools) over the MCP Streamable
    HTTP transport. Each call needs a bearer token, is rate-limited and is written to an append-only audit row.
    TLS is delegated to a reverse proxy or tunnel; OAuth is not built. docs/30

Interfaces

Interface Where Use
MCP (stdio) aletheia mcp, npx aletheia-mem mcp or bun bin/mcp.mjs the 14 MCP tools below (read and write), plus 2 read-only team tools when the caller belongs to a team
MCP (HTTP) sync hub /mcp; main server /mcp the same tools. The sync hub needs a bearer token with a per-token scope. The main server answers loopback only, or needs ALETHEIA_API_KEY as a bearer key when it is set and always in remote mode
REST /v1/memories, /v1/search, /v1/timeline, /v1/observations/batch, /v1/context, /v1/events, /v1/info, /v1/work scripts, CI, any language. When ALETHEIA_API_KEY is set, every /api and /v1 route needs it as a bearer key; in remote mode /v1 needs a login or the key
CLI bin/aletheia.mjs hooks, shell, cron, sync
Files rules sync each tool's own instruction file

MCP tools

Tool Purpose Access
search Search shared memory read
timeline Show context around a memory read
get_observations Get full memory text by id read
file_outline Outline of a code file, to read a line range instead of the whole file read
save_memory Save a memory write
session_start_context Load session start context read
fact_history Show how a fact changed read
list_rules List standing rules read
add_rule Add a standing rule write
confirm_rule Confirm a rule is still right write
dismiss_memory Dismiss a memory write
restore_memory Restore a dismissed memory write
work_state_write Write a work-state list write
work_state_read Read a work-state list read
team_brief Brief for one team project (listed only when the caller is in a team) read
team_search Search what teammates shared (listed only when the caller is in a team) read

Configuration

All settings are environment variables. The defaults are safe for a single-user machine.

Variable Default Meaning
ALETHEIA_PORT 37790 Listen port.
ALETHEIA_HOST 127.0.0.1 Bind address. A non-loopback bind turns on Hub login.
ALETHEIA_DATA_DIR ~/.aletheia Everything this project writes, including hub.db.
ALETHEIA_HUB_DB /hub.db The shared memory store.
ALETHEIA_API_KEY empty Bearer key. When set, every /api and /v1 route needs it, except login and logout (src/hub/api-key.mjs). In remote mode /v1 needs a login or the key and /mcp needs the key; the key must be at least 32 characters.
CLAUDE_MEM_DB ~/.claude-mem/claude-mem.db claude-mem's database (read-only; importer and optional legacy viewer).
ALETHEIA_RULES_FILE /MY-RULES.md The legacy Work view's rules file.
ALETHEIA_PROVIDER none none, claude-cli or an OpenAI-compatible provider.
ALETHEIA_PROVIDERS empty Ordered fallback chain, for example ollama,openai.
ALETHEIA_OPENAI_BASE_URL, _API_KEY, _MODEL OpenRouter URL, empty, empty For openai and human copy.
ALETHEIA_OUTPUT_LANGUAGE empty Language for extracted facts and summaries.
ALETHEIA_BUG_COMPAT off 1 reproduces the original's empty observation half.
ALETHEIA_TOOL, ALETHEIA_CWD MCP server: names the calling tool and default project.

Limits and unverified claims

This list is the honest half of the README.

  • MCP config was listed by the real CLI for Claude Code, Command Code, Codex CLI and OpenCode on 2026-10-27. Hooks ran in real sessions of Claude Code (two days of use), Command Code (one short session) and Codex CLI (one interactive session), all on the author's machine and one user; Cursor, Gemini CLI, Windsurf and OpenCode hooks have not run. Cursor, Gemini CLI and Windsurf remain "config written from docs, not tested on a real install."
  • CI runs the test suite on Linux, macOS and Windows (GitHub's windows-latest runner, Bun 1.3.10). On Windows, the hook-execution checks for Windsurf and Gemini CLI and one temp-folder cleanup check are skipped, and no real tool was tried. The install smoke test runs on Linux and macOS, and the benchmark gate on Linux only.
  • Answer accuracy is not measured. Recall@5 is retrieval, not whether an answer was correct.
  • The 1B-model extraction run failed; facts from our own extractor were measured with the rule extractor only.
  • Sync and E2EE are tested with temp data dirs and a loopback hub. No real tunnel or second host was used.
  • E2EE covers payloads, not metadata.
  • At 50,000 synthetic rows, keyword search p95 is 32.7 ms project-scoped and 58.6 ms across all projects (measured-by-us, bun bench/scale.mjs 50000 20000 --index tuned --queries 200 --seed 1, Linux). The 50 ms target is met for project-scoped search.
  • "Works with " is not claimed for any tool. Only a real install test would justify it.

Layout```

bin/ server, CLI, MCP server, sync hub, legacy Work ledger CLI
src/
server.mjs app.mjs source.mjs config.mjs humancopy.mjs server and the legacy Work API
readmodel/ ledger/ refresh/ store/ http/ legacy Work internals
hub/ store (memories, FTS5, rules, bundles) rules-sync tools importers capture compress mcp routes sync
public/ the one UI (index.html, one-ui.*, tabs/, work-view.js);
work.html and assets/ are the optional legacy viewer
public-hub/ the old Memory Hub assets, still served at /hub/app.js
prompts/ vendor/ the original's skill prompts and Python scripts
test/ the test suite and a synthetic fixture database
docs/ the documents
```

Documentation

The full documentation is at . The Markdown in docs/ is
canonical.

  1. Get started: Introduction · Installation
    · Quickstart · How it works
    · Dashboard · FAQ
  2. Concepts: Memory model · Rules
    · Search · Session-start context
    · Privacy · Facts · Glossary
  3. Connect your tools: Overview · Claude Code
    · Command Code · Codex CLI · Cursor
    · Gemini CLI · Windsurf · OpenCode
    · Claude Desktop · Other tools
  4. Guides: Migrate from claude-mem
    · Write rules once · Back up, export, import
    · Run as a service · Model providers
    · Troubleshooting · Sync · Remote MCP
    · Team mode · Requests and goals
  5. Reference: CLI · MCP tools
    · Configuration · Hooks · HTTP API
    · Installers · Rules targets
  6. Compare: Aletheia vs claude-mem
    · Other memory tools · Claude Code memory options
  7. Project: Benchmarks · Status and limits
    · Dependencies and licences
  8. Internals: Architecture · Data model
    · Frontend · Operations

AI tools can read llms.txt, or
llms-full.txt for every page in one file.

Contributing

The most useful contribution is a report from a real install: open an issue with the tool, its version, the command
you ran and what the tool did. See CONTRIBUTING.md. Run bun test and
bun scripts/gen-tables.mjs --check before a pull request. A new runtime dependency needs a reason.

Licence

Apache-2.0. See NOTICE.md for what comes from claude-mem. Not affiliated with or endorsed by the
claude-mem authors or Anthropic.

Author

Made by Mohamed Ashraf Elsaed, technical lead and backend architect in Cairo. Project page and more tools: mohamedashrafelsaed.com/projects/aletheia/.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Aletheia 怎么安装?

在客户端按下面的安装命令接入:npx。装完在客户端配置里引用同一个包或端点。

Aletheia 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Aletheia 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Aletheia 需要 API Key 吗?

资料标注需要会话登录认证,使用前准备好对应凭据,并按最小权限配置。

Aletheia 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、VS Code、Windsurf、Cline;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Aletheia 能提供哪些能力?

资料显示能力标签包括 记忆。具体工具清单以官方文档为准。

Aletheia 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Aletheia 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-11-20。