Skip to main content
Agent Memory supports 18 named agents plus any agent that speaks MCP or the REST API. You connect via the agentmemory connect CLI command (recommended — it writes the right config file for each agent automatically) or by manually adding the MCP server JSON block to your agent’s config. Before connecting any agent, make sure the Agent Memory server is running:
agentmemory
Agent Memory must be running before you start your agent. The MCP server is only reachable when agentmemory is active. If your agent starts before the server, it falls back to the 7-tool local set. Start the server first, then launch your agent.

Connect via CLI or manual config


Agent-by-agent setup

Claude Code

Claude Code supports two connection paths. The plugin path is recommended because it installs hooks, skills, and MCP in one step. Recommended: Plugin install (hooks + skills + MCP) Run these two commands inside a Claude Code session:
/plugin marketplace add rohitg00/agentmemory
/plugin install agentmemory
This registers:
  • 12 auto-capture hooksSessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, PreCompact, SubagentStart, SubagentStop, Stop, SessionEnd, Notification, TaskCompleted
  • 15 skills — 8 invocable (/recall, /remember, /session-history, /forget, /recap, /handoff, /commit-context, /commit-history) + 7 reference skills
  • 53 MCP tools — automatically wired via the plugin’s bundled .mcp.json
Alternative: CLI connect
agentmemory connect claude-code
To also install hook scripts (useful if you wire MCP outside of the plugin):
agentmemory connect claude-code --with-hooks
Use the /plugin install path when possible. If you wire Agent Memory through ~/.claude.json directly, hook scripts reference version-specific paths that break on upgrade. The plugin path handles this automatically.

Cursor

agentmemory connect cursor
This merges the MCP block into ~/.cursor/mcp.json. Restart Cursor after running the command to load the new server. You can also paste the MCP JSON block manually via Cursor Settings → MCP. After connecting, Cursor will list Agent Memory tools in its tool picker. You can invoke memory_smart_search, memory_save, and the full tool set directly from your Cursor agent sessions.

GitHub Copilot CLI

agentmemory connect copilot-cli
This merges mcpServers.agentmemory into ~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json if COPILOT_HOME is set) and preserves all existing servers. Copilot picks up the new server on the next launch or after running /mcp. For the full plugin experience with hooks and skills, install the plugin separately:
copilot plugin install rohitg00/agentmemory:plugin
The agentmemory connect copilot-cli command is Windows-safe even if other connect commands require manual Windows setup.

Codex CLI

agentmemory connect codex
For the full plugin experience (MCP + 6 lifecycle hooks + 15 skills):
codex plugin marketplace add rohitg00/agentmemory
codex plugin add agentmemory@agentmemory
The Codex plugin registers hooks for SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, and Stop.
Codex Desktop users: Plugin hooks are currently silent in the Desktop build due to an upstream issue. Run the following command to mirror hook scripts into the global hooks config as a workaround:
agentmemory connect codex --with-hooks
MCP tools still work in all Codex variants — only lifecycle observation hooks are affected.

Gemini CLI

agentmemory connect gemini-cli
This writes the standard mcpServers block to ~/.gemini/settings.json. You can also add Agent Memory via the Gemini CLI command:
gemini mcp add agentmemory npx -y @agentmemory/mcp --scope user
After connecting, Gemini CLI picks up all 53 Agent Memory tools in your next session.

Other MCP agents

For any other agent that supports the mcpServers JSON shape (Cline, Zed, Warp, Continue, Windsurf, Roo Code, Kilo Code, OpenCode, Goose, and more), use the manual config block:
{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": ["-y", "@agentmemory/mcp"],
      "env": {
        "AGENTMEMORY_URL": "http://localhost:3111",
        "AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET}"
      }
    }
  }
}
Merge the Agent Memory entry into your agent’s existing mcpServers object. Do not replace the entire config file — add agentmemory as another key alongside your existing servers. Quick-connect commands for popular agents:
agentmemory connect cline        # ~/.cline/mcp.json
agentmemory connect opencode     # ~/.config/opencode/opencode.json (uses top-level mcp key)
agentmemory connect zed          # ~/.config/zed/settings.json (uses context_servers key)
agentmemory connect warp         # ~/.warp/.mcp.json
agentmemory connect continue     # ~/.continue/config.yaml or config.json
agentmemory connect kiro         # ~/.kiro/settings/mcp.json
agentmemory connect droid        # ~/.factory/mcp.json
agentmemory connect qwen         # ~/.qwen/settings.json
agentmemory connect antigravity  # ~/Library/Application Support/Antigravity/User/mcp_config.json (macOS)

Installing native skills (50+ agents)

After connecting via MCP, install the native skills so your agent knows when to use the memory tools — not just that they exist:
npx skills add rohitg00/agentmemory -y
This auto-detects your agent and installs 15 skills (8 invocable action skills + 7 reference skills). To target a specific agent:
npx skills add rohitg00/agentmemory -y -a warp
npx skills add rohitg00/agentmemory -y -a '*'   # install to every detected agent

Verify your connection

After connecting your agent and restarting it, run:
agentmemory status
You should see your agent listed under Connected agents with a ✓ next to it. You can also check directly from your agent — ask it to list available MCP tools. With the server running, you should see the full set of 53 tools including memory_save, memory_smart_search, memory_sessions, and memory_profile. For a quick end-to-end check using the REST API directly:
# Save a test memory
curl -X POST http://localhost:3111/agentmemory/remember \
  -H "Content-Type: application/json" \
  -d '{"content": "connection verification probe", "concepts": ["test"]}'

# Search for it
curl -X POST http://localhost:3111/agentmemory/smart-search \
  -H "Content-Type: application/json" \
  -d '{"query": "connection verification", "limit": 5}'
The search should return the memory you just saved. If it does, Agent Memory is wired correctly and ready to use.
If your agent shows only 7 tools instead of 53, the MCP shim could not reach the Agent Memory server at http://localhost:3111. Make sure agentmemory is running in a separate terminal, then reload MCP in your agent (/mcp in Claude Code, or restart the agent entirely). Run agentmemory doctor for a full diagnostic.