claude-code-substrate-memory
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-code-substrate-memorysearch memory for our infra migration notes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude Code Substrate Memory
claude-code-substrate-memory connects Claude Code to Substrate organizational memory. It
provides seven MCP tools for reading and writing memory, captures new transcript turns through
Claude Code lifecycle hooks, and keeps failed deliveries in a bounded local spool.
Version 0.1.0 uses only the Python standard library at runtime.
Install
Clone the repository and load it as a Claude Code plugin:
git clone https://github.com/Substrate-memory/claude-code-substrate-memory.git
claude --plugin-dir /absolute/path/to/claude-code-substrate-memoryFor development or direct CLI use, install the package into a Python 3.11+ environment:
python -m pip install -e .
substrate-claude-code statusThe plugin manifests provide the MCP server, lifecycle hooks, and slash commands. The MCP server
can also be run directly with python -m claude_code_memory.server when src/ is on
PYTHONPATH.
Related MCP server: Claude Memory MCP Server
Configuration
Credentials are accepted from environment variables only:
SUBSTRATE_API_URL=https://your-substrate-server.example
SUBSTRATE_API_KEY=your-profile-scoped-bearer-keySet them in the environment that launches Claude Code. Never write SUBSTRATE_API_KEY to
.mcp.json, hooks/hooks.json, a project settings file, or another plaintext configuration file.
Run substrate-claude-code configure to print the required wiring without writing any secret.
If the variables are absent or the API is temporarily unreachable, capture remains enabled and
new events are placed in the local spool beneath ~/.substrate/claude_code_memory/. Set
SUBSTRATE_STATE_HOME to relocate the state root, which is particularly useful for isolated
tests.
MCP tools
Tool | Purpose |
| Search organizational memory and return cited memory cards. |
| Read one wiki page by repository-relative path. |
| Ask a cited question over Substrate memory. |
| Submit text for asynchronous wiki ingestion. |
| Record a durable fact or decision requested by the user. |
| Retry delivery of locally spooled capture events. |
| Show content-free configuration and spool counters. |
The repository also adds /substrate-status and /substrate-recall slash commands.
Hook capture
Claude Code invokes four command hooks from hooks/hooks.json:
Stop captures only user and assistant messages not previously checkpointed and emits a
turnevent.PreCompact captures the same incremental transcript window as
pre_compressbefore Claude Code compacts its context.SessionEnd emits a content-free
session_endevent containing only the normalized message count and session boundary. A persistent marker ensures it is emitted at most once.SessionStart performs a bounded Substrate search and prints a compact Markdown recall block when relevant memory is available.
Each hook is a fresh process, so per-session message digests and one-shot markers are persisted under the plugin state directory. Capture events are durably spooled before network delivery.
Privacy boundary
The transcript reader keeps only top-level user and assistant records. It excludes sidechain
records produced by subagents and ignores system, attachment, mode, permission-mode, and
last-prompt records.
For captured user and assistant messages, the plugin may send:
visible text from string content and
text,input_text, oroutput_textblocks;short markers such as
[tool_use: Read]and[tool_result];role, message index, bounded message identifier, session boundary, and capture metadata.
It does not intentionally send:
raw tool inputs or raw tool-result payloads;
hidden reasoning, token usage, billing fields, or arbitrary provider metadata;
attachment bodies, binary media, data URLs, or sidechain transcript text;
SUBSTRATE_API_KEYor other recognized credential-shaped values.
The shared capture core redacts recognized secrets before persistence and transfer. Redaction is defense in depth, not proof that arbitrary sensitive prose is absent. Visible prompts and assistant output can themselves contain confidential material, so configure only a trusted Substrate server and review its access and retention policy. Failed deliveries remain in a bounded owner-private local spool until delivered, evicted by the bound, quarantined, or removed by the operator.
Fail-open behavior
Hooks always exit with status 0. API failures, malformed hook input, unreadable or truncated
transcripts, corrupt local state, and recall failures do not block or annotate a Claude Code
session. Normal capture hooks write nothing to stdout; optional diagnostics go only to stderr when
SUBSTRATE_DEBUG is set. Session-start recall is the sole intentional hook output.
Repository map
src/claude_code_memory/— Claude Code runtime, transcript reader, hooks, recall, MCP server, and CLI.src/substrate_capture/— frozen shared capture core used by all host plugins..claude-plugin/— plugin and self-listing marketplace metadata..mcp.json— stdio MCP server registration.hooks/hooks.json— Claude Code lifecycle hook registration.commands/—/substrate-statusand/substrate-recallcommand prompts.tests/— shared-core and Claude Code host contract tests with synthetic fixtures.scripts/— shared-core provenance and publication verification tooling.
Development
python -m pip install -e '.[dev]'
python -m pytest tests/ -q
ruff check .Do not edit src/substrate_capture/ directly. Its digests are shared across host repositories and
verified by the test suite.
License
MIT © 2026 Sightline Technologies Inc. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceMCP server providing persistent, searchable memory management for AI workflows, enabling Claude Code to store, retrieve, and organize context through CRUD operations and knowledge tools.Last updatedMIT
- -license-qualityBmaintenanceEnterprise-grade MCP server for persistent, intelligent memory management across Claude Code sessions.Last updated

Sekha MCP Serverofficial
Alicense-qualityCmaintenanceThis MCP server exposes Sekha memory tools (store, search, update, etc.) to any MCP-compatible client, enabling persistent conversation memory across Claude Desktop, Claude Code, and other applications.Last updated2AGPL 3.0- Alicense-qualityCmaintenanceMCP Memory Server for Claude Code that provides persistent context across sessions using semantic search (RAG).Last updatedApache 2.0
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Cloud-hosted MCP server for durable AI memory
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Substrate-memory/claude-code-substrate-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server