chess-coach-mcp
This server acts as a hybrid AI chess coach, combining a local Stockfish engine with LLM-powered explanations to deliver personalized, grounded coaching in English or Korean.
Check engine status (
engine_status): Verify Stockfish is available and get its version — useful for troubleshooting.Analyze a position (
analyze_position): Evaluate any FEN, returning top engine lines in SAN notation, win percentage, centipawn evaluation, material balance, and tactical flags (forks, pins).Analyze a full game (
analyze_game): Review a complete PGN with per-move classifications (best/good/inaccuracy/mistake/blunder), win% changes, centipawn loss, engine-preferred moves, tactical motif tags, and per-phase (opening/middlegame/endgame) summaries.Fetch recent games (
fetch_recent_games): Retrieve a player's recent games from Lichess or Chess.com (no API key needed), with optional filtering by time control.Diagnose weaknesses (
diagnose_weaknesses): Aggregate analysis across multiple games to identify recurring tactical blind spots, phase weaknesses, leaky openings, time-trouble patterns, and a ranked list of top weaknesses with example positions.Recommend personalized drills (
recommend_drills): Generate a drill set built from the player's own blunders, ordered by their top weaknesses, with an optional Lichess daily puzzle as a warm-up.
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., "@chess-coach-mcp Analyze my last chess.com game for mistakes."
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.
chess-coach-mcp
A hybrid AI chess coach exposed as an MCP server. A local Stockfish engine supplies grounded evaluations, mistake classifications and tactical motifs; your MCP host model (e.g. Claude) turns those facts into natural-language — Korean or English — coaching.
The engine knows what the best move is. The model explains why. This project wires the two together and adds the piece neither does alone: "here is your recurring mistake, drilled from your own games."
pip install chess-coach-mcp # or: uvx chess-coach-mcp (needs a local Stockfish)See it in action
diagnose_weaknesses turns your recent games into a weakness report — recurring
tactical blind spots and where you lose the most (by phase):
…then recommend_drills hands back the exact positions you went wrong in — your
move in red, the engine's in green — so you re-solve your own mistakes:
Numbers above are real Stockfish output; the weakness report uses an example dataset. Regenerate everything with
uv run --with matplotlib --with pillow python docs/generate_assets.py.
Related MCP server: Chess MCP
Why this exists
Engines (Stockfish) tell you the best move but not the reason. Raw LLMs explain
fluently but play/evaluate chess poorly and hallucinate lines. Existing trainers
are fragmented (one app for stats, one for explanations, one for courses) and
rarely give a personalised, guided path. chess-coach-mcp is the grounding
layer: every claim the coach makes is backed by Stockfish, and the weakness
diagnosis is computed from the player's actual games.
What it does
Fetch recent games from Lichess or Chess.com (public APIs, no key).
Analyse a game: per-move classification (best / good / inaccuracy / mistake / blunder, with Korean labels), win% before/after, centipawn loss, the engine's preferred move, tactical-motif tags, and per-phase summary.
Analyse a position (FEN): top engine lines in SAN, win%, material, and fork/pin flags — so the model can explain the why.
Diagnose weaknesses across many games: phase weaknesses (opening/middlegame/endgame), recurring tactical blind spots with example positions, leaky openings, a time-trouble proxy, and a ranked top-weakness list.
Recommend drills: re-solvable positions taken from the player's own blunders, ordered to target their top weaknesses, plus a Lichess daily puzzle warm-up.
What makes it different (차별점)
Most chess tools do one thing well, so you end up stitching several together.
chess-coach-mcp is the missing grounding + personalisation layer, delivered
right where you already work — inside your AI assistant.
chess-coach-mcp | Stockfish alone | DecodeChess | Aimchess | Chessable | |
Best move (what) | ✅ | ✅ | ✅ | ◐ | – |
Explains the why in prose | ✅ | ❌ | ✅ | ❌ | – |
Personal weakness diagnosis across your games | ✅ | ❌ | ❌ | ✅ | ❌ |
Drills from your own blunders | ✅ | ❌ | ❌ | ◐ | ❌ |
Korean (bilingual) coaching | ✅ | ❌ | ❌ | ❌ | ❌ |
Local / private (your engine, no account) | ✅ | ✅ | ❌ cloud | ❌ cloud | ❌ cloud |
Lives inside your AI assistant (MCP) | ✅ | ❌ | ❌ | ❌ | ❌ |
Cost | free, OSS | free | subscription | subscription | paid courses |
The five things that set it apart:
Hybrid & grounded — Stockfish is the judge, the LLM is the explainer. Every coaching claim is backed by the engine, so there are no hallucinated evaluations or made-up lines (the failure mode of asking a raw LLM about chess).
Personal, not generic —
diagnose_weaknessesaggregates your games into phase weaknesses, recurring tactical blind spots and leaky openings;recommend_drillsquizzes you on your own blunder positions — not random puzzles at your rating.Bilingual EN/KO — every structured fact carries a Korean label, so the coaching reads naturally in Korean (한국어 코칭).
Local-first & private — your own Stockfish binary + public read-only APIs. No account, no API key, nothing about your games is uploaded anywhere.
Inside your assistant — it's an MCP server, so coaching happens in the same chat you already use, composable with everything else your assistant can do.
Tools
Tool | Purpose |
| Check the local Stockfish binary is available. |
| Show a position as a text board + Lichess link (no engine). |
| List recent games (no analysis). |
| Evaluate one position; top lines + flags. |
| Full per-move game review. |
| Cross-game weakness report. |
| Personalised drill set. |
source is lichess (default) or chesscom. Every numeric/categorical fact
ships with a *_ko Korean label for natural Korean coaching. Positions in tool
output also carry a board_ascii text board and a lichess_url, so the coach
can draw the board right in the chat or link you to an interactive one.
Does a board show up in chat?
This is an MCP server: it returns data (FENs, evaluations, a board_ascii
text board, a lichess_url), and your assistant turns that into coaching. So a
graphical board doesn't pop up by itself — but the model can print the
board_ascii board in any client, you can click the lichess_url for a real
interactive board, and on claude.ai the model can draw an SVG board from the
FEN. (The demo GIF above is a generated README asset, not the live chat UI.)
Requirements
Python ≥ 3.11
Stockfish on your
PATH(or setSTOCKFISH_PATH):macOS:
brew install stockfishDebian/Ubuntu:
apt install stockfish
Install & run
From PyPI:
pip install chess-coach-mcp
chess-coach-mcp # run the MCP server over stdio
# …or run without installing:
uvx chess-coach-mcpFrom source:
uv sync # install dependencies
uv run chess-coach-mcp # run the MCP server over stdioRegister with Claude Code
claude mcp add chess-coach -- uv --directory /ABS/PATH/TO/chess-coach-mcp run chess-coach-mcpOr add to an MCP client config:
{
"mcpServers": {
"chess-coach": {
"command": "uv",
"args": ["--directory", "/ABS/PATH/TO/chess-coach-mcp", "run", "chess-coach-mcp"],
"env": { "STOCKFISH_PATH": "/opt/homebrew/bin/stockfish" }
}
}
}Example coaching flow
"내 리체스 약점 좀 진단해줘. 아이디
myname."
The host calls diagnose_weaknesses("myname"), gets back per-phase ACPL,
recurring motifs (e.g. hanging_piece ×4, missed_tactic ×3) with example
FENs, then explains in Korean why those positions went wrong and calls
recommend_drills("myname") to quiz the user on their own blunders.
Configuration (environment variables)
Variable | Default | Meaning |
| autodetect | Path to the Stockfish binary. |
| 1 | Engine threads. |
| 128 | Engine hash size (MB). |
| 16 | Default depth for |
| 14 | Default depth for |
| 12 | Default depth for diagnosis (lower = faster). |
How move classification works
Moves are classified by the drop in win percentage, not raw centipawns, using Lichess' logistic model — far more meaningful in already-winning or already-losing positions. A move is a blunder if it loses ≥20% win probability, a mistake at ≥10%, an inaccuracy at ≥5%. Mate-aware: a move that throws away a forced mate or walks into one is flagged accordingly.
Tactical motifs are heuristic labels (depth-1 static exchange for hanging pieces, geometric detection for forks/pins/back-rank). They exist to group engine-found mistakes into human themes, not to replace the engine's judgement.
Development
uv run pytest # unit + engine tests (skips engine tests if no Stockfish)
uv run python examples/mcp_smoke.py # boot the server over MCP and call tools
uv run python examples/live_check.py <lichess_username> # live network E2ETests marked engine require a Stockfish binary; live tests (none by
default) hit the network and are deselected unless you pass -m live.
License
MIT
Available Tools
6 toolsanalyze_gameA
Analyse a full game from PGN: per-move classification + motifs + summary.
Each move gets a classification (best/good/inaccuracy/mistake/blunder with
Korean labels), win% before/after, centipawn loss, the engine's preferred
move, and tactical-motif tags. The summary gives per-side accuracy/ACPL,
per-phase breakdown, and the worst moments (with FENs for drilling).
Set user_color to 'white' or 'black' to focus the worst-moment and motif
reporting on one player.
Inputs: pgn (required), depth, user_color, max_plies.
analyze_positionA
Evaluate a single position (FEN) and return the top engine lines.
Returns evaluation in centipawns and win%, the best lines in SAN, material
balance, and simple tactical flags (fork threats, pins). Use this to explain
*why* a move is best in a specific position.
Inputs: fen (required), depth, multipv.
diagnose_weaknessesA
Diagnose a player's recurring weaknesses across their recent games.
Fetches recent games, analyses each from the player's perspective, and
aggregates: overall accuracy/ACPL, per-phase (opening/middlegame/endgame)
breakdown, recurring tactical blind spots (with example positions), leaky
openings, a time-trouble proxy, and a ranked list of top weaknesses with
example FENs. This is the core 'coach' tool — heavier (runs the engine over
many games), so keep max_games modest for fast turnaround.
Inputs: username (required), source, max_games, depth, +1 more.
engine_statusA
Report whether the local Stockfish engine is available and its version.
Call this first if other tools fail with an engine error.
Inputs: no named parameters.
fetch_recent_gamesA
Fetch a player's recent games from Lichess or Chess.com (public data).
source: 'lichess' or 'chesscom'. speed (optional) filters by
bullet/blitz/rapid/classical. Returns normalised game records including PGN,
players, ratings, result and opening. No analysis is run here.
Inputs: username (required), source, max_games, speed.
recommend_drillsA
Build a personalised drill set from the player's own mistakes.
Runs diagnose_weaknesses, then returns re-solvable drill positions taken
from the player's actual blunders (FEN, side to move, the engine's preferred
move as the answer), ordered to target their top weaknesses, plus an
optional Lichess daily puzzle as a warm-up.
Inputs: username (required), source, max_games, depth, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct function: game analysis, position evaluation, weakness diagnosis, engine status check, game fetching, and drill recommendation. No two tools overlap in purpose.
All tools follow a consistent verb_noun pattern using snake_case (e.g., analyze_game, diagnose_weaknesses). The naming is predictable and clear.
With 6 tools, the server is well-scoped for a chess coach. Each tool serves a clear and necessary role without redundancy or excessive complexity.
The tool set covers all core coaching workflows: analysis, diagnostics, and drill generation. A minor gap is the lack of a tool for creating or editing chess data, but this is outside the typical coach scope.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for AI dialogue using various LLM models via AceDataCloud
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that lets your AI talk to Stockfish. Because apparently we needed to make chess engines even more accessible to our silicon overlords.16MIT
- AlicenseNot gradedqualityDmaintenanceA powerful chess engine and game server built with the Model Context Protocol (MCP). Play chess against AI, analyze positions, and integrate chess functionality into your AI applications.62 npm1ISC
- AlicenseAqualityBmaintenanceA chess training MCP server that downloads games from Lichess, analyzes moves with Stockfish, detects pattern errors using a compression model, and provides spaced repetition training to improve weaknesses.91MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that exposes Stockfish chess analysis to LLM chat clients, enabling move analysis, game review, and explanation of engine choices.-