Skip to main content
Cursor supports MCP servers natively. Agent Memory connects as an MCP server that Cursor’s AI automatically calls when it needs context about your project. Once connected, Cursor Agent can search past decisions, recall what files do, and pick up where you left off — across every session.
Make sure agentmemory is running before opening Cursor. Start it with agentmemory or npx @agentmemory/agentmemory in a terminal.

Quick Connect

The fastest way to connect is with the CLI. It writes the MCP server config to ~/.cursor/mcp.json automatically:
agentmemory connect cursor
That is it. Restart Cursor and the Agent will have access to Agent Memory’s MCP tools.

Manual Setup

If you prefer to configure it yourself, add the following block to Cursor’s MCP settings. You can reach it via Settings → MCP or by editing ~/.cursor/mcp.json directly:
{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": ["-y", "@agentmemory/mcp"],
      "env": {
        "AGENTMEMORY_URL": "${AGENTMEMORY_URL:-http://localhost:3111}",
        "AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET:-}",
        "AGENTMEMORY_TOOLS": "${AGENTMEMORY_TOOLS:-all}"
      }
    }
  }
}
Save the file and reload Cursor’s MCP servers. The @agentmemory/mcp shim connects to the Agent Memory server at localhost:3111 and proxies all 53 tools into Cursor.
If you see only 8 tools listed in Cursor’s MCP panel, the shim cannot reach the server — it has fallen back to the standalone core set. Make sure agentmemory is running and AGENTMEMORY_URL points at it correctly.

What Cursor Agent Can Do

With Agent Memory connected, Cursor’s AI has access to the following tools:

memory_recall

Search all past observations from previous sessions. Cursor uses this to surface relevant context at the start of a conversation.

memory_save

Explicitly save an insight, architectural decision, or pattern. Ask Cursor to remember something and it will call this tool.

memory_smart_search

Hybrid semantic and keyword search using BM25 + embeddings with RRF fusion. Returns the most contextually relevant results for complex queries.

memory_file_history

Retrieve everything Agent Memory has recorded about a specific file — past edits, decisions, and observations from earlier sessions.

memory_patterns

Surface recurring patterns across your sessions — frequently touched files, repeated bug categories, common workflows.

memory_sessions

List recent sessions with summaries so Cursor can orient itself to recent work.

Install Native Skills (optional)

To make Cursor more proactively use memory tools, install Agent Memory’s skills:
npx skills add rohitg00/agentmemory -y
This installs 15 skills that teach Cursor when to recall, save, and reference memory — automatically detected for the Cursor environment.

Verification

1

Open Cursor Agent mode

Switch to Agent mode in Cursor (the mode that can call tools).
2

Ask Cursor to recall project context

Type a prompt like:
Use memory_recall to check what you know about this project.
Cursor Agent will call the tool and return what Agent Memory has stored from previous sessions.
3

Confirm from the terminal

In your terminal, run:
agentmemory status
This shows the number of stored memories and active sessions. The real-time viewer at http://localhost:3113 shows memories as they are created.

Remote or Authenticated Deployments

If you run the Agent Memory server on a remote host or behind authentication, update the MCP config to pass your credentials:
{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": ["-y", "@agentmemory/mcp"],
      "env": {
        "AGENTMEMORY_URL": "https://your-server:3111",
        "AGENTMEMORY_SECRET": "your-secret-here"
      }
    }
  }
}
All agents that share the same AGENTMEMORY_URL access the same memory store, so Cursor and Claude Code can both read and write the same memories.