Skip to content
Palimem Docsspec v1.7.0

Use Palimem with Cursor

Connect Palimem to Cursor using the ai-memory connect cursor helper. The helper writes a valid MCP entry to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-level).


  • Cursor ≥ 0.40 (MCP support required)
  • Node.js 18+
  • Repository cloned and Node dependencies installed:
    Terminal window
    cd app && npm install

From your repository root:

Terminal window
node app/scripts/ai-memory.js connect cursor \
--project-root "$(pwd)" \
--data-dir .ai-memory/data

This writes the memory-service entry to ~/.cursor/mcp.json (global config). Cursor picks up the change on next restart.


The committed sample lives at examples/cursor/.cursor/mcp.json:

{
"mcpServers": {
"memory-service": {
"command": "node",
"args": ["/absolute/path/to/repo/app/scripts/memory-service-mcp.js"],
"env": {
"MEMORY_SERVICE_DATA_DIR": "/absolute/path/to/repo/.ai-memory/data"
}
}
}
}

Use absolute paths in args and MEMORY_SERVICE_DATA_DIR. The ai-memory connect cursor helper resolves these automatically.

Cursor also supports a per-project .cursor/mcp.json. Write both global and project config:

Terminal window
node app/scripts/ai-memory.js connect cursor \
--project-root "$(pwd)" \
--project-config .cursor/mcp.json \
--data-dir .ai-memory/data

  1. Restart Cursor (or use Command Palette → Reload MCP servers).
  2. Ask the agent to call tools/list, then memory_status with scope repository and your project namespace.

tools/list — expect 11 tools, including memory_query_temporal and memory_audit_export.

memory_status — expect ok: true, wal_high_water_seq, semantic_units_in_sync: true, and index_status.state: "current".


Paste this into your Cursor chat to configure Palimem:

Set up Palimem as governed local memory for this Cursor project.
- Project: Palimem (spec v1.7.0)
- Run: node app/scripts/ai-memory.js connect cursor --project-root "$(pwd)" --data-dir .ai-memory/data
- Verify: call tools/list (11 tools), then memory_status — expect ok and index_status current
Use local data directory .ai-memory/data. Do not enable cloud services.

Flag Purpose
--global-config PATH Override global mcp.json path (default: ~/.cursor/mcp.json)
--project-config PATH Also write project .cursor/mcp.json
--project-root PATH Repo root for resolving script paths (default: $PWD)
--data-dir PATH MEMORY_SERVICE_DATA_DIR resolved to absolute (default: .ai-memory/data)
--replace Overwrite existing memory-service entry
--dry-run Print merged JSON without writing

MCP server not listed in Cursor

Restart Cursor after writing the config. Cursor reads mcp.json only on startup, not dynamically.

ENOENT on memory-service-mcp.js

The Node wrapper is not installed. Run:

Terminal window
cd app && npm install

Existing entry refused

If a previous memory-service entry exists, re-run with --replace:

Terminal window
node app/scripts/ai-memory.js connect cursor \
--project-root "$(pwd)" --data-dir .ai-memory/data --replace

Tools show 9 instead of 11

Pull the latest main and reinstall. memory_query_temporal and memory_audit_export were added in spec v1.6.0 and are present in v1.7.0.


Pre-load memory from Markdown files:

Terminal window
python3 app/import_markdown.py \
--data-dir .ai-memory/data \
examples/markdown/USER.md.sample \
examples/markdown/MEMORY.md.sample