dsa-coach-mcp
This MCP server turns DSA practice across judges into a coached spaced-repetition system with mistake tracking and dashboards.
List connected platforms and their supported tags and difficulty levels.
Read LeetCode/Codeforces profiles, link or unlink accounts, and search problems by tag, level, and solved status.
Log reviews with ratings, journal mistakes, and schedule future revisions using FSRS.
Suggest review ratings from recent submission evidence and show revisions due, least-recalled first.
Inspect and personalize FSRS scheduling parameters when the optimizer extra is installed.
Record problems from unsupported platforms using their URL, title, tags, and difficulty, then review them normally.
Track per-platform progress, mistake history, mistake labels, and mistake patterns by tag/platform/month.
Show an interactive dashboard with due revisions, forgetting forecasts, mistake recovery, overconfidence, calibration, and next steps.
Use prompts for practice plans, revision quizzes, and weekly reports.
Provides access to a Codeforces user's public profile, including attempted and accepted problem counts by tag and recent submissions, and supports searching Codeforces problems by tag and rating while optionally excluding already solved problems.
Provides access to a LeetCode user's public profile, including solved and unsolved problem counts by tag and recent accepted submissions, and supports searching LeetCode problems by tag and difficulty while optionally excluding already solved problems.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dsa-coach-mcp What should I practice this week? I'm alice on LeetCode and bob on Codeforces."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dsa-coach-mcp
An MCP server that turns your DSA practice on any judge into a coach inside Claude, Cursor or any MCP client: revise what you solved on a spaced-repetition schedule, with a mistake journal that remembers why you got things wrong and builds your next practice set around it. On LeetCode and Codeforces it also reads your history live, shows where you stand and finds problems to try next; problems from any other judge are recorded as you solve them.
Why
Practice data is split across sites, and each grades difficulty its own way (LeetCode's Easy/Medium/Hard, Codeforces' 800-3500 ratings). Most trackers count problems; few tell you what you are forgetting. This server puts both platforms behind one interface and schedules revision with FSRS, so the model you already talk to can coach you.
FSRS predicts the chance you still remember each problem and brings it back just before
that chance drops below 90%. In the open
spaced-repetition benchmark
over ~10k Anki collections, FSRS predicted recall better than SM-2 for the large
majority of users. Once you have a review history, personalize_schedule fits its
parameters to how fast you forget.
Counting solved problems hides the real signal: the same few mistakes, repeated. Every review can carry the mistakes behind it, and the model turns those patterns into practice sets and revision quizzes aimed at exactly what you keep missing.
Related MCP server: DevAssist MCP Server
Design
The server returns data, not decisions. It never hardcodes what counts as a weak topic or the next level up; the model reads your profile and the platform's own vocabulary and decides.
flowchart LR
Client["MCP client<br/>(Claude, Cursor)"] -->|tools| Server["server.py<br/>validates against<br/>platform vocabulary"]
Server --> Registry["platforms/<br/>adapter registry"]
Registry --> LC["LeetCodeAdapter<br/>GraphQL"]
Registry --> CF["CodeforcesAdapter<br/>REST"]
Server --> SRS["scheduling.py<br/>FSRS"] --> Store[("SQLite<br/>cards, reviews,<br/>mistakes")]Adapters translate one platform's API into shared models (
Problem,Profile,PlatformInfo). Nothing outside an adapter names a platform.Data comes from the platforms. Tags and levels are read from each platform's API, and a review takes the problem's title, link and tags from the platform rather than from the model, so nothing in your history is invented. Platforms' own tag lists are incomplete, so
search_problemsaccepts a tag outside them and only reports it when nothing matched.Profiles say what they can't see. Each profile carries
limitations, e.g. LeetCode only exposes your 20 most recent accepted submissions publicly.
Tools
Tool | What it does |
| Connected platforms, with the tags and levels each accepts as filters |
| Your level, solved and unsolved counts per tag, and recent submissions |
| Saves (or forgets) your username on a platform, so tools default to it and the dashboard shows that account |
| Problems with every given tag at a given level, optionally skipping ones you solved |
| Records how you did ( |
| Suggests a |
| Problems due now, the one you are least likely to remember first, each with FSRS's recall estimate |
| The FSRS parameters in use, whether they are personalised, and how many reviews are logged |
| Fits FSRS to your own review history (needs |
| Records a problem from any other platform (HackerRank, GeeksforGeeks, CodeChef, AtCoder, ...) as read from its page |
| Per platform: problems reviewed, reviews logged, and problems due now |
| Progress, revisions due by risk of forgetting, a mistake heatmap, a forgetting forecast, mistake recovery, overconfidence and calibration, as an interactive view in hosts that support MCP Apps |
| Every mistake label used so far, so new mistakes reuse the same words |
| Journaled mistakes, filterable by label, tag, platform or recent days |
| Mistake counts per label, broken down by tag, platform and month |
Prompts
Prompt | What it does |
| Builds the next practice set from your recurring mistakes and progress |
| Quizzes you on today's revisions using what you got wrong before |
| Reports on your last week: what you did, what's slipping, mistakes that keep coming back, and three things to do next |
Dashboard
show_dashboard opens with Do this next: up to four steps picked from your own data
by fixed rules (the revision you're most likely to forget, a mistake that keeps coming
back, a weak topic, and a problem you were overconfident about), plus Weekly report,
Plan my session and Quiz me buttons that ask your assistant in the chat. It then
shows live stats for each account you linked (solved per level or
your rating, your strongest tags, tags you tried and never solved, and tags you've barely
practised), progress per platform, the revisions due now, and what your own
history says about your memory: a forgetting forecast (recall per tag now and in two
weeks if you revise nothing), mistake recovery (reviews since each mistake last
happened), overconfidence (problems rated easy and failed at the next review) and
calibration (FSRS's predicted recall against how often you actually recalled).
It is an MCP App: hosts that support them (Claude, Claude Desktop, VS Code Copilot, Goose and others) render it inside the conversation; every other host gets the same data as the tool's result. In a client that can't render MCP Apps, such as Claude Code, open it in your browser instead, from the same local history:
uvx dsa-coach-mcp dashboardIt serves the page on localhost only and stops with Ctrl+C. The view is a React app built into one self-contained HTML file with no external scripts, follows the host's light or dark theme, and talks to the host over the MCP Apps postMessage protocol.
Any platform
LeetCode and Codeforces have adapters that read from their APIs. Every other platform
works through the page you are looking at: pair this server with a browser MCP server
such as Playwright MCP in extension mode,
which lets the model read the tab open in your own browser, logged in. The model reads
the problem page and calls record_problem with its URL, title, tags and difficulty;
from then on it is reviewed, scheduled and journaled like any other problem.
{
"mcpServers": {
"dsa-coach": { "command": "uvx", "args": ["dsa-coach-mcp"] },
"playwright": { "command": "npx", "args": ["@playwright/mcp@latest", "--extension"] }
}
}No platform is listed in the code: the platform is the problem URL's host, and its
problem id is the URL's path. Problems recorded this way are marked
"source": "reported", because they come from a page the model read rather than from
the platform's API, and a host that has an adapter is always sent to its adapter.
Mistake journal
There is no fixed list of mistake types. The model labels each mistake in a few words and is shown every label used before, so it reuses yours instead of inventing new ones; your journal's vocabulary grows from your own reviews. The server only stores and counts them; spotting the pattern is the model's job.
You: Redid Course Schedule. Forgot to detect the cycle again, and used DFS recursion
that would overflow on 10^5 nodes.
Claude: (log_review rated "hard" with two mistakes, reusing your existing
"missed cycle detection" label)
That's the third time cycle detection has slipped on graph problems ...Install
Requires uv.
Claude Desktop: add to claude_desktop_config.json:
{
"mcpServers": {
"dsa-coach": {
"command": "uvx",
"args": ["dsa-coach-mcp"]
}
}
}Claude Code:
claude mcp add dsa-coach -- uvx dsa-coach-mcpCursor: same command and args as above in .cursor/mcp.json.
Agent skill
skills/dsa-coach/SKILL.md tells the agent when to reach
for these tools and how to use them well: how to rate a review, to reuse existing
mistake labels, and to record problems from other platforms only from a page it read.
For Claude Code, copy it into your skills:
mkdir -p ~/.claude/skills/dsa-coach
curl -fsSL https://raw.githubusercontent.com/aaryagodbole/dsa-coach-mcp/main/skills/dsa-coach/SKILL.md \
-o ~/.claude/skills/dsa-coach/SKILL.mdConfiguration
Variable | Default | Purpose |
|
| Where cards, reviews and mistakes are stored |
To personalise the schedule, install the optimizer extra (it pulls in PyTorch):
uvx --from 'dsa-coach-mcp[optimizer]' dsa-coach-mcp.
Privacy
No login and no API keys. The server only calls the platforms' public APIs with the handles you give it, and revision cards stay in a local SQLite file.
Adding a platform
Write
src/dsa_coach_mcp/platforms/<name>.pywith a class implementingPlatformAdapter:name,describe(),profile()andsearch().Add the class to
ADAPTERSinplatforms/__init__.py.Add tests with a mocked API, like
tests/test_codeforces.py.
The server and tools need no changes.
Evals
Unit tests check the code; evals/ checks whether a model can actually
coach with these tools. A model drives the real server over the MCP protocol, against a
fixture world (one practice platform, a seeded history, a fixed clock), on tasks such
as planning from a profile, logging a review with its mistakes, reusing an existing
mistake label, recording a problem from another platform, and staying silent when no
tool is needed.
Grading is deterministic, with no LLM judge: each task lists the tool calls it expects with predicates on their arguments, the tools it must not touch, and a call budget. A run reports pass rate, tool-selection accuracy, argument accuracy, tool error rate, calls per task and token usage.
The model is configuration, not code. Any API that speaks the chat completions format works, whether a hosted free tier, a paid API or a model served on your own machine:
EVALS_BASE_URL=<api base url> EVALS_MODEL=<model> EVALS_API_KEY=<key, if needed> \
uv run python -m evals.runThe loop talks to models through a small AgentBackend interface
(evals/backends/base.py); an API with a different wire
format is one more backend module. Runs never start on their own: run it locally, or
start the Agent evals workflow from the Actions tab after setting the
EVALS_BASE_URL and EVALS_MODEL repository variables (and an EVALS_API_KEY secret
if your API needs one). The graders, the fixture, the loop and the backend are
unit-tested in CI without calling any model.
Development
uv sync
uv run pre-commit install
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypyThe dashboard is a React + TypeScript app in ui/,
built with Vite into the single HTML file the package serves. After changing it, rebuild
and commit the output; CI checks they match:
cd ui && npm ci && npm run buildRe-record the demo at the top of this page against live data:
uv run python examples/demo.py --leetcode <username> --codeforces <handle>Tests never hit the network: adapters are tested against mocked API responses. See CONTRIBUTING.md.
License
Available Tools
16 toolsget_profileBRead-onlyIdempotent
The user's standing on one platform: level, solved and unsolved counts per tag, and their most recent submissions. Without a handle, uses the one linked with link_account.
Inputs: platform (required), handle, recent_submissions. Returns: handle, platform, solved_ids, limitations, +5 more
link_accountBDestructiveIdempotent
Save the user's username on a platform, replacing any saved before, after checking it exists. Tools that take a handle default to it, and show_dashboard shows this account's stats. Returns those stats.
Inputs: handle (required), platform (required). Returns: Where the user stands on a platform they linked, read live from its API.
list_mistakesBRead-onlyIdempotent
Journaled mistakes, newest first, with the problem each was made on. Filter by
label, problem tag, platform, one problem (platform and problem_id), or the last
days days.
Inputs: tag, days, kind, limit, +2 more. Returns: result
list_platformsBRead-onlyIdempotent
Connected platforms, with the tags and levels each one accepts as filters.
Inputs: no named parameters. Returns: result
log_reviewA
Record how well the user recalled a problem, schedule the next revision with FSRS, and journal any mistakes made on the way.
rating: again (could not solve it), hard (solved with real difficulty), good
(solved after some thought) or easy (solved at once).
The problem's title, link and tags are read from the platform itself. Give each
mistake a short kind, reusing an existing one from mistake_kinds when it fits, and
a note on what went wrong in the user's own words.Inputs: rating (required), platform (required), problem_id (required), mistakes. Returns: due, url, title, reviews, +5 more
mistake_kindsARead-onlyIdempotent
Every mistake label used so far, most frequent first. Reuse these labels when logging new mistakes so the same kind of mistake is counted together.
Inputs: no named parameters. Returns: result
mistake_patternsBRead-onlyIdempotent
Mistake counts per label, broken down by problem tag, platform and month. Counts only; reading what they say about the user is up to you.
Inputs: days. Returns: kinds, by_tag, by_month, by_platform
personalize_scheduleB
Fit the FSRS parameters to this user's own review history, so revisions are timed to how fast they personally forget. Needs the optimizer extra.
Inputs: no named parameters. Returns: reviews, parameters, personalised
progressBRead-onlyIdempotent
Per platform the user has reviewed on: problems reviewed, reviews logged, and problems due for revision now.
Inputs: no named parameters. Returns: result
record_problemA
Record a problem from a platform this server has no adapter for, as read from its page: its URL, title, the tags the page shows and its difficulty as the page states it. The platform is the URL's host, and the problem id its path. Returns the platform and problem_id to pass to log_review.
Inputs: url (required), title (required), tags, level. Returns: url, tags, level, title, +3 more
review_evidenceARead-onlyIdempotent
Suggest a log_review rating from the user's submissions to this problem since it was last reviewed: again if none was accepted, good if the first was, hard if rejected ones came first. Never easy, since speed is not in the history. Where the platform hides rejected submissions, or nothing was submitted, it suggests nothing and says why; ask the user then. Tell the user the suggestion and its reason, and let them overrule it. Without a handle, uses the one linked with link_account.
Inputs: platform (required), problem_id (required), handle. Returns: since, reason, accepted, platform, +6 more
revisions_dueCRead-onlyIdempotent
Problems due for revision now, the one the user is least likely to recall first.
Inputs: limit. Returns: result
schedule_infoBRead-onlyIdempotent
The FSRS parameters in use, whether they were fitted to this user's own reviews, and how many reviews are logged.
Inputs: no named parameters. Returns: reviews, parameters, personalised
search_problemsBRead-onlyIdempotent
Problems having every tag given, at the level given. Take tags and levels from list_platforms or from problems the platform returned. With exclude_solved_by, skips that handle's solved problems.
Inputs: platform (required), tags, level, limit, +1 more. Returns: result
show_dashboardBRead-onlyIdempotent
Show the user's progress per platform, the revisions due now ordered by how likely they are to be forgotten, a heatmap of mistakes by label and tag, and what the history says about their memory: recall per tag now and two weeks out, which mistakes stopped recurring, problems rated easy then failed, and how well FSRS's predictions matched, plus live stats for each account linked with link_account. Hosts that support MCP Apps render it as an interactive dashboard.
Inputs: days, limit. Returns: due, accounts, insights, patterns, +2 more
unlink_accountBDestructiveIdempotent
Forget the username saved for a platform.
Inputs: platform (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Most tools have distinct jobs, but several report overlapping stats: get_profile (per-platform standing), progress (per-platform reviewed/due counts), and show_dashboard (which also includes per-platform progress and 'revisions due now') largely restate each other at different verbosity levels, and revisions_due duplicates part of show_dashboard. The three mistake tools (mistake_kinds, list_mistakes, mistake_patterns) are better separated but still near each other. Descriptions help, but an agent could plausibly pick progress vs show_dashboard vs get_profile arbitrarily.
Roughly half the tools use verb_noun (list_platforms, search_problems, log_review, link_account, record_problem), but the rest are bare nouns (progress, revisions_due, schedule_info, mistake_kinds, mistake_patterns), including one verb_noun-ish outlier (review_evidence). The convention is readable but clearly mixed rather than predictable.
16 tools is slightly heavy but each maps to a real concern in this domain: platform discovery, account linking, problem search/recording, review logging, FSRS scheduling, and mistake analytics. No tool looks redundant enough to be cut outright, though progress could arguably fold into show_dashboard.
The lifecycle is broadly covered: discover platforms, link/unlink accounts, find or manually record problems, log reviews with FSRS rescheduling, inspect schedules, and analyze mistakes. The notable gap is that review and mistake records are create-only — there is no way to edit, delete, or undo a mis-logged review or mistake, and no corrections path beyond re-logging.
Maintenance
Related MCP Connectors
Shared brain, one current version of memory for any MCP client: ChatGPT, Claude, Gemini, Cursor
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceA complete, all-in-one MCP server for Codeforces, enabling AI assistants to access user profiles, compare users, search problems, get practice recommendations, and more.83MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready MCP server for GitHub and competitive programming (Codeforces) that enables AI assistants to fetch user profiles, repository stats, contest history, and personalized problem recommendations.MIT
- AlicenseNot gradedqualityDmaintenanceThis is an MCP server for tracking your progress through DSA questions with spaced repetition, built-in NeetCode 150 list, and tools to log attempts, get next problems, and view stats.1MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that acts as a personalized interview prep coach, tracking DSA problems, scheduling spaced-repetition revisions, and providing RAG-based concept explanations grounded in your own notes.-