mem-mcp
v1.9.2Memory for AI agents that survives reboots.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
store
Store a memory (free). First call returns a write_token and recovery_code — save both! All future operations require the write_token. Re-storing with the same key updates in place (upsert). Supports base:true for small (2KB) contextual memories.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
key * | string | Memory key (max 256 chars) |
value * | string | Memory value (max 10KB) |
base | boolean | Mark as base memory (max 2KB). Excluded from normal search unless includeBase=true. |
metadata | object | Optional metadata (max 2KB) |
sessionId | string | Optional session ID to scope memories |
writeToken | string | Write token from first store (omit on first call) |
search
Search memories semantically (free tier: 30/day, then $0.01 USDC). Returns matching memories with relevance scores. Supports 50+ languages, cross-lingual search. Use includeBase:true to include base memories.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
writeToken * | string | Write token (required) |
cursor | string | Pagination cursor from previous response |
includeBase | boolean | Include searchable base memories in results (default false) |
query | string | Search query (max 500 chars). Omit for session-only chronological listing. |
sessionId | string | Optional: scope to session. Omit query for chronological listing. |
topK | number | Max results (default 10, max 50) |
subscribe
Subscribe to a memory plan (x402). Starter: $2/500 credits. Pro: $9/mo unlimited. Enterprise: $20/mo unlimited+priority.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
plan * | string | Plan to subscribe to |
writeToken * | string | Write token (required) |
health
Check Memory01 service health (free). Returns service status, free tier info, plans.
stats
Get global memory statistics (free). Returns total agents, entries, searches.
sample
Get a free sample: store a demo memory and search it. Shows the shape of responses without paying.
bootstrap
Initialize conventional base memories (credentials-location, user-preferences, user-details, code-style) if missing. Idempotent. Free.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
writeToken * | string | Write token (required) |
keys | array | Optional list of base keys to create (defaults to all conventional) |
get
Retrieve a single memory by key (free). Useful for sensitive base memories like credentials-location.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
key * | string | Memory key to retrieve |
writeToken * | string | Write token (required) |
init
Initialize Memory01 for this agent in one call: creates a write_token (first store), saves token+recovery_code to standard files (~/.memory01_token, ~/.memory01_recovery, chmod 600), generates and registers an Ed25519 key (~/.memory01_key, chmod 600) so the token works from any IP, bootstraps conventional base memories, and stores a credentials-location pointer. Returns full guide. Call once per agent; idempotent-ish (if token exists, pass writeToken).
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier (required) |
key | string | Optional first memory key (default: 'init') |
value | string | Optional first memory value |
writeToken | string | Existing write token (omit on first run) |
register_key
Bind an Ed25519 key pair to this agent so its write_token works from any IP (no more IP-bound failures). Generates ~/.memory01_key (chmod 600) and registers the public key. Must be called once from the IP that owns the token. Free.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
writeToken | string | Existing write token (defaults to ~/.memory01_token) |
dream
Optional dreaming = ideate ONLY (not consolidate). Produces a NEW idea from your memories; does NOT reorganize memory. Saves in `dreams` slot `dream:<id>` (mem01-dream@1) with dream_date/context/origins/category; recall via search; forget dream:*; category e.g. bad-dream. LLM optional (local or free OpenRouter); default lightweight local then free model; no secrets.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
writeToken * | string | Write token |
context | string | Optional context to focus the dream |
dream | string | |
n | number | Max memories to consider (default 40, max 60) |
since | string | Optional ISO date; only use memories recorded after |
store_code
CODE-MEMORY (.mem01): store a code cell (linted embedded). Upsert by repo+path+symbol. Preserves original; `linted_code` if provided else `code`; `lint_status`. No secrets.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
code * | string | |
path * | string | |
writeToken * | string | |
deps | array | |
doc | string | |
git_sha | string | |
kind | string | fn|class|method|import|block |
language | string | |
lint_errors | array | |
lint_status | string | |
linted_code | string | |
repo | string | |
symbol | string | |
tests | array |
search_code
CODE-MEMORY semantic/hybrid code search. Returns .mem01 cells.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
query * | string | |
writeToken * | string | |
language | string | |
repo | string | |
topK | number |
get_symbol
CODE-MEMORY get one symbol cell.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
path * | string | |
symbol * | string | |
writeToken * | string | |
repo | string |
list_repo
CODE-MEMORY list repo-map (cells) for a repo.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
writeToken * | string | |
repo | string |
forget_code
CODE-MEMORY forget a code cell.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
path * | string | |
writeToken * | string | |
repo | string | |
symbol | string |
find_references
CODE-MEMORY find references to a symbol across repo.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
symbol * | string | |
writeToken * | string | |
repo | string |
similar_code
CODE-MEMORY find similar code cells (hybrid).
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
writeToken * | string | |
code | string | |
query | string | |
repo | string | |
topK | number |
repo_map
CODE-MEMORY repo-map tree (symbols per file).
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
writeToken * | string | |
repo | string |
rename_symbol
CODE-MEMORY rename a symbol (update cell + refs).
| Parameter | Type | Description |
|---|---|---|
agentId * | string | |
from * | string | |
path * | string | |
to * | string | |
writeToken * | string | |
repo | string |
guide
Get a concise guide on how to use Memory01: init flow, base memories, recovery, upsert, limits. Call this first if unsure. Full guide: https://memory.node01.org/agents.md
recover
Recover a write_token on a new IP using a recovery code (free). Use when your host's IP changed.
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Your agent identifier |
recoveryCode * | string | Recovery code (rc_...) issued at first store |
regenerate_recovery
Issue a new recovery code (invalidates the old one). Requires the original write_token from the original IP. Free.
| Parameter | Type | Description |
|---|---|---|
writeToken * | string | Write token from the original IP (required) |