Membral

MCP文档知识

提供方 未标注

文档知识 stdio · 本地进程 API Key 社区 / 第三方 ClaudeCursorVS CodeCodex
查看接入方式

本地记忆你的编码代理会话。导入 Claude Code、Codex、opencode 和 Copilot 的对话记录,提取决策与经验,并附上指向对应会话轮次的链接,让代理通过 MCP 搜索这些内容。MIT 许可,在你的机器上运行。

一句话选型结论

按资料字段整理

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

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

工具与能力

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

能力标签

支持客户端

适用场景

记忆

安装与配置

stdio · 本地进程 API Key
客户端在本机拉起子进程,数据不出本机
npx membral local up

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

  1. 1
    准备运行环境

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

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

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

典型使用场景

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

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

知识库读写

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

内容整理

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

选择建议

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

值得选的地方

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

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

  • 完全不想在本地装环境的人。
  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Membral当前 未标注 stdio · 本地进程 本地部署 有 2026-11-20
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 · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-11-20上游最后核验时间

详细介绍

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

Membral

A local memory store for coding agents. Every decision and learning it extracts keeps its verbatim quote and links
back to the session turn it came from, and your agents search it over MCP.

Membral runs in Docker on your machine. It saves your coding-agent sessions (Claude Code, Codex, opencode, Copilot,
Antigravity) in one store, extracts the decisions, learnings and outcomes, and keeps each one tied to its source: the
exact words said, and the turn to open (get_code_session with a turn) to read what was around them. An agent can
check a recalled fact against the transcript instead of trusting a summary.

How it fits together```mermaid

flowchart LR
you([You])

subgraph inputs["Where your work happens"]
direction TB
subgraph agents["Coding agents"]
direction TB
cc[Claude Code]
cx[Codex CLI]
oc[opencode]
cp["GitHub Copilot<br/>CLI and VS Code"]
ag[Antigravity]
end
subgraph chats["Chat apps"]
direction TB
gpt[ChatGPT]
cai[Claude.ai]
end
end

cli["membral CLI<br/>hooks · 20-min sweep · import"]
ext["Chrome extension"]

subgraph stack["Your machine · membral local up (Docker)"]
direction TB
api["Membral app<br/>API · dashboard"]
mcp["MCP server<br/>memory_search · get_code_session · …"]
extract["Extraction<br/>runs on a timer"]
db[("Postgres + pgvector<br/>sessions · turns · memories")]
end

llm["Extraction model<br/>Claude login · Ollama 7B+ · API key"]
emb["Ollama on your machine<br/>nomic-embed-text"]

you -->|prompts| agents
you -->|chats| chats
agents -->|transcripts on disk| cli
chats -->|export file| cli
chats -->|open chat pages| ext
cli -->|upload sessions| api
ext -->|sync chats| api
api -->|store| db
db -->|new sessions| extract
extract <-->|turns in, records out| llm
extract -->|decisions · learnings · outcomes| db
api <-->|text in, vectors out| emb
agents <-->|MCP tool calls| mcp
mcp <-->|search| db
api -->|preamble · prompt lookup| cli
cli -->|added to the agent's context| agents
api -->|dashboard| you

style stack stroke-dasharray: 6 4
```

In. The membral CLI reads each agent's transcripts from disk (end-of-session hooks and a 20-minute sweep) and
uploads them. Chats come in through the Chrome extension or an export file.

Stored and processed. The app keeps sessions, turns and memories in Postgres with pgvector. A timed job sends
new turns to an extraction model and stores the decisions, learnings and outcomes that come back. A local embedding
model turns text into vectors so search can compare meaning.

Back to your agent. Agents search over MCP. The CLI adds a preamble at session start and, in Claude Code,
matching records at each prompt. The dashboard shows everything stored.

What it does

  • One store for sessions from every agent, in one shape: turns, models, token usage, tools, files and sub-agents.
  • Extracts decisions, learnings and outcomes, each with its quote and a link to the session.
  • Searches by meaning, with keyword search as the fallback.
  • MCP tools (memory_search, memory_recall, get_code_session) for any MCP-capable agent. Clients that only speak stdio can run membral mcp.
  • A session-start preamble and, in Claude Code only, prompt-time lookup.
  • ChatGPT and Claude.ai chats saved next to your coding sessions, and a dashboard to browse it all.

It is not live state: whether a PR is merged or what is deployed is checked in your forge. One store per person;
no team or admin controls yet.

Run it locally

You need Node 22.5 or newer, Docker with Compose 2.23+ (40 GiB of VM disk), and one extraction model (step 1).
up starts three containers: Postgres with pgvector, PostgREST, and the Membral app, which serves sign-in itself and
runs extraction on a timer. Embeddings use a bundled model that downloads on first use (about 137 MB); Ollama is
optional.

  1. Pick an extraction model by putting one choice in ~/.membral/local/.env (mkdir -p ~/.membral/local first):
    - Claude subscription: CLAUDE_CODE_OAUTH_TOKEN=. When claude is on your PATH and
    no other choice is set, up selects the claude-code provider for you.
    - API key: OPENAI_API_KEY=... (or OPENROUTER_API_KEY)
    - Ollama: a 7B+ model such as qwen2.5:7b, run with OLLAMA_CONTEXT_LENGTH=16384 ollama serve
  2. Install and start it in one command: npx membral local up. It starts the stack, prints the URL and an API key,
    and connects the agents it finds. Add --embeddings ollama to use Ollama's
    nomic-embed-text instead of the bundled model.
  3. Check it: npx membral local status (it prints an Embeddings: ... line).

From a clone (contributors): git clone https://github.com/surajtripathy07/membral &amp;&amp; cd membral &amp;&amp; npm ci &amp;&amp; npm run cli:install
builds the CLI and installs it globally, so membral replaces npx membral in the commands here.

up prints a sign-in URL and password and an API key; treat that output as a secret. The app is at
http://localhost:3000. The image is multi-arch (amd64 and arm64); if a pull fails, build it locally and pass --image. Image source builds, extraction setup, disk, logs, Linux notes and what works without an
extraction model are in docs/SELF-HOSTING.md.

Handoff notes are on by default locally: up writes MEMBRAL_HANDOFF_SYNTHESIS=1 (a session note is written after extraction) and MEMBRAL_HANDOFF_SEARCH=1 (memory_search can find notes) into .env; set either to 0 in your shell before membral local up, or in ~/.membral/local/.env, to turn it off.

Large stores (tens of GB of sessions) need Docker or Colima memory of 12 GB or more, for example colima start --memory 14.
up sizes Postgres memory to the Docker VM and warms the excerpts table in the background after it starts.

To run a second stack beside it (for example to test a branch), add --project to local up · down · status · logs
(or set MEMBRAL_LOCAL_PROJECT) and pass a free --port value. Its files live in
~/.membral/local- and its Docker volumes end in -; the default stack is untouched. Both stacks write
the one local CLI profile, so the last up wins.

Why embeddings

Search compares meaning, so a question worded differently from the saved text still finds it. Without an embedder,
memory_search works on keywords only and says so ("SEARCH DEGRADED ... keyword-only results"), and the relevance
floor that drops weak matches is off. nomic-embed-text is the model whose thresholds are calibrated in this repo
(apps/cloud/src/lib/memory/similarity.ts). It runs on Ollama on your machine, so record text never leaves it.
Vectors are 1,536 wide, and smaller models are zero-padded. Chat and session-text search (search_conversations) is calibrated only for text-embedding-3-small, so with
nomic-embed-text it stays keyword-only and says so. The claude-code provider does no embeddings.

Chrome extension

It syncs ChatGPT and Claude.ai chats to your local stack.

  1. npm run build --workspace=@membral/extension (targets http://localhost:3000; for another port build with
    VITE_CLOUD_URL=http://localhost:, or save a Server URL in the options page, where Chrome asks permission).
  2. In chrome://extensions, turn on Developer mode, choose Load unpacked, pick packages/extension/dist.
  3. In the options page, paste the API key npx membral local up printed (it starts lls_) and Save. The popup shows
    the server and "Connected with an API key".

Supported agents

Agent Capture Sync MCP Preamble
Claude Code yes yes yes yes
opencode yes yes yes yes
GitHub Copilot (CLI + VS Code Copilot Chat) yes yes yes yes
Codex CLI yes yes yes yes
Antigravity yes yes yes yes

Capture reads the agent's transcripts. Sync is membral sessions plus the sweep. MCP is search by the agent. The
preamble is added at session start. The per-prompt lookup is Claude Code only. A Claude Code plugin is an
alternative to the CLI hooks (docs/SELF-HOSTING.md).

Where your data goes

The local stack keeps everything on your machine. The exceptions are model calls: with an API key, session text
goes to that provider, and with a Claude login, to Anthropic through Claude Code. Saved: prompts, replies, tools
called, files touched and text written to files (capped). Tool output is not kept. Secrets are redacted by
pattern, and files such as .env keep no text. You choose which projects sync (~/.membral/sync.json).
To skip throwaway scratch directories, add path patterns to that file (* matches any characters):
{&quot;excludePathPatterns&quot;:[&quot;/private/var/folders/*/membral-lab-*&quot;]}. A project listed with enabled: true still syncs.

Commands

  • npx membral local up · status · logs · down runs the stack (down --wipe deletes the data); npx membral local reembed moves stored vectors to a new embedding model.
  • membral setup, login (default http://localhost:3000), use, sessions, import and status.
  • membral --help lists every command. npm run smoke checks the dashboard renders the fixtures.

More

docs/SELF-HOSTING.md covers the stack in depth. CONTRIBUTING.md goes
from clone to green gate to PR. docs/COMPARISON.md compares Membral with other ways of giving an agent memory.

License

MIT, see LICENSE. Source: github.com/surajtripathy07/membral.

常见问题

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

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

Membral 怎么在 Claude、Cursor、VS Code 里配置?

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

Membral 收费吗?

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

Membral 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Membral 支持哪些客户端?

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

Membral 能提供哪些能力?

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

Membral 需要什么运行环境?

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

Membral 是本地还是远程?

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

热门专题

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

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