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.)
1

Get your API token

Sign up for a free account, then copy your API token from the dashboard.

2

Add config to your project

Select your agent below. The config file location and features differ by agent.

.mcp.json
{
  "mcpServers": {
    "agent-memo": {
      "command": "npx",
      "args": ["-y", "@agent-memo/mcp-client"],
      "env": {
        "AGENTMEMO_TOKEN": "your-token-here",
        "AGENTMEMO_PROJECT": "my-project"
      }
    }
  }
}
.claude/settings.local.json
{
  "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

VariableRequiredDescription
AGENTMEMO_TOKENYesYour API token from the dashboard
AGENTMEMO_PROJECTNoProject ID. Auto-detected from git remote URL or directory name if omitted
3

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 memory
  • memory_recall — Semantic search
  • memory_overview — Quick overview on conversation start
  • memory_expand — Expand details of a memory
  • memory_update — Update existing
  • memory_delete — Remove memory
  • memory_stats — Usage statistics

Knowledge Graph (5)

  • kg_add — Add entity relationship
  • kg_query — Query relationships
  • kg_invalidate — Invalidate facts
  • kg_timeline — View fact history
  • kg_stats — Graph statistics

Discovery (2)

  • memory_list_topics — Browse topics
  • memory_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