
Substrate
co.trysubstrate由 trysubstrate.co 发布官方发布者v0.11.4更新于 Nov 4, 2026
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
概览
Substrate 是一个托管的共享记忆服务器,让 AI 编程助手跨会话、跨工具记住你的决策、偏好、人物和项目。
- 可以做什么
- 在每轮回答前召回相关记忆作为上下文,并可搜索和展开已存记忆
- 自动捕获已完成的对话轮次、有长度限制的工具调用与结果,以及会话边界
- 按需保存明确的事实,并可撤回某条事实同时保留其证据链
- 查看某条被召回事实背后的来源证据
- 经一次性确认后导入本机过去的对话记录
- 适用场景
- 适合同时使用多个助手(Claude Code、Codex、ChatGPT Work、Gemini CLI、Cursor、Hermes 及其他 MCP 客户端),希望有一份可编辑、可跟随你在不同工具间延续的决策与偏好记忆时使用。
- 运行要求
- 远程 MCP 端点 app.trysubstrate.co,使用 OAuth 登录并在浏览器中批准,无需 API 密钥或令牌。Claude、Codex 和 Hermes 需安装对应插件,其他 MCP 客户端使用通用服务器。需要能访问 Substrate 服务的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Substrate,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/co.trysubstrate%2Fmemory/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"substrate": {
"type": "http",
"url": "https://app.trysubstrate.co/mcp"
}
}
}README
Substrate Memory Plugins
Give your agents a memory that follows you across Claude, ChatGPT, Codex and Hermes.
AI memory for your team, editable, permissioned, owned.
trysubstrate.co: a context layer for your team and agents.
- Gemini CLI:
gemini extensions install https://github.com/Substrate-memory/Substrate-memory-plugins(follows the latest release; pin one with--ref v<version>) - MCP registry name:
co.trysubstrate/memory(remote serverhttps://app.trysubstrate.co/mcp)
Substrate remembers your decisions, preferences, people and projects. Connect once, and every supported agent recalls what matters before each turn and saves what matters after it. One connection screen, one review step, one approval. No API keys. No tokens to paste. No secrets to manage.
What you get
- Recall before every turn. Relevant memories are injected as context before the agent answers.
- Automatic capture of every completed turn. User messages, assistant answers and bounded redacted tool calls and results are saved.
- Session boundaries. Starts, resumes, resets, compacts and ends are recorded, so memory stays scoped to the right session.
- Subagent capture. Work done by subagents is routed to the parent session.
- Durable delivery. Nothing is stored twice. Hermes uses a profile-local write-ahead spool. Claude and Codex treat the host transcript as the spool: the server reports missing turns and the plugin sync re-imports them with deterministic ids.
- Explicit remember and forget. Say "remember this" to keep a fact. Retract one fact without deleting its evidence trail.
- Evidence. Check the source behind a recalled fact before you rely on it.
- Import past conversations. Asked once, after connection. Only with your confirmation.
How it works
Each package is a thin client. The server owns storage, ranking, redaction checks and the memory contract. Every host speaks the same contract (docs/mcp-contract.md, version 2): memory_turn_context opens the turn and returns recall, memory_capture_tool records tool use, memory_capture_turn closes the turn, memory_session_boundary marks lifecycle events, memory_import replays missed or past turns, and memory_search, memory_expand, memory_evidence, memory_remember, memory_forget read and write memory. The legacy Hermes /api/v1 wire stays supported on the server during the rollout.
Install
Paste this into the agent you want to connect:
The agent follows docs/install.md (the same file served at that link). It identifies its host and installs the right package. From this repository, the same request works too:
Then follow the printed steps: the agent shows a one-time approval link and code, you approve in the browser, and the agent confirms Connected to Substrate as [email protected]. (your account)
If Cowork needs manual installation, use Cowork tab → Customize → Plugins → Personal plugins → + → Add marketplace → Add from a repository (GitHub URL), then browse and install the package. Client-required permission dialogs still need the user. Follow the single installation and recovery guide.
What is captured and where it goes
With the hook plugins (Claude Code, Cowork, Codex, Hermes), each prompt, each completed turn and bounded tool calls and results go to your own Substrate tenant at app.trysubstrate.co. Secrets are redacted on the server before storage; the sync and import scripts also redact on the client. Nothing goes anywhere else; only the Hermes package also reads this repository's VERSION file on github.com once a day to show an update notice (nothing is sent). The Claude Code and Codex plugins run one local script, the bundled scripts/substrate_sync.py: it reads only this agent's own conversation files (for the import you choose and for catch-up sync) and sends them only to https://app.trysubstrate.co/mcp; any other host is refused. The only credential it handles is Substrate's own short-lived import ticket, which it gets from the Substrate server by a single-use claim (or from a temporary file the agent writes, deleted on read). It never reads your Claude Code or Codex sign-in files, the keychain, SSH or cloud keys, it downloads no code, and it runs nothing it downloaded: updates come only through the plugin marketplace. Without hooks (plain MCP, Gemini CLI) only what the agent explicitly saves is stored. You can read, edit and forget every line; account deletion purges within 30 days.
Security and privacy
- Browser approval only. You sign in and choose Connect your agent to Substrate in the browser. The agent shows the exact link and never approves for you.
- No keys to manage. The product never issues API keys to users and never asks for pasted tokens or client secrets.
- Redaction on both sides. Secrets are redacted client-side before sending and again server-side on ingest. Captured tool arguments are bounded (4096 bytes) and tool results are stored as excerpts (8192 bytes plus a digest).
- Tenant isolation. Every credential is tenant-scoped. The server owns account identity; clients never send tenant or account ids.
- What is stored. Redacted turn content, session boundaries, explicit memories you confirm, and retraction records with their evidence.
- What is not stored. Passwords, API keys, tokens, and other secrets are redacted before storage. History import runs only after you choose it.
See SECURITY.md and docs/threat-model.md.
Import past conversations
Right after Connected to Substrate., in the same reply, the agent offers once, with what it found on this computer:
I found 87 past conversations on this computer (1,204 turns, 3 Mar to 7 Oct 2026). Import them into Substrate? Import all / Let me pick / Not now
- Import all imports every local conversation except the current one (already captured live). It runs in the background; the agent reports progress and the final line (how many conversations were imported, and that Substrate is reading them now) without waiting for you.
- Let me pick lists conversations by date and title; only those are imported.
- Not now is remembered and never asked again. Ask "import my past conversations" any time.
- The import state is kept per computer, not per account. If you later connect a different Substrate account on the same computer, the agent checks it and offers to import the earlier conversations into that account.
Claude Code and Codex upload straight from the package script with a short-lived, import-only ticket (memory_import_ticket), so your history never passes through the chat. Hermes reads its own profile history and sends it through its spool. Cowork cloud sessions have no local history, so the offer is skipped. Imports are redacted client- and server-side, and repeats are ignored.
Supported hosts and versions
Every package installs on any host version. Outside the tested range the agent (and the Hermes plugin itself) shows a friendly note instead of refusing: Tested on Hermes 0.21.0 or newer; you are on X. It should work; tell us if not. Newer Hermes versions get no note. See COMPATIBILITY.md.
Known limits, stated honestly:
- Codex has no session-end hook, so the server seals idle sessions after 30 minutes.
- Claude Code allows no MCP tool hook on SessionStart, so the first turn implies the session boundary.
- If a Cowork cloud session ends while Substrate is unreachable and is never reopened, its last turn is not recovered.
- Codex asks you to approve Substrate's hooks once: in the Codex app, in its hooks settings; in the terminal,
/hooks. - Cowork needs a new session after install before tools appear.
- Claude Code can show red "MCP server not connected" or "Unauthorized" hook errors while you are signed out or after a removed sign-in. Claude Code reports these from the plugin's capture hooks and the plugin cannot hide them. Reconnect with
/substrate-claude:substrate-connect.
See COMPATIBILITY.md for the full matrix and history.
FAQ
Do I need an API key? No. Sign in in the browser and approve. There is nothing to copy or paste.
Which package does my agent install?
Claude Cowork and Claude Code use plugins/substrate-claude. ChatGPT Work, the Codex app and Codex CLI use plugins/substrate-codex. Hermes uses plugins/substrate-hermes. OpenClaw, Grok and any other MCP-capable agent connect over the generic MCP server, the default for any system without its own package. plugins/substrate-mcp is the thin fallback package.
How do I know it is connected?
The agent runs an authenticated memory smoke test. Only a passed memory_search means Connected to Substrate.
What exactly is sent to Substrate? Each completed turn: your message, the agent's answer, and bounded tool calls and results, all redacted before sending and again on the server. History import sends the same redacted turn content, only after you choose Import all or pick sessions.
What about my old August 2026 API-key plugin?
Those plugins (substrate_capture, local spool paths, SUBSTRATE_API_KEY setups) are deprecated. Uninstall them and connect with the browser flow. Their local spools are not migrated.
Can I roll back?
Yes. The immutable v0.5.0 and v0.6.0 tags remain available for rollback.
Development and releases
Releases are staged and gated; no tag or publication happens from a review branch. See docs/releasing.md.
Links
- Installation and recovery guide
- Architecture
- Source-of-truth boundary
- Compatibility
- Security
- Changelog
- MCP contract v2 (single source of truth for the memory tools)
来源:README.md,提交 1ababed
工具
0版本历史
3- v0.11.4最新Nov 4, 2026
- v0.11.3Nov 4, 2026
- v0.11.2Nov 3, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分