Cursor Integration
Your AI stops forgetting. Give Cursor persistent memory.Every Cursor session starts fresh - your AI doesn’t remember what it worked on yesterday. Claude-mem changes that. Your agent builds cumulative knowledge about your codebase, decisions, and patterns over time.
Free to Start
Works with Gemini’s free tier (1500 req/day) - no subscription required
Automatic Capture
MCP tools, shell commands, and file edits logged without effort
Smart Context
Relevant history injected into every chat session
Works Everywhere
With or without Claude Code subscription
No Claude Code subscription required. Use Gemini (free tier) or OpenRouter as your AI provider.
How It Works
Claude-mem integrates with Cursor through native hooks:- Session hooks capture tool usage, file edits, and shell commands
- AI extraction compresses observations into semantic summaries
- Context injection loads relevant history into each new session
- Memory viewer at the worker URL shows your knowledge base
Installation Paths
Choose the installation method that fits your setup:Path A: Cursor-Only Users (No Claude Code)
If you’re using Cursor without a Claude Code subscription:- Detect you don’t have Claude Code
- Help you choose and configure a free AI provider (Gemini recommended)
- Install hooks automatically
- Start the worker service
- Gemini Setup - Recommended free option (1500 req/day)
- OpenRouter Setup - 100+ models including free options
Path B: Claude Code Users
If you have Claude Code installed:Prerequisites
macOS
macOS
- Bun:
curl -fsSL https://bun.sh/install | bash - Cursor IDE
- jq and curl:
brew install jq curl
Linux
Linux
- Bun:
curl -fsSL https://bun.sh/install | bash - Cursor IDE
- jq and curl:
apt install jq curlordnf install jq curl
Windows
Windows
- Bun:
powershell -c "irm bun.sh/install.ps1 | iex" - Cursor IDE
- PowerShell 5.1+ (included in Windows 10/11)
- Git for Windows
Quick Commands Reference
After installation, these commands are available from the claude-mem directory:Verifying Installation
After setup, verify everything is working:-
Check worker status:
-
Check hook installation:
- Open the memory viewer: Open the worker URL in your browser
- Restart Cursor and start a coding session - you should see context being captured
Provider Comparison
Troubleshooting
Worker not starting
Hooks not firing
- Restart Cursor IDE after installation
- Check hooks are installed:
bun run cursor:status - Verify hooks.json exists in
.cursor/directory
No context appearing
- Ensure worker is running:
bun run worker:status - Check that you have observations by opening the worker URL
- Verify your API key is configured correctly
Next Steps
- Gemini Setup Guide - Detailed free tier setup
- OpenRouter Setup Guide - Configure OpenRouter
- Configuration Reference - All settings options
- Troubleshooting - Common issues and solutions

