membrain
Graph-based agent memory — search, trace, and manage a persistent knowledge graph from Claude Code via MCP.
View in Marketplace → for install tracking, related plugins, and profiles.
membrain
Search, trace, and manage your membrain knowledge graph from Claude Code. membrain is a graph-based memory system that persists entities, relations, and timestamped episodes across sessions. This plugin connects Claude to it via MCP.
Requirements
- Go (any recent version)
go install github.com/siracusa5/membrain/cmd/mem@latestInstall
/plugin marketplace add harnessprotocol/harness-kit
/plugin install membrain@harness-kitSetup
After install, add the membrain MCP server to your Claude Code settings:
{
"mcpServers": {
"membrain": {
"command": "mem",
"args": ["mcp"]
}
}
}Restart Claude Code. The /memory skill activates automatically once the MCP tools are connected.
Usage
/memory search <topic> search entities in the knowledge graph
/memory trace <query> BFS traversal — shows how concepts connect
/memory add <entity> <obs> add an observation to an existing entity
/memory episode <text> capture a session as a timestamped episode
/memory status graph health: entity/relation counts, server statusExamples
/memory search authentication
/memory trace "Claude Code"
/memory add "auth-service" "now uses PKCE for all OAuth flows"
/memory episode "Completed membrain MCP integration — 11 graph tools now connected"
/memory statusHow It Works
| Subcommand | Requires |
|---|---|
search, add, episode | membrain MCP server (mem mcp) only — works without HTTP server |
trace, status | membrain HTTP server (mem serve at localhost:3131) for richer output |
Graceful Degradation
If the membrain MCP tools are not connected, the skill prints install and configuration instructions. The HTTP-dependent subcommands (trace, status) fall back gracefully when the server is not running.
Desktop UI
When the HTTP server is running (mem serve), the full membrain graph UI is available at http://localhost:3131. In the harness-kit desktop app, it appears as the Memory section with full sub-page navigation.