SuperAPI AI Directory

recall

recall is an open-source tool that makes Claude Code's automatic memory shareable and usable by other AI agents. Claude Code stores project-related corrections, work preferences, project decisions, and other information as Markdown files with [[wiki-links]] in the ~/.claude/projects/<project>/memory/ directory, but previously only Claude Code itself could read them. recall locates that directory using the same rules as Claude Code, reads and writes these memory files, so that Codex, Cursor, Cline, Gemini CLI, or self-built agents can use the same memory via MCP or code calls. It has zero dependencies, uses no vectors or databases, and keeps memory as plain Markdown files.

Open website

About this tool

Purpose

recall solves the "silo" problem of Claude Code's automatic memory. Claude Code records user corrections, working-style preferences, project decisions, file locations, and other information on its own, saving them as Markdown files with [[wiki-links]]. After switching to another agent, these memories cannot be read. recall makes this memory portable: it finds the same directory according to Claude Code's rules (including the folder naming hash), reads every file Claude Code writes, and can also write files that Claude Code can read back.

Main capabilities

  • Provides memory read/write tools to clients such as Codex, Cursor, Cline, and Gemini CLI via MCP, including memory_list, memory_get, memory_recall, and others; memory_recall automatically expands related memories along [[wiki-links]] links.
  • Supports calling from code: the package exports the Recall class and claudeCodeMemoryDir(), and all methods are async. The Memory structure contains name, type, description, updated_at, frontmatter, body, and links.
  • Selects memory slices on demand: starting from the names specified in requires, it expands breadth-first along wiki links up to link_depth hops; when budget_tokens is exceeded (estimated as character count divided by 4), the deepest links are dropped first, and within the same depth they are dropped in the order ephemeral, fast, slow, permanent, with dropped names returned in dropped.
  • decay_class indicates how often a memory needs to be reconfirmed; dueForReview() returns memories that have not been updated within their window and does not delete them automatically.
  • Writes are atomic (temporary file plus rename), and a line is appended to the MEMORY.md index while preserving existing lines; when rewriting an existing memory, fields not owned by recall (such as originSessionId) are preserved.
  • Privacy protection: before memories leave the server, recognizable secrets are replaced with [redacted], including passwords in connection URLs, bearer tokens, private key blocks, as well as Anthropic, OpenAI, GitHub, Slack, AWS, Google, and Stripe keys and JWTs, and the number hidden is reported; files on disk are unchanged. --allow-secrets can disable this feature.

Usage

MCP quick start: use the 0.3.1 GitHub preview, which requires Node.js 18 or higher, and configure the launch command in your MCP client; for Claude Code project memory, use --claude-code "/path/to/your/repo" instead of --dir "/path/to/memory".

Client configurations:

  • Cursor: add a recall entry in the project's .cursor/mcp.json or ~/.cursor/mcp.json.
  • Cline: in the MCP Servers panel, select Configure and add the same entry as for Cursor to cline_mcp_settings.json.
  • Gemini CLI: run gemini extensions install https://github.com/fainir/recall。
  • Other MCP clients: run npx -y @fainir/recall as a stdio server with the same arguments.

recall-mcp options: --claude-code [repo] (default, uses the current directory), --dir <dir> (any memory directory; add --format claude-code to write in Claude Code format), --read-only, --allow-secrets; the corresponding environment variables are RECALL_DIR, RECALL_READ_ONLY=1, RECALL_ALLOW_SECRETS=1.

Memory directory rules

claudeCodeMemoryDir(repo) returns the directory according to Claude Code rules: the project is the git repository root, subfolders share one memory, worktrees use the main checkout's memory; in a non-git environment it is the folder itself. In the folder name, every character in the project path other than a-z, A-Z, 0-9 is replaced with -; paths longer than 200 characters are truncated and given the same hash suffix as Claude Code. CLAUDE_CONFIG_DIR can replace ~/.claude; CLAUDE_CODE_PROJECT_DIR_NAME can specify the folder name; the autoMemoryDirectory setting in the project's .claude/settings.local.json or ~/.claude/settings.json has the highest priority.

File format

Each memory is a <name>.md file containing frontmatter and a Markdown body. recall can read two formats: Claude Code format (format: 'claude-code'; older files use a flat type: instead of metadata: and can also be read) and recall's own format (format: 'recall', the default). Names are limited to a-z, 0-9, -, _, start with a letter or digit, and are at most 128 characters long. Links [[name]], [[name|label]], [[name#heading]] all point to name, are case-insensitive, - and _ match each other, and links inside code are ignored. The frontmatter is a small YAML subset. Non-memory files such as MEMORY.md, README.md, My Notes.md, and folders are skipped.

Use cases and limitations

Suitable for sharing the same project's Claude Code memory across multiple agents, or for letting self-built agents read these memories. Limitations include: providing memory to other agents means this content will be sent to that agent's model provider, so it is recommended to use --read-only and point only to projects you are willing to share; secret redaction is only a safety net for known formats, not a guarantee, and secrets should be avoided in memories; Claude Code reads MEMORY.md at the start of a session, so memories written by other agents only become visible in the next session, and only the first 200 lines (or 25 KB) of that index are loaded; writes are atomic but last-writer-wins, and there is no lock between recall and a running Claude Code session; automatic memory is local-only, and recall does not sync; token counts are estimates rather than tokenizer results.