Configure MemoryGraph with Cursor AI code editor.

Prerequisites

  • Cursor installed (version with MCP support)
  • Python 3.10 or higher
  • MemoryGraph installed

Setup Steps

Step 1: Install MemoryGraph

pipx install memorygraphMCP

Step 2: Find memorygraph Path

which memorygraph
# Example: /Users/yourname/.local/bin/memorygraph

Step 3: Configure Cursor

Open Cursor Settings β†’ Features β†’ MCP Servers and add:

{
  "mcpServers": {
    "memorygraph": {
      "command": "/Users/yourname/.local/bin/memorygraph",
      "args": []
    }
  }
}

Step 4: Restart Cursor

Restart Cursor for the MCP configuration to take effect.

Important: Add Memory Directives

MemoryGraph won't automatically store memories. You need to add memory directives to tell Cursor when and what to remember.

Add to your .cursorrules

Create .cursorrules in your project root:

## Memory Protocol

### Before Starting Work
Use `recall_memories` before any task.

### Store Memories When:
- Fixing a bug β†’ problem + solution
- Making architecture decisions
- Discovering reusable patterns

Always include tags, importance (0-1), and relationships.

β†’ Full Memory Protocol Guide with complete directives.

Verify Setup

Ask Cursor's AI assistant to store a test memory:

"Store a memory that I set up MemoryGraph with Cursor"

Configuration File Location

Cursor's MCP config is typically at:

Platform Path
macOS ~/.cursor/mcp.json
Windows %USERPROFILE%\.cursor\mcp.json
Linux ~/.cursor/mcp.json

Troubleshooting

If MCP tools don't appear, check:

  • Cursor version supports MCP
  • Path to memorygraph is absolute and correct
  • memorygraph runs successfully: memorygraph --health

See the Troubleshooting Guide for more help.