pace-mem
Persistent memory for Claude Code and Cursor. pace-mem gives new sessions an index of recent work, and the coding agent stores durable observations (decisions, bug fixes, discoveries, changes) itself through MCP tools (save_memory, save_summary). There is no separate compression model to configure.
- Agent-written: the session agent calls
save_memory when it learns something worth keeping. Hooks only track the session and inject context.
- Cheap to recall: new sessions get a compact index; details are fetched on demand through MCP (
search → timeline → get_observations).
- Local: one SQLite file (
~/.pace-mem/pace-mem.db) with FTS5 search. Only Node is required (≥ 22.13, built-in node:sqlite); no Bun, Python or native modules.
- Private by default:
<private>…</private> content is never stored, and common secrets (API keys, tokens, private keys, connection strings) are replaced with <redacted/> before anything is written.
Install
# from a clone of this repo (or use the GitHub URL once it's pushed)
claude plugin marketplace add D:/product/mem
claude plugin install pace-mem@pace-mem
Restart Claude Code. The worker starts automatically on the first session; open the dashboard at http://127.0.0.1:37800.
Cursor
npm install && npm run build # only when working from source
node plugin/scripts/cli.mjs cursor install # all projects (~/.cursor)
node plugin/scripts/cli.mjs cursor install --project path/to/repo # one project
Or use Integrations → Install in Cursor in the dashboard. The installer copies the scripts to ~/.pace-mem/runtime, merges five hooks (sessionStart, beforeSubmitPrompt, postToolUse, stop, sessionEnd) into Cursor's hooks.json and the MCP server into mcp.json, keeps other tools' entries, and saves the previous files as *.pace-mem.bak. Reload Cursor afterwards. cursor uninstall removes only pace-mem's entries.
Cursor and Claude Code share one database, so memories recorded in one editor show up in the other for the same project folder.
Dashboard
http://127.0.0.1:37800 (or your configured port):
- Memories: live feed, search, filter by project and type, delete individual memories.
- Settings: session-context size with a live preview of what new sessions see, secret redaction, ignored tools, payload size, port. Saved changes apply to the running worker immediately (the port needs a restart).
- Integrations: Claude Code plugin status; install, update or remove Cursor.
- Status: counts, per-project stats, delete a project's memory (type the name to confirm), file locations.
The dashboard talks to the worker on localhost only; the worker rejects non-local Host headers and non-JSON writes.
If you also run claude-mem, disable one of them. Running both injects two context blocks.
How it works
Claude Code ──hooks──▶ hook.mjs ──HTTP (2s, fire-and-forget)──▶ worker (127.0.0.1:37800)
│
SessionStart → GET /api/context ◀── index injected │ SQLite + FTS5
UserPromptSubmit → POST /api/sessions/prompt │
SessionEnd → POST /api/sessions/end │
│
Claude ──MCP (stdio)──▶ mcp.mjs ──HTTP──▶ /api/search, /api/timeline, /api/observations/batch
POST ──▶ /api/memory/save, /api/memory/summary
Browser ──────────────────────────────▶ / (viewer, live via SSE)
- Recall. SessionStart injects the latest summaries plus an index of recent observations for the project (the folder name of the working directory). The agent pulls full details through
search → timeline → get_observations only when needed.
- Write. The agent persists durable knowledge with
save_memory and, after a substantial request, save_summary. There is no background model that compresses tool calls into memories.
Configuration
Use the dashboard's Settings tab, or edit ~/.pace-mem/settings.json (all keys optional):
| Key | Default | Meaning |
|---|
port | 37800 | Worker port (localhost only). |
contextObservations | 40 | Observations listed at session start. |
contextSummaries | 3 | Summaries included at session start. |
redactSecrets | true | Regex-based secret redaction before storage. |
skipTools | see src/shared/config.ts | Tool names never recorded by hooks. |
maxPayloadBytes | 16000 | Per-field cap on stored memory text. |
Environment overrides: PACE_MEM_PORT, PACE_MEM_DATA_DIR. Restart the worker after changing settings (pace-mem stop; the next session starts it again).
CLI