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:
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:
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
To also install hook scripts (useful if you wire MCP outside of the plugin):
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

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

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:
The agentmemory connect copilot-cli command is Windows-safe even if other connect commands require manual Windows setup.

Codex CLI

For the full plugin experience (MCP + 6 lifecycle hooks + 15 skills):
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:
MCP tools still work in all Codex variants — only lifecycle observation hooks are affected.

Gemini CLI

This writes the standard mcpServers block to ~/.gemini/settings.json. You can also add Agent Memory via the Gemini CLI command:
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:
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:

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:
This auto-detects your agent and installs 15 skills (8 invocable action skills + 7 reference skills). To target a specific agent:

Verify your connection

After connecting your agent and restarting it, run:
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:
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.