Setup Guide
Add persistent cloud memory to your AI coding agent in 2 minutes. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible agent.
Prerequisites
- ✓A free API token from agent-memo.ai
- ✓Node.js 18+ (for npx)
- ✓An MCP-compatible agent (Claude Code, Cursor, Windsurf, etc.)
Get your API token
Sign up for a free account, then copy your API token from the dashboard.
Add config to your project
Select your agent below. The config file location and features differ by agent.
{ "mcpServers": { "agent-memo": { "command": "npx", "args": ["-y", "@agent-memo/mcp-client"], "env": { "AGENTMEMO_TOKEN": "your-token-here", "AGENTMEMO_PROJECT": "my-project" } } } }
{ "hooks": { "SessionStart": [{ "matcher": "startup", "hooks": [{ "type": "command", "command": "npx -y @agent-memo/mcp-client --hook recall", "timeout": 30 }] }], "Stop": [{ "matcher": "*", "hooks": [{ "type": "command", "command": "npx -y @agent-memo/mcp-client --hook save", "timeout": 30 }] }], "PreCompact": [{ "hooks": [{ "type": "command", "command": "npx -y @agent-memo/mcp-client --hook precompact", "timeout": 30 }] }] } }
Hooks auto-save context at key moments — this is what makes Claude Code + Agent-Memo fully automatic.
SessionStart: recalls memories when a new session begins.
Stop: periodically saves important context.
PreCompact: saves critical info before context window compression.
Environment variables
| Variable | Required | Description |
|---|---|---|
| AGENTMEMO_TOKEN | Yes | Your API token from the dashboard |
| AGENTMEMO_PROJECT | No | Project ID. Auto-detected from git remote URL or directory name if omitted |
Start coding
Launch your AI agent. It now has 14 memory tools available. Verify with:
memory_stats()
> Connected. 0 memories stored.
Available tools (14)
Memory (7)
memory_store— Save a memorymemory_recall— Semantic searchmemory_overview— Quick overview on conversation startmemory_expand— Expand details of a memorymemory_update— Update existingmemory_delete— Remove memorymemory_stats— Usage statistics
Knowledge Graph (5)
kg_add— Add entity relationshipkg_query— Query relationshipskg_invalidate— Invalidate factskg_timeline— View fact historykg_stats— Graph statistics
Discovery (2)
memory_list_topics— Browse topicsmemory_check_duplicate— Deduplicate before saving
Let your agent do it
Send the setup guide URL to your agent and it will configure everything automatically:
https://agent-memo.ai/setup.md