Aletheia

io.github.mohamed-ashraf-elsaed由 GitHub 账号 mohamed-ashraf-elsaed 发布v0.1.13更新于 Nov 3, 2026

一个免费、本地的记忆与规则中心,供 Claude Code 及其他 AI 编程工具使用,通过 MCP 提供服务。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

A free, local memory and rules hub for Claude Code and other AI coding tools, served over MCP.

发布方自己的服务:4words

已验证STDIO仅桌面知识与记忆开发者工具

概览

Aletheia 的本地 MCP 服务;无需登录;STDIO。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Aletheia,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Aletheia: a network brain with a stack of memory layers]

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.

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

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

[The Home page: your projects, your rules and how to start, in plain words (demo data)] [One project on the Home page: what Aletheia knows, with a Hide button, and the rules for it (demo data)]

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,533 tests — 0 failures (run bun test).

English · 中文 · Español · Português (Brasil) · 日本語 · Deutsch · Français · 한국어 · हिन्दी · العربية · Русский. Machine translations live in docs/i18n/; English is canonical. No translation has had native review.

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-memcd aletheia-membun bin/aletheia-server.mjs

Open http://127.0.0.1:37790. 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 --writealetheia install cursor --writealetheia 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 <private> 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:

CheckResult
MCP server against the official MCP SDK clientPasses (protocol versions 2025-11-25 to 2024-11-05)
Config formats for Claude Code, Command Code, Cursor, Codex CLI, Gemini CLI, Windsurf, OpenCodeWritten 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 configDocumented 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, AiderWritten and tested in temp folders (docs/verification/rules-targets.md)
Any of the above on a real install of that toolMCP 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 hooksBuilt 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.
ToolLevelVerificationHook events installed
claude-codefullMCP connection 2.1.312 on 2026-10-27; hooks ran in real sessions over two days of use; one user on one machineSessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd
command-codefullMCP connection 1.88.1 on 2026-10-27; hooks ran in one short session; one user on one machineSessionStart, PostToolUse, Stop
cursorfullconfig written from docs, not tested on a real installsessionStart, beforeSubmitPrompt, postToolUse, afterAgentResponse, stop, sessionEnd
codexfullMCP connection 0.165.0 on 2026-10-29; hooks ran in one interactive session (reviewed once with /hooks); one user on one machineSessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd
gemini-clifullconfig written from docs, not tested on a real installSessionStart, BeforeAgent, AfterTool, AfterAgent, SessionEnd
windsurffullconfig written from docs, not tested on a real installpre_user_prompt, post_run_command, post_write_code, post_cascade_response
opencodemcp+rulesMCP connection 1.18.33 on 2026-10-27; hooks not runnone (MCP and rules only)

Generated from src/hub/install.mjs via aletheia install --list. 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 as shipped vs this project. These are retrieval numbers, not answer accuracy.

RunQuestionsRecall@5MRRms/query
claude-mem 15.2.0 (as shipped), raw turns — measured-by-us1,53636.0%0.285p50 1,699 ms, p95 2,824 ms (idle, 40 queries)
Raw turns, all 10 conversations1,53657.4%0.4973.72
Dataset facts, all 101,53664.8%0.5915.53
Dataset facts, 3 conversations38367.4%0.6205.80
Dataset facts, 3 conversations, + rerank38373.9%0.686251.16
Dataset facts, all 10, + rerank1,53672.3%0.680646.19
Our rule-extracted facts, all 101,53657.7%0.4924.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, 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

CapabilityAletheia (today)claude-memMem0Zep/GraphitiSupermemoryBasic Memory
Local-firstyesyesyes OSSpartial (Graphiti only)yes self-hostyes
Freeyesyes OSSyes OSSpartial (Graphiti free)yes OSSyes OSS
No accountyesyes localyes OSSyes Graphitiyes self-hostyes
MCPyes stdio + HTTPyesyespartial (reference servers)yesyes
RESTyes /v1yes worker APIyesyesyespartial
CLIyesyes npxpartialnopartialyes
Rules sync to tool filesyes 9 targetsnonononopartial (AGENTS.md)
Import/export between toolspartial (own bundle + claude-mem)partial (export/import)partial (platform migration)partialpartialyes Markdown
Hook captureyes six hosts, fixture-tested; no host openedyesnononopartial
Vector searchpartial (optional ONNX)yes Chromayesyesyesyes
Graph / entity memorypartial (entity rows exist; graph retrieval)noyesyesUNVERIFIEDyes wikilinks
Temporal reasoningpartial (bi-temporal facts, invalidation; as-of query)partial (dates)yesyesyespartial
Team sharingpartial (self-hosted sync and devices; team mode)partial (paid)yes paidyes paidyes paidno
Benchmark published and reproduciblepartial (retrieval yes; answer no)novendor onlyvendor onlyvendor onlyno
Languages supported11 (English + 10 machine translations; no native review)29 modes, 32 READMEsSDKSDKSDKSDK

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

InterfaceWhereUse
MCP (stdio)aletheia mcp, npx aletheia-mem mcp or bun bin/mcp.mjsthe 13 MCP tools below (read and write)
MCP (HTTP)sync hub /mcpthe same tools with a bearer token and per-token scope
REST/v1/memories, /v1/search, /v1/timeline, /v1/observations/batch, /v1/context, /v1/events, /v1/info, /v1/workscripts, CI, any language; optional ALETHEIA_API_KEY bearer key
CLIbin/aletheia.mjshooks, shell, cron, sync
Filesrules synceach tool's own instruction file

MCP tools

ToolPurposeAccess
searchSearch shared memoryread
timelineShow context around a memoryread
get_observationsGet full memory text by idread
save_memorySave a memorywrite
session_start_contextLoad session start contextread
fact_historyShow how a fact changedread
list_rulesList standing rulesread
add_ruleAdd a standing rulewrite
confirm_ruleConfirm a rule is still rightwrite
dismiss_memoryDismiss a memorywrite
restore_memoryRestore a dismissed memorywrite
work_state_writeWrite a work-state listwrite
work_state_readRead a work-state listread

Configuration

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

VariableDefaultMeaning
ALETHEIA_PORT37790Listen port.
ALETHEIA_HOST127.0.0.1Bind address. A non-loopback bind turns on Hub login.
ALETHEIA_DATA_DIR~/.aletheiaEverything this project writes, including hub.db.
ALETHEIA_HUB_DB<data dir>/hub.dbThe shared memory store.
ALETHEIA_API_KEYemptyBearer key required on /v1/* when set.
CLAUDE_MEM_DB~/.claude-mem/claude-mem.dbclaude-mem's database (read-only; importer and optional legacy viewer).
ALETHEIA_RULES_FILE<data dir>/MY-RULES.mdThe legacy Work view's rules file.
ALETHEIA_PROVIDERnonenone, claude-cli or an OpenAI-compatible provider.
ALETHEIA_PROVIDERSemptyOrdered fallback chain, for example ollama,openai.
ALETHEIA_OPENAI_BASE_URL, _API_KEY, _MODELOpenRouter URL, empty, emptyFor openai and human copy.
ALETHEIA_OUTPUT_LANGUAGEemptyLanguage for extracted facts and summaries.
ALETHEIA_BUG_COMPAToff1 reproduces the original's empty observation half.
ALETHEIA_TOOL, ALETHEIA_CWDMCP 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.
  • The 10 README translations are machine-translated. No native speaker has reviewed them.
  • "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 CLIsrc/  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  syncpublic/         the one UI (index.html, one-ui.*, tabs/, work-view.js);                work.html and assets/ are the optional legacy viewerpublic-hub/     the old Memory Hub assets, still served at /hub/app.jsprompts/ vendor/ the original's skill prompts and Python scriptstest/           the test suite and a synthetic fixture databasedocs/           the documents

Documentation

The full documentation is at https://aletheia.mohamedashrafelsaed.com/docs/. 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/.

来源:README.md,提交 bb0461a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.1.13最新Nov 3, 2026
  2. v0.1.11Oct 31, 2026
  3. v0.1.10Oct 29, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Aletheia 集成