memoir-mcp
memoir-mcp provides persistent memory for AI agents across sessions by logging attempts, blockers, decisions, and handoffs to a local SQLite database — no external services or API keys required.
Write Tools:
log_attempt— Record something that was tried along with its outcomelog_blocker— Flag an obstacle and document why it's blockedresolve_blocker— Mark a blocker as resolved by providing its ID and what fixed itlog_decision— Record a design or architectural decision and its rationaleend_session— Explicitly close the current session with an optional summary
Read Tools:
get_handoff— Retrieve a structured summary of the last session (attempts, blockers, decisions) to quickly get up to speedget_history— Query past sessions for the current project (default: last 3, up to 20)get_blockers— List unresolved or resolved blockers across all sessions for the project
Key behaviors:
Auto-detects projects via git root and implicitly creates sessions
Stores all data locally in
~/.memoir/memoir.dbRetains up to 20 sessions per project, automatically pruning older ones
Configurable via environment variables (
MEMOIR_MAX_CONTENT,MEMOIR_MAX_OUTCOME,MEMOIR_MAX_ENTRIES,MEMOIR_MAX_SESSIONS)Compatible with any MCP client (Claude Code, Cursor, Codex, Windsurf, etc.)
Uses Git repository roots to provide automatic project detection, ensuring that session journals and persistent memory logs are correctly scoped to the current project.
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.
Install
Claude Code
claude mcp add memoir -s user -- npx -y memoir-mcpOther MCP clients
npx -y memoir-mcpRelated MCP server: MCP Session Memory Bridge
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 |
| Record something that was tried and its outcome. |
| Flag something that's stuck and why. |
| Mark a blocker as resolved with what fixed it. |
| Record a design or architecture choice and its rationale. |
| Close the current session with an optional summary. |
Read
Tool | Description |
| Structured summary of the last session -- what was attempted, what's blocked, what was decided. |
| Query past sessions (default: last 3, max 20). |
| 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 |
| 500 | Max characters for content fields |
| 300 | Max characters for outcome/resolution fields |
| 50 | Max entries per session |
| 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-mcpHandoff output uses a compact format to keep context window usage low.
License
MIT
Available Tools
8 toolsend_sessionEnd SessionB
Explicitly close the current session with an optional summary.
| Name | Required | Description | Default |
|---|---|---|---|
| summary | No | High-level session summary |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states the action (close session) but does not disclose what closing entails (e.g., side effects, required state, irreversible actions). Minimal behavioral context beyond the verb.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with action, no unnecessary words. Excellent conciseness for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple close operation with one optional param and no output schema, the description covers the essential purpose. Could mention what happens after closing, but overall complete enough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so description adds minimal value. It reiterates that summary is optional, which is already clear from required: 0. No additional format or usage hints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool ends the session with an optional summary. Verb 'close' and resource 'session' are specific, and it distinguishes from sibling tools that handle blockers, logs, etc.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use end_session vs alternative tools. While the name implies it's for ending a session, no when-not-to-use or prerequisite information is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_blockersGet BlockersA
List blockers across all sessions for this project.
| Name | Required | Description | Default |
|---|---|---|---|
| resolved | No | Show resolved blockers instead of unresolved (default: false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description conveys that the operation is read-only ('list') and specifies the scope ('across all sessions for this project'). This adds adequate behavioral context for a simple retrieval tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence with no wasted words. It is front-loaded with the action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one parameter and no output schema, the description sufficiently covers purpose, scope, and parameter semantics. It could benefit from explaining return format, but the low complexity reduces the need.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description for the 'resolved' parameter. The tool description adds no additional parameter meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List'), the resource ('blockers'), and the scope ('across all sessions for this project'). It effectively distinguishes from sibling tools like 'log_blocker' which creates blockers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'log_blocker' or 'resolve_blocker'. The description implies read-only listing but does not explicitly state use cases or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_handoffGet HandoffA
Get a structured summary of the last session for this project. Use this at the start of a new session to understand what was previously attempted, what's blocked, and what decisions were made.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It correctly states the tool returns a structured summary, implying a read-only operation. However, it does not detail edge cases (e.g., no prior session) or response format, leaving some ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, with the purpose and usage front-loaded. Every sentence adds value, and there is no redundant or irrelevant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema), the description is largely complete. It explains the tool's output and usage scenario. Minor improvements could include mentioning what happens if no session exists.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema coverage is 100%. The description adds no extra parameter information, but the absence of parameters is already clear from the schema. Baseline for zero parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get a structured summary of the last session for this project,' which is a specific verb-resource pairing. It distinguishes itself from sibling tools like end_session or log_attempt by focusing on retrieving session history.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises 'Use this at the start of a new session,' providing clear context for when the tool is appropriate. While it does not list when not to use it or alternatives, the usage guidance is strong and context-aware.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_historyGet HistoryB
Query past sessions for this project.
| Name | Required | Description | Default |
|---|---|---|---|
| sessions_back | No | How many sessions to return (default 3) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only says 'query past sessions', which implies read-only but does not explicitly state safety traits like read-only or side effects. Lacks details on what happens internally.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, very concise. Every word is meaningful. Could include more detail without sacrificing brevity, but it is efficiently front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no annotations. For a list-query tool, it lacks information about return format, what constitutes a session, or pagination. Simple but incomplete for an agent to use reliably.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter (sessions_back) fully described. The description adds the context of 'past sessions' but not significant extra meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a clear verb ('Query') and resource ('past sessions') with a scope ('for this project'). It distinguishes well from sibling tools, which cover ending sessions, blocking, handoff, and logging.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. It states what it does but provides no context on prerequisites, typical use cases, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
log_attemptLog AttemptC
Record something that was tried and its outcome.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | What was attempted | |
| outcome | No | What happened |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behavioral traits. It only states the basic purpose, with no mention of side effects, permissions, idempotency, or system impact.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no wasted words, but it lacks detail. It achieves conciseness at the expense of completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a logging tool with no output schema and no annotations, the description is too minimal. It does not explain context like storage, frequency limits, or what 'attempt' means.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters. The description adds no extra meaning beyond what the schema provides, so baseline score applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the action (record) and resource (something that was tried and its outcome). It distinguishes from sibling tools like log_blocker and log_decision by being more general, but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like log_blocker or log_decision. The description lacks context about appropriate scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
log_blockerLog BlockerC
Flag something that's stuck and why.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | What's blocked and why |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must disclose all behavioral traits. It fails to mention whether the action is persistent, reversible, or has side effects. The tool mutates state but the description gives no such indication.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short (3 words), which is concise but borders on under-specification. It lacks structure and front-loading of key information, though there is no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, no annotations, and the presence of sibling tools, the description does not provide sufficient context about the tool's behavior, return value, or how it integrates with workflow.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the parameter 'content' is fully described in the schema. The description adds no additional meaning beyond 'what's blocked and why', which is already present in the schema's description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the verb 'flag' to indicate recording an issue, but doesn't specify what kind of blockers or the exact resource, leaving some ambiguity. It distinguishes from siblings like 'get_blockers' (listing) and 'resolve_blocker' (unblocking) only implicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as 'log_attempt' or 'log_decision'. No exclusions or prerequisites are mentioned, which is insufficient for an agent to decide correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
log_decisionLog DecisionB
Record a design or architecture choice and its rationale.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | What was decided and why |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavior. It only says 'Record', which implies a write operation, but lacks details on side effects, permissions, or constraints beyond what's in the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no extraneous information. Very concise and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple logging tool with one parameter and no output schema, the description is mostly adequate, though it lacks usage context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds marginal value beyond the schema's parameter description ('What was decided and why').
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Record' and the resource 'design or architecture choice and its rationale', making it specific and distinct from sibling tools like log_blocker or log_attempt.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as log_attempt or log_blocker. The description does not mention prerequisites or use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resolve_blockerResolve BlockerB
Mark a blocker as resolved.
| Name | Required | Description | Default |
|---|---|---|---|
| blocker_id | Yes | ID of the blocker entry | |
| resolution | Yes | What fixed it |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It does not disclose whether the action is reversible, what happens to associated data, or any side effects. The phrase 'Mark as resolved' implies a state change but gives no details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with a single sentence. While it lacks some detail, it is well-structured and front-loaded with the verb and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple (2 param) tool but no output schema and no behavioral transparency, the description is incomplete. It fails to explain what happens after resolution or how to verify the result.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters ('ID of the blocker entry' and 'What fixed it'). The tool description adds no additional meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Mark a blocker as resolved' clearly states the action and the resource (blocker). It distinguishes from sibling tools like log_blocker (create) and get_blockers (list).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as log_attempt or end_session. No when-not-to-use or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v1.0.3- First observed
end_session - First observed
get_blockers - First observed
get_handoff - First observed
get_history - First observed
log_attempt - First observed
log_blocker - First observed
log_decision - First observed
resolve_blocker
TDQS
Scored across 8 tools
Each tool serves a distinct purpose: session management, blocker tracking, history queries, and logging attempts/decisions/resolutions. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern: 'end_', 'get_', 'log_', 'resolve_'. Underscore separation is used throughout, ensuring predictability.
8 tools is well-scoped for a session and blocker management server, covering all core operations without being overwhelming or sparse.
The tool set covers most key operations (close session, list/resolve blockers, log decisions/attempts, query history), but lacks an explicit 'start session' tool, which is a minor gap.
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent memory for AI agents. Search, store, and recall across sessions.
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
External Brain for AI Agents - persistent versioned memory for creators
Related MCP Servers
- AlicenseAqualityBmaintenanceGive your AI the ability to read the web. Fetches URLs as clean markdown with 9 fallback strategies.27410MIT
- FlicenseNot gradedqualityNot gradedmaintenanceProvides cross-session memory for AI agents by maintaining a rolling 24-hour event stream and searchable daily archives to prevent context loss. It enables agents to record, query, and retrieve historical events and decisions through a structured markdown-based workspace.1-
- AlicenseNot gradedqualityAmaintenanceProvides persistent memory for AI coding agents across sessions by saving and loading session context like tasks, decisions, and blockers.286MIT
- AlicenseNot gradedqualityCmaintenancePersistent activity journal for AI agents - enables logging and querying decisions, changes, errors, and observations across sessions.131MIT