OpenMemBrain

MCP文档知识

提供方 未标注

文档知识 stdio · 本地进程 未标注 社区 / 第三方 Claude DesktopClaudeCursorVS Code
查看接入方式

OpenMemBrain是AI编码记忆的智能膜。它能自主读取并从你的编码会话中学习——你无需告诉它要保存什么。它选择性吸收项目知识、屏蔽机密、过滤噪音、解决冲突,并仅持久化重要内容。

一句话选型结论

按资料字段整理

OpenMemBrain 属于文档知识类 MCP 服务器,stdio · 本地进程,鉴权方式未标注,可直接接入 Claude Desktop、Claude、Cursor 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式stdio · 本地进程 鉴权未标注 部署方式本地部署
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

记忆

安装与配置

stdio · 本地进程 未标注
客户端在本机拉起子进程,数据不出本机
npx openmembrane

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
OpenMemBrain当前 未标注 stdio · 本地进程 本地部署 有 未标注
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类文档知识本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验未标注上游最后核验时间

详细介绍

14.9 KB
来自项目仓库与上游目录的原文,未做删改

OpenMembrane

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.

Table of Contents

  • Installation
  • Configuring Your AI Tool
  • Claude Desktop
  • Claude Code
  • Codex
  • VS Code / GitHub Copilot
  • Cursor
  • OpenCode
  • Automatic Memory Capture
  • Deployment Modes
  • Environment Variables
  • MCP Tools
  • Architecture
  • Diagnostics And Errors
  • Static Fallback Files
  • Development
  • Documentation

  • 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 Private by default — memory is stored locally in git-ignored .openmembrane/
  • Tool-agnostic — dedicated adapters for OpenCode, Claude Code, Codex and VS Code/Copilot, plus MCP for Cursor, Claude Desktop and others

Installation

Install and run the MCP server with npx (requires Node.js >= 18):```sh
npx openmembrane


Or install globally:```sh
npm install -g openmembrane
openmembrane

No cloud account is required for the default Local Private mode, which stores
memory locally in git-ignored .openmembrane/.

The local daemon has explicit lifecycle commands:```sh
openmembrane serve # foreground
openmembrane start # detached
openmembrane status
openmembrane stop


Bare `openmembrane` and `openmembrane mcp` both launch MCP stdio.
CLI data commands and the review UI use the authenticated local daemon.
Run `openmembrane start` first; these surfaces report an error if the daemon
is unavailable and never fall back to opening stores themselves. MCP uses
the same client and auto-starts the daemon on the first tool call, then
reuses it across calls and sessions. Listing tools does not start it. See
Daemon Protocol for transport, authentication,
and per-project request settings.

### CLI and local review

Run these commands from your project directory. `--project ` overrides
`OPENMEMBRANE_PROJECT_ID`; `OPENMEMBRANE_HOME` selects project storage, not
the per-user daemon endpoint.```sh
openmembrane ingest --file session.txt --tool codex
openmembrane ingest --stdin --tool claude-code --session-id session-123
openmembrane context --query "deployment rules" --output markdown
openmembrane candidates list --output json
openmembrane candidates approve <id>
openmembrane candidates reject <id> --reason "Obsolete"
openmembrane candidates approve-all
openmembrane candidates reject-all
openmembrane memory update <id> --content "Updated project rule"
openmembrane memory supersede <id> --reason "Replaced" --replacement-id <new-id>
openmembrane memory stale --stale-after-months 6
openmembrane export --targets agents,claude --preview
openmembrane export --targets agents,claude --output-dir generated
openmembrane diagnostics --severity warning --limit 100
openmembrane audit --limit 100
openmembrane team configure --owner my-team --repo private-memory
openmembrane team status

All data commands support --output text · json · markdown. Ingest defaults to
JSON for compatibility; the others default to text. openmembrane --help
lists command-specific filters and options. Bulk approval skips candidates
that cannot be approved, including secrets, and reports each skipped ID.
GitHub Team mutations report publication/retry state rather than implying
that an unmerged proposal is already active.

From this repository, npm run review-ui -- --no-open starts the loopback
review UI. It provides memory search, editing and superseding, candidate
review (individual and bulk), audit, diagnostics, stale-memory review, and
static-export preview/write. Preview never writes files. Export excludes
confidential memories unless you explicitly opt in.

Configuring Your AI Tool

Pick the integration for your tool. OpenCode, Claude Code and Codex adapters
capture sessions through the local daemon; retrieval and stored-memory egress
to the model provider require the opt-ins described in each guide (Claude Code
and Codex also need separate MCP setup for retrieval). VS Code cannot capture
ordinary Copilot chats automatically: use explicit export capture, or opt-in
auto-save for the extension's own participant exchanges. MCP is the fallback for
tools without an adapter. The CLI is required for every integration except VS
Code, whose extension bundles it (npm install -g openmembrane).

Tool Integration Setup guide
OpenCode @openmembrane/adapter-opencode plugin OpenCode setup
Claude Code @openmembrane/adapter-claude-code hooks Claude Code setup
VS Code / GitHub Copilot VS Code extension VS Code setup
Codex @openmembrane/adapter-codex hooks Codex setup
Cursor MCP config (fallback) Cursor setup
Claude Desktop MCP config (fallback) below

The MCP server runs over stdio and auto-starts the daemon on its first tool
call. Add it to your AI tool's MCP configuration:

Claude Desktop

Edit claude_desktop_config.json:```json
{
"mcpServers": {
"openmembrane": {
"command": "npx",
"args": ["openmembrane"]
}
}
}


### Claude Code```sh
claude mcp add openmembrane -- npx openmembrane

Codex

For automatic session capture with native hooks and startup retrieval
instructions, follow Codex setup:```sh
npm install -g openmembrane
npx @openmembrane/adapter-codex install


Restart Codex and review/trust the hook with `/hooks`. MCP retrieval is
configured separately and requires explicit permission for stored-memory egress.

### VS Code / GitHub Copilot

The VS Code extension bundles the CLI,
starts the local daemon and registers MCP retrieval without manual configuration.
It also adds `@openmembrane /rules`, `/recall`, `/review`, candidate review,
export and diagnostics commands, and explicit chat export capture. Stable
VS Code APIs do not expose all Copilot sessions; opt-in auto-save covers only
the extension's own participant exchanges.
See VS Code setup for VSIX installation.

Alternatively, add to `.vscode/mcp.json` in your project:```json
{
  "servers": {
    "openmembrane": {
      "command": "npx",
      "args": ["openmembrane"]
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:```json
{
"mcpServers": {
"openmembrane": {
"command": "npx",
"args": ["openmembrane"]
}
}
}


### OpenCode

For automatic session capture and opt-in context injection, follow
OpenCode plugin setup. It covers installation,
explicit consent to send stored memory to OpenCode's model provider, extraction
configuration, and uninstall instructions.

For optional MCP tools, add to `~/.config/opencode/opencode.json`:```json
{
  "mcp": {
    "openmembrane": {
      "type": "local",
      "command": ["npx", "-y", "openmembrane"]
    }
  }
}

See .opencode/INSTALL.md for detailed setup including
global instructions and development-from-source configuration.

Automatic Memory Capture

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.md with instructions for the AI to:

  • Call get_project_rules, get_relevant_context, and list_memory_candidates
    at the start of each session.
  • Use approve_memory_candidate or reject_memory_candidate after the
    developer decides what to retain.
  • Call remember proactively 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:

Platform Global instruction mechanism
OpenCode "instructions": ["~/.config/openmembrane/instructions.md"] in ~/.config/opencode/opencode.json
Claude Code Append to ~/.claude/CLAUDE.md
Codex Adapter-managed section in ~/.codex/AGENTS.md
Cursor Add to Rules for AI in Cursor Settings
VS Code / Copilot Create ~/.copilot/instructions/openmembrane.instructions.md with applyTo: "**"

See the platform-specific setup guides in docs/setup/ for
detailed instructions.

Alternatively, run openmembrane export from any project to generate
per-project instruction files (AGENTS.md, CLAUDE.md, etc.) that include both
usage instructions and stored memories.

Deployment Modes

OpenMembrane ships Local Private mode
by default and GitHub Team mode for
shared memory through a dedicated private repository. Self-Hosted Team and
Managed Team are planned. Static exported files are separate from team sync;
see Deployment Modes for the approved-memory
boundary and GitHub pull-request workflow.

Environment Variables

By default, local memory is stored in .openmembrane under 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 pass projectId.

MCP Tools

  • remember — save structured memory directly. Provide content, type, and optional scope/tags. No API key needed. Supports single and batch mode.
  • 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.
  • reject_memory_candidate — reject a pending candidate with an optional reason.

These are the seven mid-session MCP tools. Transcript ingestion, bulk review,
memory maintenance, export, diagnostics, audit, and team configuration are
user operations available through the CLI and review UI.
See MCP migration for each removed tool's replacement.

Architecture

OpenMembrane supports two paths for saving memory:

  1. remember (primary): The AI tool calls remember directly 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.

  2. openmembrane ingest (secondary): An adapter submits a full session transcript through the CLI or daemon ingestion endpoint for server-side LLM extraction. Requires an explicitly configured daemon extractor (OpenAI or compatible provider).```text
    remember tool CLI / daemon ingestion
    | |
    v v
    processStructured() SessionIngestor
    | -> SecretDetector redaction
    v -> MemoryExtractor interface
    MemoryClassifier -> MemoryClassifier
    -> PolicyEngine -> PolicyEngine
    -> Deduplicator -> Deduplicator
    -> ConflictDetector -> ConflictDetector
    -> ActionRecommender -> ActionRecommender
    -> MemoryStore or PendingCandidateStore


Package responsibilities:

- `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/service`: project-scoped operations, storage lifecycle, and GitHub Team synchronization owned by the daemon.
- `packages/protocol`: versioned daemon HTTP schemas and shared endpoint resolution.
- `packages/client`: authenticated local-daemon client used by MCP, CLI, review UI, and adapters.
- `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.
- `apps/daemon`: authenticated per-user HTTP daemon with project-scoped stores and CLI lifecycle management.

Provider-specific LLM calls are intentionally kept out of the core. The boundary is:```ts
interface MemoryExtractor {
  extract(input: SessionInput): Promise<MemoryCandidate[]>;
}

The MockMemoryExtractor is used for deterministic testing. The LlmMemoryExtractor supports OpenAI and any compatible API endpoint (via baseUrl).

Diagnostics And Errors

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 a diagnosticId, preserving
the daemon's ID and safe message. Inspect project diagnostics with
openmembrane diagnostics or the review UI, and daemon failures in the local
daemon log. Client-side failures are correlated on MCP stderr, never stdout.

Static Fallback Files

Static exporters can generate:

  • 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 omit confidential memories because these files may be committed to source control. Callers must explicitly opt in to include confidential memory.

Development```sh

git clone https://github.com/mohamadalhusseinie/openmembrane.git
cd openmembrane
npm install


Run the MCP server locally (from source via tsx):```sh
npm run mcp:stdio

Run tests and type checking:```sh
npm test # vitest
npm run typecheck # tsc --noEmit
npm run check # both


Build the publishable bundle:```sh
npm run build

Documentation

  • Setup guides — per-tool installation for OpenCode, Claude Code, Codex, VS Code/Copilot and Cursor
  • Daemon Protocol — transport, authentication and lifecycle
  • 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
  • Deployment Modes — current Local Private and GitHub Team modes, plus planned team modes
  • Roadmap — phased delivery plan for Local Private, GitHub Team, and planned team modes
  • Contributing — setup, development workflow, PR guidelines

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
OpenMemBrain 怎么安装?

在客户端按下面的安装命令接入:npx openmembrane。装完在客户端配置里引用同一个包或端点。

OpenMemBrain 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

OpenMemBrain 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

OpenMemBrain 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

OpenMemBrain 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、VS Code、Codex、Zed;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

OpenMemBrain 能提供哪些能力?

资料显示能力标签包括 记忆。具体工具清单以官方文档为准。

OpenMemBrain 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

OpenMemBrain 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 未标注。