recall
Click on "Deploy 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., "@recallrecall what we already know about running the tests in this project"
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.
recall
Your Claude Code memory, in every agent. recall reads and writes the memory Claude Code keeps for each project, so Codex, Cursor or an agent you build yourself can use the same memories, over MCP or from code. Zero dependencies, no vectors, no database: the memories stay plain Markdown files.
Claude Code now remembers things on its own: your corrections, how you like to work, project decisions, where things live. It saves them as Markdown files with [[wiki-links]] under ~/.claude/projects/<project>/memory/. That is a good format, but only Claude Code reads it. Switch to another agent and it starts from zero.
recall makes that memory portable. It finds the same directory Claude Code uses (same rules, down to its folder-naming hash), reads every file Claude Code writes, and writes files Claude Code reads back.
Quick start: share it over MCP
Point any MCP client at recall and the project's repository. --read-only lets the other agent read what Claude Code remembers without changing it; leave it off to let both write.
Codex
codex mcp add recall -- npx -y @fainir/recall --claude-code /path/to/your/repo --read-onlyCursor (.cursor/mcp.json in the project, or ~/.cursor/mcp.json)
{
"mcpServers": {
"recall": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@fainir/recall", "--claude-code", "/path/to/your/repo", "--read-only"]
}
}
}Gemini CLI: gemini extensions install https://github.com/fainir/recall (it serves the memory of the folder you start Gemini in).
Any other MCP client: run npx -y @fainir/recall with the same arguments as a stdio server. Needs Node.js 18+.
The agent then has these tools. Here is a real run against a repository with three memories Claude Code wrote:
> memory_list
3 memories in /Users/you/.claude/projects/-Users-you-code-acme-api/memory:
- feedback_testing (feedback) - run the integration suite before saying a change works
- reference_ci (reference) - where CI runs and how to rerun a flaky job
- user_role (user) - backend lead, prefers short answers with the command to run
> memory_recall {"requires": ["feedback_testing"]}
## feedback_testing (feedback) - run the integration suite before saying a change works
Run `npm run test:int` (needs the local Postgres from docker compose), not just `npm test`.
**Why:** the unit tests mock the database; two "done" changes broke prod queries.
**How to apply:** any change under src/db/ or src/queries/. CI details in [[reference_ci]].
## reference_ci (reference) - where CI runs and how to rerun a flaky job
CI is GitHub Actions, workflow `ci.yml`. Rerun a flaky job with `gh run rerun --failed`.
tokens_used: 180memory_recall followed the [[reference_ci]] link on its own. In testing, a Codex agent given only this server answered a question by calling memory_list and then memory_get.
Tool | What it does |
| Every memory with its type and one-line description. Optional |
| One memory in full. |
| The named memories plus the ones they |
| Memories old enough to re-confirm before relying on them. |
| Save or replace a memory in Claude Code's format, and add it to the |
| Delete a memory and its index line. Not offered with |
recall-mcp options: --claude-code [repo] (the default, using the current directory), --dir <dir> for any other memory directory (add --format claude-code to write Claude Code's file format there), and --read-only. RECALL_DIR and RECALL_READ_ONLY=1 work as environment variables.
Related MCP server: claude-memory
Use it from code
npm install @fainir/recallimport { Recall } from '@fainir/recall';
const memory = Recall.forClaudeCode('/Users/you/code/acme-api');
console.log(memory.dir);
for (const m of await memory.list()) console.log(m.name, '|', m.type, '|', m.description);
const slice = await memory.recall({ requires: ['feedback-testing'] });
console.log(slice.memories.map(m => m.name), slice.tokens_used);
// Save something Claude Code will see in its next session.
await memory.write({
name: 'project_freeze',
type: 'project',
description: 'merge freeze until the 3rd for the mobile release',
body: 'No merges to main until Nov 3. **Why:** mobile release cut.',
});Output (before the write):
/Users/you/.claude/projects/-Users-you-code-acme-api/memory
feedback_testing | feedback | run the integration suite before saying a change works
reference_ci | reference | where CI runs and how to rerun a flaky job
user_role | user | backend lead, prefers short answers with the command to run
[ 'feedback_testing', 'reference_ci' ] 180write() produces the file Claude Code itself writes:
---
name: project_freeze
description: merge freeze until the 3rd for the mobile release
metadata:
node_type: memory
type: project
modified: 2026-10-27T17:51:14.486Z
---
No merges to main until Nov 3. **Why:** mobile release cut.and adds a line to MEMORY.md, the index Claude Code loads at the start of every session, leaving the existing lines alone:
- [Testing](feedback_testing.md) - run the integration suite before saying a change works
- [CI](reference_ci.md) - where CI runs and how to rerun a flaky job
- [Role](user_role.md) - backend lead, prefers short answers
- [project_freeze](project_freeze.md) - merge freeze until the 3rd for the mobile releaseRewriting an existing memory keeps the fields recall does not own, such as Claude Code's originSessionId.
Where Claude Code keeps the memory
claudeCodeMemoryDir(repo) returns the directory, using Claude Code's rules:
The project is the git repository root, so subfolders share one memory, and a worktree uses the memory of its main checkout. Outside git, it is the folder itself.
The folder name is the project path with every character other than
a-z,A-Zand0-9turned into-. Paths longer than 200 characters are cut and given the same hash suffix Claude Code adds.CLAUDE_CONFIG_DIRreplaces~/.claude.CLAUDE_CODE_PROJECT_DIR_NAME(next toCLAUDE_CONFIG_DIR) names the folder. AnautoMemoryDirectorysetting in the project's.claude/settings.local.jsonor your~/.claude/settings.jsonwins over both.
This was checked against a real ~/.claude/projects folder: the rule reproduced 40 of 41 project folder names, including all three long, hashed ones (the other one belonged to a session that was moved after it started). recall listed and parsed all 194 memory files in it.
API
The package exports the Recall class and claudeCodeMemoryDir(). Every method is async.
Call | Arguments | Returns |
| path inside a project; default the current directory | a |
|
| a |
|
|
|
| a memory name; | a |
| optional |
|
|
|
|
|
|
|
| exact memory name |
|
| path inside a project | the directory path (it may not exist yet) |
A Memory is { name, type, description, updated_at, frontmatter, body, links }. type and updated_at come from the flat fields or from Claude Code's metadata: block, whichever the file has. links lists the memory names the body links to, deduplicated and in order.
write, get and delete throw on an unsafe name; write also throws on an invalid type or decay_class, a non-string body or description, or a reserved extra key. recall never throws on unknown names; it lists them in missing.
Memory file format
One file per memory, <name>.md, with frontmatter and a Markdown body. recall reads both shapes, whichever format you pick for writing.
Claude Code's format (format: 'claude-code'; older Claude Code files have a flat type: instead of metadata:, and recall reads those too):
---
name: feedback_testing
description: run the integration suite before saying a change works
metadata:
node_type: memory
type: feedback
modified: 2026-10-20T09:12:44.120Z
---
Run `npm run test:int` first. CI details in [[reference_ci]].recall's own format (format: 'recall', the default, which earlier versions wrote):
---
name: top-customers
type: project
description: paying customers above $10K ACV
decay_class: slow
updated_at: 2026-05-25
---
- Northwind - $48K ACV (see [[northwind-account]])Names:
a-z,0-9,-and_, starting with a letter or digit, up to 128 characters. That keeps file names safe on every OS.Links:
[[name]],[[name|label]]and[[name#heading]]all point atname. They are case-insensitive,-and_match each other, and links inside code are ignored.Frontmatter is a small YAML subset:
key: valuelines, quoted strings,# comments, and one level of nesting (Claude Code'smetadata:block).Other files (
MEMORY.md,README.md,My Notes.md, folders) are not memories and are skipped.
How recall() picks the slice
Every name in
requires. No embeddings, no fuzzy search.Every memory reachable through
[[wiki-links]]from those, breadth-first, up tolink_depthhops.If the total is over
budget_tokens(estimated as characters / 4), memories are dropped until it fits: the deepest links first, so the required memories go last; at the same depth,ephemeralfirst, thenfast,slow,permanent. Their names come back indropped, and the rest keep their walk order.
For an agent that knows what it needs, explicit keys beat similarity search: asking for "voice" should return the voice memory, not four memories that mention the word.
Decay
decay_class says how often a memory should be re-confirmed. dueForReview() returns the ones whose last update (Claude Code's modified, or recall's updated_at) is older than their window. Nothing is deleted automatically.
| Due for review after |
| 730 days |
| 90 days |
| 30 days |
| 7 days |
Limitations
Privacy: serving Claude Code's memory to another agent sends those memories to that agent's model provider. Use
--read-onlyand point it only at projects you are happy to share.Claude Code reads
MEMORY.mdat the start of a session, so a memory another agent writes shows up in Claude Code's next session, not the current one. Claude Code loads only the first 200 lines (or 25 KB) of that index.Writes are atomic (temp file + rename), but the last writer wins. There is no locking between recall and a running Claude Code session.
Auto memory is per machine. recall does not sync it anywhere.
The token count is an estimate (characters / 4), not a tokenizer.
Development
No dependencies, so there is nothing to install:
git clone https://github.com/fainir/recall.git
cd recall
npm test # node:test, no network
node examples/basic.js # the library on a plain recall directoryLicense
More open source by Nir Feinstein
agent-harness - make Claude Code or Codex act as a product team, a CEO or a portfolio manager
frugal - your agent finds the cheaper honest way before it pays for anything
flipback - an automatic
/goalfor every turn: sends Claude Code back when it stops earlymost-capable-agent-system-prompt - the copy-paste prompt for a self-improving agent system
This server cannot be deployed
Maintenance
Related MCP Connectors
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
- ContexelOAuthai.contexel
Shared AI memory. ChatGPT, Claude, Cursor and any MCP app read and write the same memory.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
- TaprootOAuthcom.taproothq
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
Related MCP Servers
- AlicenseAqualityDmaintenanceGives Claude Code, Claude Desktop, Cursor, VS Code Copilot, and other MCP-compatible tools persistent memory.1838 npm1MIT
- FlicenseNot gradedqualityCmaintenanceProvides memory and project tracking for Claude Code via MCP, enabling semantic search over past transcripts, durable notes, and structured project management with milestones, epics, tickets, and todos.-
- AlicenseNot gradedqualityAmaintenanceA local markdown memory and cross-agent context engine for AI coding assistants. It provides an MCP server with tools to search, add, retrieve, and distill persistent memory across tools like Claude Code, Cursor, and Zed.5MIT
- AlicenseNot gradedqualityAmaintenanceGives AI coding agents persistent, cross-session memory by storing task insights as interlinked markdown knowledge cards and recalling relevant ones before new work begins. Uses plain files and git sync instead of a vector database or embeddings, and exposes this through MCP tools for Claude Code, Cursor, VS Code Copilot, Codex, Windsurf, and other clients.10 npmISC