memshelf-mcp
Supports cross-writing and reading the same memory shelf with Google's Gemini CLI, enabling vendor-portable memory across different AI platforms.
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., "@memshelf-mcpShelve this conversation as 'design-review'"
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.
memshelf-mcp
Put your agent's memory on a shelf, hand it the index.
_ _ __
_ __ ___ ___ _ __ ___ ___| |__ ___| |/ _|
| '_ ` _ \ / _ \ '_ ` _ \/ __| '_ \ / _ \ | |_
| | | | | | __/ | | | | \__ \ | | | __/ | _|
|_| |_| |_|\___|_| |_| |_|___/_| |_|\___|_|_|
____________________________________________
| INDEX >> | E-01 | E-02 | E-03 | E-04 | ... |
|__________|______|______|______|______|_____|
memory shelves for AI agentsStatus: M0 complete (Cases A + B), M1 tool surface shipped. The pattern
was validated with zero code on a live shelf — measured numbers in
docs/demo.md — and the M1 server/CLI now enforces it:
memshelf_shelve / recall / index / search / stats / doctor, plus a
Claude Code plugin (adapters/claude-code/). Sibling
project of docshelf-mcp,
which provides the storage/index layer.
What this is
Long-running agent sessions burn tokens re-sending history and lose detail to lossy auto-compaction. memshelf applies the docshelf pattern — tiny index in context, bodies fetched on demand — to the agent's own working memory:
Closed conversation topics, research dumps, and bulky tool output are offloaded to a local shelf as Markdown episodes.
Each episode carries an LLM-written, contract-validated digest that preserves decisions, rejected alternatives, artifacts, and open threads.
The agent keeps only
INDEX.md(kilobytes) + digests in context and recalls exact sections via INDEX → SUBINDEX navigation over MCP.
Positioning in one sentence: claude-mem's loop, git's substrate, docshelf's navigation — episodic memory you can grep, diff, review, and carry between hosts. Private and local by default: the standard storage mode is a local git repo with no remote configured.
Related MCP server: Kirok
Quick start
As an MCP server (tools memshelf_init / shelve / recall / index /
search / stats / resolve / doctor):
# Claude Code
claude mcp add memshelf -- uvx memshelf-mcp// Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"memshelf": { "command": "uvx", "args": ["memshelf-mcp"] }
}
}Or from the shell (pip install memshelf-mcp) — the same loop, no MCP:
memshelf init --shelf ~/my-shelf --name "My working memory"
memshelf shelve --shelf ~/my-shelf --slug 2026-07-23-topic --kind topic \
--digest "What was decided, what was rejected and why, what stays open." \
--section "Decisions=..."
memshelf recall --shelf ~/my-shelf --id 2026-07-23-topic --section Decisions --log
memshelf stats --shelf ~/my-shelf # claimed + realized savings
memshelf doctor --shelf ~/my-shelf # exit 1 on integrity errorsTwo sessions shelved on parallel branches and the merge collides in
INDEX.md / ledger.tsv / .meta.json / stats.svg? That is the
multi-writer conflict class (#58) and it resolves mechanically:
memshelf resolve --shelf ~/my-shelf # union appends, rebuild derived, doctor
memshelf resolve --shelf ~/my-shelf --commit # same + complete the merge commitConflicting episodes are content, not mechanics — resolve reports
them and steps aside.
A rejected digest is a feature: the tool prints exactly what to fix and
writes nothing. Measured results from a week of dogfooding are in
docs/demo.md.
The memory is vendor-portable, and that is now a measured fact, not a
design intention: the same live shelf has been read and cross-written by
Claude Code (Anthropic) and Gemini CLI (Google) through one shelf-spec
server — protocol and field notes in docs/portability.md.
Documents
Doc | What it covers |
Problem, the bet, hero scenarios, principles, non-goals | |
Episode format, digest contract, storage modes, triggers, MCP tool surface, portability model, privacy, failure modes | |
Prior-art survey (2026-07), platform built-ins, positioning, risks | |
Milestones M0–M3 with exit criteria | |
Decision log | |
M0 experiment protocol and results (complete): cases, token ledger, recall test | |
Measured numbers from the dogfood shelf: compression, recall test, doctor findings | |
One memory, multiple AIs — the 2026-07-27 experiment: the dogfood shelf read and written by Claude Code (Anthropic) and Gemini CLI (Google) through the same shelf-spec server | |
A worked episode file and a memory-shelf INDEX | |
Claude Code plugin: |
Origin
Designed as RFC-0001 in the docshelf-mcp repo (#42, #43, #44); this repo is the project's home from 2026-07-13 on. The docshelf copy is frozen as a historical snapshot.
Related projects
docshelf-mcp — the sibling project and storage layer: PDFs/Markdown → chat-project-friendly document shelves with the same index-and-fetch economics (measured: ~3.7K tokens vs 1.2M per question). memshelf was born as RFC-0001 in its repo and reuses its splitter/indexer/read/search verbatim.
The dogfood memory shelf is a private repo — by design (MANIFEST principle 5): the tool is public, the memory never is.
License
MIT — see LICENSE.
mcp-name: io.github.ignatenkofi/memshelf-mcp
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-qualityAmaintenancePersistent memory system for AI agents that records episodic memories with care-weighting and emotional valence, and provides full-text search with temporal chaining and automatic consolidation.Last updatedMIT
- AlicenseAqualityAmaintenanceProvides persistent, searchable memory for AI agents, enabling them to retain, recall, and reflect on information across conversations.Last updated191MIT
- Alicense-qualityAmaintenanceEnables persistent, portable memory for AI agents across sessions, devices, and providers with token-efficient 5-level lazy loading and automatic session capture.Last updated416MIT
- Alicense-qualityBmaintenancePersistent long-term memory for AI agents via MCP, saving 80-90% memory-related token costs by enabling on-demand recall instead of always-injecting context.Last updated186MIT
Related MCP Connectors
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent memory for AI agents — verbatim conversations, searchable by meaning.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
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/ignatenkofi/memshelf-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server