levh
Optional integration for LLM-powered query answering, enabling natural-language questions against stored memories with source citations when an OpenAI API key is configured.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
What is LEVH?
Your AI tools are stateless — every session starts from zero. LEVH gives them a persistent, searchable memory that lives on your machine. Plug it into Claude Desktop, Cursor, Claude Code, VS Code, or any MCP client, and it remembers your decisions, projects and people across sessions.
Most memory tools store everything and retrieve everything. LEVH forgets on purpose: every memory has its own decay curve, unused ones fade, and the ones you actually rely on are reinforced automatically. Signal rises to the top without manual curation.
Everything runs locally on SQLite. No accounts, no cloud, no external services.
Related MCP server: trw-mcp
Quick start
pip install levh
levh setup --client claude --profile work
levh capture "Atlas uses PostgreSQL in production."
levh serveDashboard and API come up on http://localhost:8000. Open Settings for
copy-paste MCP configs, or run levh mcp config cursor for any supported client.
Optional, once you are set up:
levh hook install --client claude-code # every new session starts with your memory
levh hook install # capture every git commit message
levh context -o CLAUDE.md # compile memory into a context fileHow it works
Every memory has its own half-life. Recalling it resets the clock and grows it, negative feedback shrinks it, and pinning skips decay entirely.
retention(t) = 0.5 ^ (hours_since_last_recall / stability_hours)Memories are ranked by an explainable multi-factor score — semantic similarity, decay, importance and access frequency, each weight configurable. See Architecture.
What you get
Adaptive decay — per-memory half-life, reinforced by recall and weakened by feedback.
Ask your memory — natural-language answers that cite the memories they came from. Offline by default.
People, projects & timeline — entities extracted from your memories automatically. No manual tagging.
Daily briefing — what's on today, what you recently committed to, and what you're about to forget.
Decisions & conflicts — decisions pulled from your memories, with a review signal when two disagree. A signal, never a verdict.
Knowledge Wiki — a source-linked Markdown wiki built from your memories, browsable in the dashboard. It surfaces the conflict candidates LEVH already flagged, each linked to both snapshots — a candidate, never a verdict.
Admission gate — every memory screened before storage; duplicates flagged and secrets redacted. An ambiguous candidate is held for you, never dropped.
Trust & provenance — an explainable reliability score per memory. Separate from ranking; not a truth claim.
Mistake guard — a corrected mistake becomes a pinned rule that never decays.
Encrypted backup & restore — one portable snapshot, optionally encrypted.
Connectors — Calendar, Email, transcripts, Notion, Obsidian, GitHub, Jira, Linear, Slack, git history and local files.
Signed federation — explicit, pull-first memory exchange between two LEVH instances.
78 MCP tools, a REST API, a WebSocket feed, and a Next.js dashboard served by the API itself — one process, one port.
Documentation
First run and local setup | |
Claude, Cursor, VS Code, Codex and the rest | |
All 78 tools and the profile bands | |
Every endpoint | |
Every command | |
The source-linked wiki over your memories | |
Layers, engine, scoring internals | |
Version bump, tag, automated publish |
→ Installing from source · Configuration
Security
LEVH is a local, single-user tool — no accounts, no multi-tenancy.
Tokenless means loopback-only. Without
LEVH_TOKEN, remote peers are rejected.LEVH_TOKENgates/api/*, the WebSocket and the MCP SSE transport. Set it before widening any bind. Generate one withpython -c "import secrets; print(secrets.token_urlsafe(32))"; it is a value you choose, not one the server hands out.If the dashboard asks you for a token, paste the same value you started the server with — whatever
LEVH_TOKENheld in the shell,.envor Docker environment that ranlevh serve. The server never prints it, so it is not shown anywhere; if you never set one, pick a value with the command above and restart withLEVH_TOKEN=<value> levh serve. Once set, every call needs it, including from the same machine — the token is what the dashboard is gated on, not the network distance.
Nothing leaves the machine without an explicit opt-in. Ask, summaries and transcript ingest stay offline until you set
ANSWER_MODE=llmorSUMMARY_MODE=llm.Secrets are redacted before storage, on every write path.
The MCP size profiles narrow tool discovery; read_only is enforced
server-side at call time. The size profiles are not a security boundary.
Found a vulnerability? See SECURITY.md.
Contributing
Issues and pull requests are welcome — see CONTRIBUTING.md and Discussions.
License
GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
This server cannot be deployed
Maintenance
Related MCP Connectors
Long-term memory for AI coding agents: durable project facts, recalled by every MCP client.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenancePersonal unified memory system for AI coding agents, providing persistent memory with hybrid RAG retrieval via MCP integration, allowing agents to store, search, and manage memories locally.1MIT
- AlicenseBqualityBmaintenanceMCP server providing persistent engineering memory and spec-driven development workflows for AI coding agents, preserving learnings across sessions.4153 PyPIBusiness Source 1.1
- AlicenseNot gradedqualityAmaintenanceA persistent, local memory layer for AI coding agents that remembers decisions, bugs, and rules across sessions with three core MCP verbs (recall, remember, search).Apache 2.0
- AlicenseNot gradedqualityAmaintenanceLocal-first hierarchical memory for AI coding agents, providing automatic session capture, belief consolidation, and relevant memory injection via an MCP server.111 npm2MIT