Cursor Integration
Give Cursor a memory that lasts across chats. The installer wires Cursor hooks (small scripts Cursor runs when a session starts, a file is read, or a tool runs), starts the local worker (the program that stores notes), and uses CMEM Pro (the hosted memory service) unless you pick another provider.One command
npx claude-mem install — do not clone the repo to install.CMEM Pro default
Memory notes are written off-plan through the hosted service unless you pick Gemini, OpenRouter, or your Anthropic plan.
Cursor hooks
Cursor has hooks. Grok Bot does not — that host is a different guide.
Memory viewer
Open the worker URL printed at install to browse saved notes.
Install
--provider claude, which skips cmem.ai). Details: Installation.
Do not clone this repository to install. Clone is for people changing the code.
How it works
- Hooks record what the agent does in Cursor.
- Worker stores those notes on your machine (default
127.0.0.1, port in~/.claude-mem/.worker.port). - Next chat gets relevant past notes.
- Viewer at the worker URL shows the knowledge base.
Gemini or OpenRouter instead of CMEM Pro
- Gemini — your Google key, memory off-plan
- OpenRouter — your OpenRouter key. Never send a personal
sk-or-key tohttps://cmem.ai/api/inference
Verify it worked
- Restart Cursor after install so hooks load.
- Health:
curl -s "http://127.0.0.1:${CLAUDE_MEM_WORKER_PORT}/api/health"(or the port in~/.claude-mem/.worker.port). - Do a small unit of work, then open the worker URL. New notes should appear.
Troubleshooting
Nothing is being stored
- Confirm the worker is up. Do not restart it if it is already healthy.
- Confirm you used
npx claude-mem install, not a globalnpm install. - Restart Cursor once after install.
- Logs:
~/.claude-mem/logs/worker-YYYY-MM-DD.log
Hooks not firing
Restart Cursor. Hooks live under.cursor/ in the project or your user Cursor config after install.
Next steps
- Installation — installer stages and CMEM Pro
- CMEM Pro (manual / headless) — settings the installer writes
- Gemini / OpenRouter
- Search Tools — query project history

