A spaced repetition system (SRS) for LeetCode problems using MCP (Model Context Protocol) and Groq AI.
- 📝 Add problems with difficulty ratings (AGAIN, HARD, GOOD, EASY)
- 📅 Track review schedules with spaced repetition algorithm
- 📚 List all completed problems
- 🔄 Submit reviews to adjust future intervals
- 🤖 AI-powered interface via Groq (Llama models)
- Install dependencies:
uv sync- Configure environment variables in
.env:
GROQ_API_KEY="your-groq-api-key-here"
DB_FILE="leetcode_srs.db"Get a free API key at: https://console.groq.com/
- Run database migrations:
uv run migrate.pyThe project uses a simple migration system to manage database schema changes.
-
Apply pending migrations:
uv run migrate.py
-
Check migration status:
uv run migrate.py status
-
Create a new migration:
uv run migrate.py create <migration_name>
Migrations are stored in migrations/ directory with format: NNN_description.sql
Example migration:
-- Migration: Add new column
-- Created: 2026-01-21
-- Description: Add last_reviewed_at column
ALTER TABLE problems ADD COLUMN last_reviewed_at TIMESTAMP;uv run --env-file .env client_groq.py-
add_new_problem - Add a newly completed problem
project: Project name (e.g., "LeetCode")title: Problem titleurl: Problem URLrating: Difficulty (AGAIN/HARD/GOOD/EASY, default: GOOD)
-
list_all_problems - List all problems with completion dates
project: Optional filter by project name
-
get_todays_reviews - Get problems due for review today
-
submit_review - Submit a review and update schedule
project: Project nametitle: Problem titlerating: Performance rating (AGAIN/HARD/GOOD/EASY)
Initial intervals:
- AGAIN/HARD: 1 day
- GOOD: 2 days
- EASY: 4 days
Review multipliers:
- AGAIN: Reset to 1 day
- HARD: × 1.2
- GOOD: × 2.5
- EASY: × 4.0
The project consists of:
server.py- MCP server with toolsclient_groq.py- Groq AI client with Llama modelsmigrate.py- Database migration managermigrations/- SQL migration files
MIT
The client uses Groq's llama-3.3-70b-versatile model which offers:
- ⚡ Extremely fast inference (using Groq's LPU technology)
- 💰 Lower cost compared to other providers
- 🆓 Generous free tier available
- 🧠 Powerful 70B parameter model
- 🔧 Full function calling support