Local-first persistent memory for coding agents and MCP clients.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Lightweight local-first persistent memory for coding agents and MCP clients.
formerly internal-rag
MCP Light Memory is a lightweight, local-first, persistent memory system for coding agents and MCP clients (Warp, OpenCode, JetBrains AI Assistant / PyCharm, Claude Code, Cursor). It acts as a checkpoint + retrieval layer β it stores the minimum durable state needed to resume complex work across sessions, without keeping the full conversation in the model's context window.
When your agent starts a task, it calls context and gets back relevant past decisions, gotchas, constraints, and hypotheses β ranked, deduplicated, and trust-bounded. When it finishes, it checkpoints the working state. Next session, even after a restart, the memory is there.
| Problem | How MCP Light Memory solves it |
|---|---|
| Agents forget everything between sessions | Markdown files persist on disk; the agent retrieves them via BM25 + optional embeddings |
| Full session history is too large for context | Only relevant memories are retrieved (token-budgeted, MMR-diversified) |
| Cloud dependency / privacy concerns | 100% local, offline, zero network calls, no daemon |
| Heavy setup / dependencies | Zero required runtime deps (pure Python 3.8+ stdlib); optional sentence-transformers for better semantic retrieval |
| Prompt injection via stored memory | Every retrieved memory is explicitly trust: untrusted evidence with an injection-warning heuristic (ADR-015) |
| Multi-project isolation | Router with registry allowlist, write:false hard boundary, per-call subprocess isolation |
| MCP protocol drift | Dual-era support: modern 2026-07-28 + legacy 2024-11-05β¦2025-11-25 |
.md file with YAML frontmatter (id, type, status, tags, sources, links, valid_from, valid_to, supersedes). Human-readable, diffable, durable.remember β update β supersede (links both directions, never deletes history) β forget (archives, never deletes) β timeline (temporal view). search --at YYYY-MM-DD for historical queries.=== BEGIN/END INTERNAL_RAG MEMORY === with a SECURITY NOTICE header. Structured JSON/MCP carries trust: untrusted + optional security_flags: ["instruction_like_content"].evidence_state (present/missing/unverifiable) for local path-like evidence β derived at retrieval time, never persisted.write:false blocks mutating tools before spawning a child. Per-call subprocess isolation (no shared state).py launcher, python, or python3 β the installer auto-detects the real interpreter and rejects the WindowsApps stub)pip install sentence-transformers numpy for better semantic retrievalThe current version is defined by the VERSION file β check it (or run mlm.py --version) instead of hard-coding an expected number.
Clone this repo once, then install into any project:
The installer:
INTERNAL_RAG/ + AGENTS.mdinit + checkpoint + validate (so guard is OK immediately)MANUAL_REQUIRED / prints JetBrains instructions)One installer, four clients, two config scopes. Full guide: docs/INSTALLATION.md.
| Client | Project scope | Global scope |
|---|---|---|
| Warp (config write automatic; project activation may require approval) | install.py . --client warp | install.py . --client warp --global |
| OpenCode stable (V1) (automatic for safe JSON config writes) | install.py . --client opencode | install.py . --client opencode --global |
| OpenCode 2 (V2, beta) (automatic for safe JSON config writes) | install.py . --client opencode2 | install.py . --client opencode2 --global |
| JetBrains AI / PyCharm (manual in IDE UI) | install.py . --client jetbrains | install.py . --client jetbrains --global |
--global changes the scope of the CLIENT CONFIG (~/.warp/.mcp.json vs {repo}/.warp/.mcp.json, ~/.config/opencode/opencode.json vs project opencode.json). The server still points at the target project you installed into.You can paste one of these directly into the client agent. Replace C:\Projects\App with the real target repository path.
Warp β install for one project:
Warp β global client config for one project:
OpenCode β install for one project (stable/V1):
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-light-memory)<a href="https://allmcps.com/mcp/mcp-light-memory"><img src="https://allmcps.com/api/badge/mcp-light-memory?style=directory" alt="MCP Light Memory on AllMCPs" /></a>