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
- CLI (Recommended)
- Manual MCP Config
Run Supported agent names:
After running the command, restart your agent (or run its MCP reload command) so it picks up the new server. In Claude Code, run
agentmemory connect [agent] to automatically write the correct MCP server config for your agent. The command merges the Agent Memory entry into your agent’s existing config without overwriting other servers.| Agent | Command |
|---|---|
| Claude Code | agentmemory connect claude-code |
| Cursor | agentmemory connect cursor |
| GitHub Copilot CLI | agentmemory connect copilot-cli |
| Codex CLI | agentmemory connect codex |
| Gemini CLI | agentmemory connect gemini-cli |
| Cline | agentmemory connect cline |
| OpenCode | agentmemory connect opencode |
| Zed | agentmemory connect zed |
| Warp | agentmemory connect warp |
| Continue.dev | agentmemory connect continue |
| OpenCode | agentmemory connect opencode |
| OpenClaw | agentmemory connect openclaw |
| Hermes | agentmemory connect hermes |
| pi | agentmemory connect pi |
| OpenHuman | agentmemory connect openhuman |
| Droid (Factory.ai) | agentmemory connect droid |
| Kiro | agentmemory connect kiro |
| Qwen Code | agentmemory connect qwen |
| Antigravity | agentmemory connect antigravity |
/mcp to reload without restarting.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:- 12 auto-capture hooks —
SessionStart,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
Cursor
~/.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
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
SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PreCompact, and Stop.
Gemini CLI
mcpServers block to ~/.gemini/settings.json. You can also add Agent Memory via the Gemini CLI command:
Other MCP agents
For any other agent that supports themcpServers JSON shape (Cline, Zed, Warp, Continue, Windsurf, Roo Code, Kilo Code, OpenCode, Goose, and more), use the manual config block:
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:Verify your connection
After connecting your agent and restarting it, run:memory_save, memory_smart_search, memory_sessions, and memory_profile.
For a quick end-to-end check using the REST API directly:
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.