aletheia-mem
Free, local memory and rules hub for AI coding tools: persistent memory for Claude Code, Codex, Cursor and Gemini CLI. One SQLite store over MCP, REST and CLI. Rules sync to CLAUDE.md and AGENTS.md. claude-mem alternative.
Install / Use
claude mcp add mohamed-ashraf-elsaed -- npx -y github:mohamed-ashraf-elsaed/aletheia-memIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of aletheia-mem
aletheia-mem scores 76/100 on our quality scale, 819th of 946 AI & Machine Learning skills we index.
Its MCP Server is 25 KB long, well organised into 17 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 5 days ago, so aletheia-mem is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
aletheia-mem compared with similar skills
All 4 of these similar skills score higher than aletheia-mem; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| aletheia-mem (this skill)by mohamed-ashraf-elsaed | 76 | 10 | 5d ago | MCP Server |
| claude-memby thedotmack | 100 | 115.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 110.4k | 1d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 91.6k | 2d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.3k | today | CLAUDE.md |
Frequently asked questions
- How do I install aletheia-mem?
- Run
claude mcp add mohamed-ashraf-elsaed -- npx -y github:mohamed-ashraf-elsaed/aletheia-mem. The install tabs above show the steps for each supported agent. - Which AI agents does aletheia-mem work with?
- It is written for Claude Code, Claude Desktop, Cursor, Gemini CLI and OpenAI Codex, as a MCP Server file. Other agents that read the same format can often use it too.
- Is aletheia-mem safe to use?
- It is Apache-2.0-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is aletheia-mem still maintained?
- The repository was last updated 5 days ago, so aletheia-mem is actively maintained.
Skill content
View source on GitHub<a href="https://alternativeto.net/software/aletheia-mem/about/?utm_source=badge&utm_medium=referral"><img src="https://alternativeto.net/static/badges/badge-compact-color.svg" alt="Aletheia Memory on AlternativeTo" height="44"></a>
Listed in the official MCP Registry, Glama, mcpservers.org, TensorBlock awesome-mcp-servers and AlternativeTo.
</div>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
<p align="center"><img src="https://raw.githubusercontent.com/mohamed-ashraf-elsaed/aletheia-mem/main/docs/screenshots/home-projects-light.webp" alt="The Home page: your projects, your rules and how to start, in plain words (demo data)" width="48%"> <img src="https://raw.githubusercontent.com/mohamed-ashraf-elsaed/aletheia-mem/main/docs/screenshots/home-project-light.webp" alt="One project on the Home page: what Aletheia knows, with a Hide button, and the rules for it (demo data)" width="48%"></p>
<p align="center"><a href="https://aletheia.mohamedashrafelsaed.com/">Docs site</a> · <a href="https://mohamedashrafelsaed.com/projects/aletheia/">Project page</a> · <a href="https://github.com/mohamed-ashraf-elsaed/aletheia-mem/blob/main/docs/06-frontend.md">Frontend guide</a> · <a href="https://github.com/mohamed-ashraf-elsaed/aletheia-mem/blob/main/CHANGELOG.md">Changelog</a> · <a href="https://github.com/mohamed-ashraf-elsaed/aletheia-mem/issues">Issues</a></p>
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.
<!-- claims:begin -->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
git clone https://github.com/mohamed-ashraf-elsaed/aletheia-mem
cd aletheia-mem
bun 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
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 <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:
| 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 | Level | Verification | Hook events installed | |---|---|---|---| | claude-code | full | MCP connection 2.1.312 on 2026-10-27; hooks ran in real sessions over two days of use; one user on one machine | SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd | | command-code | full | MCP connection 1.88.1 on 2026-10-27; hooks ran in one short session; one user on one machine | SessionStart, PostToolUse, Stop | | cursor | full | config written from docs, not tested on a real install | sessionStart, beforeSubmitPrompt, postToolUse, afterAgentResponse, stop, sessionEnd | | codex | full | 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 | full | config written from docs, not tested on a real install | SessionStart, BeforeAgent, AfterTool, AfterAgent, SessionEnd | | windsurf | full | config written from docs, not tested on a real install | pre_user_prompt, post_run_command, post_write_code, post_cascade_response | | opencode | mcp+rules | 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. 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.
<!-- gen:bench -->| 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) | | Raw turns, all 10 c
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
115.0kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
110.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
91.6kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
ruflo
81.3k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
