agent-recall — Claude Code MCP server: agent memory that keeps
Saves the fixes you tell your agent and checks later whether it stopped repeating the mistake. Records stay on your disk.
claude mcp add agent-recall -- npx -y agent-recall-mcpWhat agent-recall does
AgentRecall treats a correction as a record, not a chat line. Each one gets a severity, a condition for when it applies, and a way to retract it. The files are plain markdown under ~/.agent-recall/ and survive both restarts and project switches.
Five memory layers back a small set of tools. The agent calls session_start before doing anything so the rules load first, calls remember with type correction when you push back, and runs check before a risky step such as a deploy or delete. A blocked verdict means stop. Skip the tool call and nothing is stored: saying “noted” in the chat writes no rule.
The other half is bookkeeping. Every correction carries a retrieved_count, and each new encounter with the same situation is logged as heeded or recurred. That gives you a number for whether the agent actually changed behaviour, not just an apology. Credentials and tokens do not belong in these files.
What it helps with
- keep a correction alive into the next session
- see whether a fixed mistake comes back
- collect project rules in one local markdown file
- stop a risky action before deploy
- recall earlier context on a project
Example prompts for the agent
- Run
session_startformy-appand list the critical corrections. - I'm correcting you: don't bump the version without asking. Save that with
remember, typecorrection. - Before I push, call
checkwith the action description and show me the verdict.
How to install agent-recall
Platform CLI
claude mcp add agent-recall -- npx -y agent-recall-mcpPlatform CLI
codex mcp add mcp-server -- npx -y agent-recall-mcpConfig file
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"agent-recall-mcp"
]
}
}
}Config file
{
"servers": {
"mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agent-recall-mcp"
]
}
}
}Platform CLI
gemini mcp add mcp-server npx -y agent-recall-mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agent-recall
How to install agent-recall in Claude Code?
One command: claude mcp add agent-recall -- npx -y agent-recall-mcp.
What does agent-recall do?
It turns your feedback to the agent into persistent rules that load at the start of the next session, then logs whether the rule was followed.
Where is the memory stored?
In local markdown files in ~/.agent-recall/ on your machine.