Cursor + Gemini Setup
This guide walks you through setting up Claude-Mem in Cursor using Google’s Gemini API. Gemini offers a generous free tier that handles typical individual usage.Free Tier: 1,500 requests per day with
gemini-2.5-flash-lite. No credit card required.Step 1: Get a Gemini API Key
- Go to Google AI Studio
- Sign in with your Google account
- Accept the Terms of Service
- Click Create API key
- Choose or create a Google Cloud project
- Copy your API key - you’ll need it in Step 3
Step 2: Clone and Build Claude-Mem
Step 3: Configure Gemini Provider
Option A: Interactive Setup (Recommended)
Run the setup wizard which guides you through everything:- Detect you don’t have Claude Code
- Ask you to choose Gemini as your provider
- Prompt for your API key
- Install hooks automatically
- Start the worker
Option B: Manual Configuration
Create the settings file manually:YOUR_GEMINI_API_KEY with your actual API key.
Then install hooks and start the worker:
Step 4: Restart Cursor
Close and reopen Cursor IDE for the hooks to take effect.Step 5: Verify Installation
Available Gemini Models
| Model | Free Tier RPM | Notes |
|---|---|---|
gemini-2.5-flash-lite | 10 (4,000 with billing) | Default. Fastest, highest free tier RPM |
gemini-2.5-flash | 5 (1,000 with billing) | Higher capability |
gemini-3-flash | 5 (1,000 with billing) | Latest model |
Rate Limiting
Claude-mem automatically handles rate limiting for free tier usage:- Requests are spaced to stay within limits
- Processing may be slightly slower but stays within quota
- No errors or lost observations
Troubleshooting
”Gemini API key not configured”
Ensure your settings file exists and has the correct format:Rate limit errors (HTTP 429)
You’re exceeding the free tier limits. Options:- Wait a few minutes for the rate limit to reset
- Enable billing on Google Cloud to unlock higher limits
- Switch to OpenRouter for higher volume needs
API key invalid
- Verify your key at Google AI Studio
- Ensure there are no extra spaces or newlines in your settings.json
- Try generating a new API key
Worker not processing observations
Check the worker logs:Switching Providers Later
You can switch between Gemini, OpenRouter, and Claude SDK at any time by updating your settings. No restart required - changes take effect on the next observation.Next Steps
- Cursor Integration Overview - All Cursor features
- OpenRouter Setup - Alternative provider with 100+ models
- Configuration Reference - All settings options

