agentmemory

Gives coding agents a persistent memory they can save to, search and share across sessions

By Rohit Ghumare (individual) JavaScript Local · stdio Knowledge and memoryDeveloper tools

78 popularity score ★ 30k ↓ 19k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add agentmemory -- npx -y @agentmemory/mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": [
        "-y",
        "@agentmemory/mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": [
        "-y",
        "@agentmemory/mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "agentmemory": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@agentmemory/mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.agentmemory]
command = "npx"
args = ["-y", "@agentmemory/mcp"]
Gemini CLITerminal
gemini mcp add --scope user agentmemory npx -- -y @agentmemory/mcp

Settings 2

AGENTMEMORY_URL Optional: Address of a running agentmemory server (e.g. http://localhost:3111); without it the shim exposes only 7 local tools.
AGENTMEMORY_FORCE_PROXY Optional: Set to 1 for sandboxed clients that cannot reach the host's localhost, together with a reachable AGENTMEMORY_URL.

What it does

agentmemory is a memory server for coding agents such as Claude Code, Cursor, Codex CLI, Gemini CLI, OpenCode and any other MCP client. It records observations from agent sessions and lets the assistant save insights, decisions and patterns, then recall them later with keyword (BM25), semantic and graph search. Every connected agent shares the same memory store.

Beyond recall it keeps a timeline of sessions, project profiles, a relationship graph, links between sessions and git commits, an audit trail, snapshots, and tools for multi-agent work: action items with dependencies, leases, signals between agents and peer-to-peer sync between instances. The full server exposes 54 tools, 6 resources and 3 prompts.

The npm package @agentmemory/mcp is a thin shim over @agentmemory/agentmemory. It gives the full tool set only when it can reach a running agentmemory server through AGENTMEMORY_URL (by default http://localhost:3111); with no server reachable it falls back to a local set of 7 tools. Starting the full server needs Node.js 20 or newer and runs a pinned iii-engine. It works with no API key (keyword search only); local embeddings, or an LLM or embedding provider key such as Anthropic, OpenAI, Gemini or Voyage, add semantic search and compression.

What it needs

RuntimeNode.js

Tools 35

memory_recall
Search past observations
memory_save
Save an insight, decision, or pattern
memory_smart_search
Hybrid semantic + keyword search
memory_sessions
List recent sessions
memory_compress_file
Compress markdown files while preserving structure
memory_file_history
Past observations about specific files
memory_patterns
Detect recurring patterns
memory_vision_search
Search image observations
memory_timeline
Chronological observations
memory_profile
Project profile (concepts, files, patterns)
memory_export
Export all memory data
memory_relations
Query relationship graph
memory_commit_lookup
Sessions behind a git commit
memory_commits
Commits recorded for a session
memory_graph_query
Knowledge graph traversal
memory_consolidate
Run 4-tier consolidation
memory_claude_bridge_sync
Read MEMORY.md or create a project export, preserving existing files
memory_team_share
Share with team members
memory_team_feed
Recent shared items
memory_audit
Audit trail of operations
memory_governance_delete
Delete with audit trail
memory_snapshot_create
Git-versioned snapshot
memory_action_create
Create work items with dependencies
memory_action_update
Update action status
memory_frontier
Unblocked actions ranked by priority
memory_next
Single most important next action
memory_lease
Exclusive action leases (multi-agent)
memory_signal_send
Inter-agent messaging
memory_signal_read
Read messages with receipts
memory_mesh_sync
P2P sync between instances
memory_diagnose
Health checks
memory_heal
Auto-fix stuck state
memory_facet_tag
Dimension:value tags
memory_facet_query
Query by facet tags
memory_verify
Trace provenance

Similar servers