recall-set-key

recall-set-key is a command for Claude Code from joseairosa/recall. It costs 0 tokens per session (1,168 once invoked), scanned C, original, MIT.

A command that updates a Recall service API key wherever Claude Code expects to find it. Recall is a service that provides persistent memory and search across coding sessions.

In plain words
What is it for?
Use it after creating a new Recall API key, so Claude Code hooks and its Recall connection use the new credential.
Why use it?
It avoids authentication problems caused by changing the key in one configuration file but missing another. The command checks the key format and updates all required locations.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; names the AskUserQuestion tool; mentions Claude Code.

Part of the claude-plugin plugin — 7 commands, 3 agents, 5 hooks shipped together

Good fit Use it after creating a new Recall API key, so Claude Code hooks and its Recall connection use the new credential.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/joseairosa/recall/recall-set-key
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/joseairosa/recall

Made for: Claude Code.

Or install claude-plugin, the plugin that ships this one along with the rest of its 7 commands, 3 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for recall-set-key

README.md
[![agentmods](https://agentmods.dev/badge/commands/joseairosa/recall/recall-set-key/github.svg)](https://agentmods.dev/commands/joseairosa/recall/recall-set-key)
Your own site
<a href="https://agentmods.dev/commands/joseairosa/recall/recall-set-key"><img src="https://agentmods.dev/badge/commands/joseairosa/recall/recall-set-key/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for recall-set-key

Your own site · 80×15
<a href="https://agentmods.dev/commands/joseairosa/recall/recall-set-key"><img src="https://agentmods.dev/badge/commands/joseairosa/recall/recall-set-key.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,168 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01168
Opus 5 $0.00000 $0.00584
Sonnet 5 $0.00000 $0.00234
Haiku 4.5 $0.00000 $0.00117

Measured 9d ago against content hash e5cf472a866a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

recall-set-key scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

**b) ~/.claude/settings.json env section** — used by the plugin .mcp.json `${RECALL_API_KEY}` reference:

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

**b) ~/.claude/settings.json env section** — used by the plugin .mcp.json `${RECALL_API_KEY}` reference:
claude-plugin/commands/recall-set-key.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Update your Recall API key across every location Claude Code reads it from. Run this whenever you generate a new key from https://recallmcp.com/dashboard/keys.

Instructions

1. Ask for the new key

Use AskUserQuestion to prompt for the new API key. It starts with sk-. Never echo the full key back to the user in plain text.

2. Validate the key format

If the key does not start with sk-, stop and tell the user it looks invalid and to double-check they copied the full key from the dashboard.

3. Update all locations

Run each block below in order. Every location must be updated — missing any one of them will cause silent auth failures on next restart.

a) ~/.claude/recall/config.json — read by lifecycle hooks (session-start, observe, session-end) via lib/config.sh:

python3 - <<'PYEOF'
import json, os, stat

path = os.path.expanduser("~/.claude/recall/config.json")
os.makedirs(os.path.dirname(path), exist_ok=True)
try:
    with open(path) as f:
        config = json.load(f)
except Exception:
    config = {}

config["api_key"] = "THE_API_KEY"
config.setdefault("server_url", "https://recallmcp.com")

with open(path, "w") as f:
    json.dump(config, f, indent=2)
os.chmod(path, stat.S_IRUSR | stat.S_IWUSR)
print("✓ ~/.claude/recall/config.json")
PYEOF

b) ~/.claude/settings.json env section — used by the plugin .mcp.json ${RECALL_API_KEY} reference:

python3 - <<'PYEOF'
import json, os

path = os.path.expanduser("~/.claude/settings.json")
try:
    with open(path) as f:
        settings = json.load(f)
except Exception:
    settings = {}

settings.setdefault("env", {})["RECALL_API_KEY"] = "THE_API_KEY"

with open(path, "w") as f:
    json.dump(settings, f, indent=2)
print("✓ ~/.claude/settings.json")
PYEOF

c) ~/.claude.json mcpServers entry — the authoritative runtime config; takes precedence over env vars once registered:

python3 - <<'PYEOF'
import json, os

path = os.path.expanduser("~/.claude.json")
try:
    with open(path) as f:
        config = json.load(f)
except Exception:
    config = {}

mcp = config.setdefault("mcpServers", {})
if "recall-remote" not in mcp:
    mcp["recall-remote"] = {
        "type": "http",
        "url": "https://recallmcp.com/mcp",
        "headers": {}
    }
mcp["recall-remote"].setdefault("headers", {})["Authorization"] = "Bearer THE_API_KEY"

with open(path, "w") as f:
    json.dump(config, f, indent=2)
print("✓ ~/.claude.json")
PYEOF

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 154 lines · 0 tokens per session scan C e5cf472a866a

Subscribe to this mod's changes

recall-set-key is a command published in the GitHub repository joseairosa/recall (176 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,168 tokens. A static security scan graded it C with 2 findings (reads agent configuration directories, reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.