memoir-mcp
Structured session journals for AI agents. Persistent memory across sessions -- no more repeating dead ends.
README
memoir-mcp
Structured session journals for AI agents. Persistent memory across sessions -- no more repeating dead ends.
When a session ends, all reasoning is lost -- what was tried, what failed, what's blocked. The next session starts from scratch and repeats the same mistakes. memoir logs it all and hands it off so the next session picks up where the last one left off.
Works with any MCP client: Claude Code, Cursor, Codex, Windsurf, and more.
<a href="https://glama.ai/mcp/servers/@bighippoman/memoir-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@bighippoman/memoir-mcp/badge" alt="memoir-mcp MCP server" /> </a>
Install
Claude Code
claude mcp add memoir -s user -- npx -y memoir-mcp
Other MCP clients
npx -y memoir-mcp
How it works
- Automatic project detection -- identifies the project by its git root, so logs stay scoped without any configuration.
- Implicit sessions -- a session is created automatically on first log. No setup step.
- Rolling retention -- keeps the last 20 sessions per project (configurable). Old sessions are pruned automatically.
Tools
Write
| Tool | Description |
|---|---|
log_attempt |
Record something that was tried and its outcome. |
log_blocker |
Flag something that's stuck and why. |
resolve_blocker |
Mark a blocker as resolved with what fixed it. |
log_decision |
Record a design or architecture choice and its rationale. |
end_session |
Close the current session with an optional summary. |
Read
| Tool | Description |
|---|---|
get_handoff |
Structured summary of the last session -- what was attempted, what's blocked, what was decided. |
get_history |
Query past sessions (default: last 3, max 20). |
get_blockers |
List unresolved (or resolved) blockers across all sessions. |
Storage
Single SQLite file at ~/.memoir/memoir.db. No API keys, no external services.
Configuration
All limits are configurable via environment variables:
| Variable | Default | Description |
|---|---|---|
MEMOIR_MAX_CONTENT |
500 | Max characters for content fields |
MEMOIR_MAX_OUTCOME |
300 | Max characters for outcome/resolution fields |
MEMOIR_MAX_ENTRIES |
50 | Max entries per session |
MEMOIR_MAX_SESSIONS |
20 | Max sessions per project (rolling) |
Example with custom limits:
claude mcp add memoir -s user -e MEMOIR_MAX_CONTENT=1000 -e MEMOIR_MAX_ENTRIES=100 -- npx -y memoir-mcp
Handoff output uses a compact format to keep context window usage low.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.