semantic-memory-mcp: Command for Claude Code

.claude/commands/memory.md

memory is a command for Claude Code from a2z2k26/semantic-memory-mcp. It costs 9 tokens per session (900 once invoked), scanned A, original, MIT.

A command interface for storing, retrieving, searching, and coordinating information in a shared semantic memory system. Semantic search finds related meaning, not just exact words.

In plain words
What is it for?
Use it to save or find memories, inspect memory health and statistics, coordinate team status, create handoffs, and record decisions.
Why use it?
It lets agents and teams retain useful decisions, context, and handoffs across work sessions instead of relying only on the current conversation.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

This is a2z2k26/semantic-memory-mcp's own configuration. It tells Claude Code how to work on semantic-memory-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything semantic-memory-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to a2z2k26/semantic-memory-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/a2z2k26/semantic-memory-mcp/main/.claude/commands/memory.md
Clone the repo
git clone --depth 1 https://github.com/a2z2k26/semantic-memory-mcp

Made for: Claude Code.

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 memory

README.md
[![agentmods](https://agentmods.dev/badge/commands/a2z2k26/semantic-memory-mcp/memory/github.svg)](https://agentmods.dev/commands/a2z2k26/semantic-memory-mcp/memory)
Your own site
<a href="https://agentmods.dev/commands/a2z2k26/semantic-memory-mcp/memory"><img src="https://agentmods.dev/badge/commands/a2z2k26/semantic-memory-mcp/memory/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 memory

Your own site · 80×15
<a href="https://agentmods.dev/commands/a2z2k26/semantic-memory-mcp/memory"><img src="https://agentmods.dev/badge/commands/a2z2k26/semantic-memory-mcp/memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00009 $0.00900
Opus 5.5 $0.00004 $0.00360
Sonnet 5.5 $0.00002 $0.00180
Haiku 4.5 $0.00001 $0.00090

Measured 2mo ago against content hash c17a048b08f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory scanned grade A with 0 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 2mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/memory.md · 99 lines

How it starts

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

Semantic Memory Command

Execute memory operations against the shared Semantic Memory MCP server.

Available Actions

Core Memory Operations

  • store - Store a memory entry: /memory store mykey '{"data": "value"}'
  • retrieve - Get a memory by key: /memory retrieve mykey
  • search - Search memories: /memory search "search query"
  • list - List recent memories: /memory list
  • stats - Get storage statistics: /memory stats
  • health - Check system health: /memory health

Team Coordination

  • team - Show team status and context: /memory team
  • handoff - Create work handoff for another agent: /memory handoff task-name
  • decide - Record a decision with rationale: /memory decide "Use SQLite" "Better concurrency"

Sandbox Integration

  • sync - Check Memory Bridge status for E2B sandboxes: /memory sync
  • sandboxes - List sandbox memories: /memory sandboxes

Usage Examples

/memory store user:preferences '{"theme": "dark", "lang": "en"}'
/memory retrieve user:preferences
/memory search "API configuration"
/memory list
/memory stats
/memory health
/memory team
/memory handoff feature-implementation
/memory decide "Use FTS5 for search" "Best balance of simplicity and performance"
/memory sync
/memory sandboxes

When to Use Memory

  1. Store important findings - When you discover something that future agents or sessions should know
  2. Record decisions - Document architectural decisions, design choices, rationale
  3. Share context - Pass information between different Claude sessions/worktrees
  4. Track artifacts - Store code snippets, configurations, outputs for reference
  5. Create handoffs - When passing incomplete work to another agent
  6. Check sandbox results - Access work from E2B sandbox agents

Action: $ARGUMENTS.action

Key: $ARGUMENTS.key Value: $ARGUMENTS.value Query: $ARGUMENTS.query Decision: $ARGUMENTS.decision Rationale: $ARGUMENTS.rationale

Based on the action requested, use the appropriate MCP tool:

  • For store: Use memory_store with the key and parsed JSON value
  • For retrieve: Use memory_retrieve with the key
  • For search: Use memory_search with the query
  • For list: Use memory_list
  • For stats: Use memory_stats
  • For health: Use system_health
  • For team: Use team_get_status
  • For handoff: Use team_store_context with key handoff:{key} containing:
    • status: 'in_progress'
    • handoffAt: current timestamp
    • description: Ask user what to include
    • completed: List of completed items
    • remaining: List of remaining items
    • notes: Any relevant context
  • For decide: Use team_record_decision with:
    • decision: The decision text
    • rationale: The rationale provided
    • agentId: Current agent identifier
  • For sync: Check Memory Bridge server at http://127.0.0.1:3847/status Report whether bridge is running and show active sandboxes
  • For sandboxes: Use memory_search with query "sandbox:*" List all memories from E2B sandboxes

Read the full file on GitHub · 99 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. 2mo ago First seen · 99 lines · 9 tokens per session scan A c17a048b08f9

Subscribe to this mod's changes

memory is a command published in the GitHub repository a2z2k26/semantic-memory-mcp (2 stars, last pushed 29d ago), licensed MIT. It adds 9 tokens to every session and 900 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

memory compared with commands from other repositories

memory next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
memorya2z2k26/semantic-memory-mcpCommand229d agoMITA9Claude Code
memory-recallverygoodplugins/mcp-automemCommand66yesterdayMITA9Claude Code
memory-storeverygoodplugins/mcp-automemCommand66yesterdayMITA10Claude Code
compresssliamh11/DeusCommand512d agoMITA0Claude Code
checkpointsliamh11/DeusCommand512d agoMITA0Claude Code
lavra-checkpointroberto-mello/lavraCommand5315d agoMITA18Claude Code
perf-difficult-conversationfrankxai/Starlight-Intelligence-SystemCommand10yesterdayMITA93Claude Code