OpenMemBrain
Description
OpenMemBrain is the intelligent membrane for AI coding memory. It autonomously reads and learns from your coding sessions — you never have to tell it what to save. It selectively absorbs project knowledge, blocks secrets, filters noise, resolves conflicts, and persists only what…
About
OpenMemBrain is the intelligent membrane for AI coding memory. It autonomously reads and learns from your coding sessions — you never have to tell it what to save. It selectively absorbs project knowledge, blocks secrets, filters noise, resolves conflicts, and persists only what matters.
Details
- Author
- mohamadalhusseinie
- Categories
- AI, Developer Tools, Knowledge Base
Jump to
Setup
Install OpenMemBrain in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/mohamadalhusseinie/openmembrain
Follow the installation instructions in the repository README, then restart your MCP client.
OpenMembrane is the intelligent membrane for AI coding memory. It autonomously reads and learns from your coding sessions — you never have to tell it what to save. It selectively absorbs project knowledge, blocks secrets, filters noise, resolves conflicts, and persists only what matters.
No manual effort. No data leaves your machine unless you choose it. Safe, private, and trustworthy by design.
- Claude Desktop
- Claude Code
- VS Code / GitHub Copilot
- Cursor
- OpenCode
Zero-effort— learns from sessions automatically, no commands or prompts needed
Secure by default— secrets are detected and rejected before they ever reach storage
Self-managing— deduplicates, resolves conflicts, and filters noise on its own
Local-first— all memory stays on your machine; optional EU/CH-hosted cloud sync
Tool-agnostic— works with any AI coding tool via MCP (Claude, Copilot, Cursor, OpenCode, and more)
Install and run the MCP server with npx (requires Node.js >= 18):
npm install -g openmembrane openmembrane
No cloud accounts required. All memory is stored locally.
OpenMembrane runs as an MCP server over stdio. Add it to your AI tool's MCP configuration:
{ "mcpServers": { "openmembrane": { "command": "npx", "args": ["openmembrane"] } } }
claude mcp add openmembrane -- npx openmembrane
Add to.vscode/mcp.jsonin your project:
{ "servers": { "openmembrane": { "command": "npx", "args": ["openmembrane"] } } }
Add to.cursor/mcp.jsonin your project:
{ "mcpServers": { "openmembrane": { "command": "npx", "args": ["openmembrane"] } } }
Add to~/.config/opencode/opencode.json:
{ "mcp": { "openmembrane": { "type": "local", "command": ["npx", "-y", "openmembrane"] } } }
Adding the MCP server gives your AI tool access to OpenMembrane's tools. To ensure the AI uses them automatically — loading project memory at session start and saving durable knowledge as it's discovered — add a global instruction file.
Create~/.config/openmembrane/instructions.mdwith instructions for the AI to:
- Callget_project_rules,get_relevant_context, andlist_memory_candidatesat the start of each session.
- Callrememberproactively when durable knowledge is discovered, providing structured content and a type (e.g.,coding_rule,known_gotcha,architecture_decision). No API key needed.
Then wire the file into your tool's global configuration:
See the platform-specific setup guides indocs/setup/for detailed instructions.
Alternatively, runexport_static_memory_filesin any project to generate per-project instruction files (AGENTS.md, CLAUDE.md, etc.) that include both usage instructions and stored memories.
By default, local memory is stored in.openmembraneunder the current working directory. Override this with:
- OPENMEMBRANE_HOME: directory for local JSON memory stores.
- OPENMEMBRANE_PROJECT_ID: default project id when a tool call does not passprojectId.
- remember— save structured memory directly. Provide content, type, and optional scope/tags. No API key needed. Supports single and batch mode.
- propose_memory_from_session— submit a session transcript or summary for server-side LLM extraction. Requires a configured extractor. Useful for automation adapters.
- get_project_rules— retrieve project rules and conventions for the current scope.
- get_relevant_context— find memories relevant to a natural language query.
- search_memory— search saved memories by query, scope, type, or tags.
- list_memory_candidates— list pending memory candidates awaiting approval.
- approve_memory_candidate— approve a pending candidate to save it as memory.
- approve_all_candidates— approve all pending candidates at once.
- reject_memory_candidate— reject a pending candidate with an optional reason.
- reject_all_candidates— reject all pending candidates at once.
- update_memory— update the content, type, scope, or tags of a saved memory.
- supersede_memory— mark a memory as superseded, optionally linking a replacement.
- review_stale_memories— list memories older than a threshold (default: 6 months).
- export_static_memory_files— generate static instruction files (AGENTS.md, CLAUDE.md, etc.).
- get_diagnostics— retrieve diagnostic events filtered by severity or code.
- list_audit_log— retrieve recent audit events.
OpenMembrane supports two paths for saving memory:
-
remember(primary):The AI tool callsrememberdirectly with structured content and type. No server-side LLM needed. Memories go through the full pipeline (secret detection, policy filtering, deduplication) and are auto-saved.
propose_memory_from_session(secondary):An adapter or AI tool submits a full session transcript for server-side LLM extraction. Requires a configured extractor (OpenAI or compatible provider).
remember tool propose_memory_from_session | | v v processStructured() SessionIngestor | -> SecretDetector redaction v -> MemoryExtractor interface MemoryClassifier -> MemoryClassifier -> PolicyEngine -> PolicyEngine -> Deduplicator -> Deduplicator -> ConflictDetector -> ConflictDetector -> ActionRecommender -> ActionRecommender -> MemoryStore or PendingCandidateStore
- packages/core: domain types, extraction interface, policy checks, classification, deduplication, conflict detection, and pipeline orchestration.
- packages/storage: local JSON persistence for saved memory, pending approvals, and audit events.
- packages/exporters: static fallback file generation for AI tools that read project instruction files.
- packages/shared: small runtime helpers for IDs, time, and result types.
- apps/mcp-server: local MCP server exposing saved memory and approval workflows to AI tools.
Provider-specific LLM calls are intentionally kept out of the core. The boundary is:
interface MemoryExtractor { extract(input: SessionInput): Promise<MemoryCandidate[]>; }
TheMockMemoryExtractoris used for deterministic testing. TheLlmMemoryExtractorsupports OpenAI and any compatible API endpoint (viabaseUrl).
OpenMembrane distinguishes audit history from diagnostics:
- Audit events describe normal memory activity, such as session ingestion, candidate extraction, saved memory, queued candidates, and rejected candidates.
- Diagnostics describe operational problems, such as validation errors, missing candidates, invalid local JSON stores, unsafe approval attempts, and export failures.
MCP tools return safe user-facing error payloads with adiagnosticId. The detailed diagnostic can be inspected throughget_diagnosticswithout exposing raw transcripts or secrets.
- AGENTS.md
- CLAUDE.md
- .github/copilot-instructions.md
- .cursor/rules/openmembrane.mdc
- docs/ai/project-memory.md
These files are compatibility fallbacks for tools that cannot retrieve memory through MCP. By default, exporters omitconfidentialmemories because these files may be committed to source control. Callers must explicitly opt in to include confidential memory.
git clone https://github.com/mohamadalhusseinie/openmembrane.git cd openmembrane npm install
Run the MCP server locally (from source via tsx):
npm test # vitest npm run typecheck # tsc --noEmit npm run check # both
- Architecture— pipeline design, type schemas, MCP tool surface, package dependencies
- Security and Privacy— secret handling, data storage rules, LLM usage policy
- Product Vision— product thesis, UX workflow, memory quality criteria
- Roadmap— phased delivery plan from local MVP to hosted mode
- Contributing— setup, development workflow, PR guidelines
Provides perfect memory for AI-assisted development by capturing project context snapshots, enabling natural language search, evolution tracking, and code intelligence.
Persistent memory for AI assistants and coding agents across ChatGPT, Claude, Cursor, and other MCP-compatible tools.
Shared memory layer for AI coding agents with dream pipeline distillation, session grounding, and multi-instance coherence.
Persistent AI memory across tools — remember your preferences, code standards, and decisions across Claude Code, Cursor, Codex, and any MCP tool. Local-first, zero-cloud.
Hosted shared memory for coding agents: what one connected agent learns, other connected agents can recall.
Shared memory for coding agents. Stop re-explaining your codebase every session. Hosted MCP at https://teamshared.com/mcp with email/OTP Connect.
Governed memory for coding agents with trust lifecycle, conflict detection, staleness tracking, and health scoring. SQLite + FTS5, zero infrastructure. Works with Claude Code, Cursor, Codex, Windsurf.
Persistent project memory + architectural decisions + pre-execution safety hooks for Claude Code. Local-only storage, multi-repo workspace, automatic knowledge extraction via background auditor.
Hebbian memory for AI agents — learns file access patterns, builds neural pathways, predicts next tools/files, saves tokens
ByteRover Team Memory is a paid remote MCP endpoint for OpenAI Codex memory MCP. It exposes structured JSON tools, a public server card, token-based access, usage receipts, and audit-ready w
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





