lichess-stockfish-mcp
Provides tools for interacting with the Lichess API: retrieving user profiles, recent games, and game PGNs; reviewing Lichess games; producing coaching reports across recent games; accessing cloud evaluations, opening explorer data, endgame tablebases, and puzzles; checking account tokens; and publishing imported games or engine-annotated reviews to Lichess studies.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
lichess-stockfish-mcp
An MCP server that gives Claude (or any MCP client) a local Stockfish engine and the Lichess API. Use it for game reviews, coaching, opening research and endgame checks, and to give something back to the Lichess community.
Tools
Group | Tool | Purpose |
Engine |
| Top N Stockfish lines for a FEN |
| Legal moves in SAN, so the model never suggests an illegal move | |
| Full game review: Lichess-style accuracy, ACPL, inaccuracies/mistakes/blunders with the best move, annotated PGN | |
Lichess |
| Profiles and games |
| Review any Lichess game by id or URL | |
| Coach report over the last N games: where errors happen (opening/middlegame/endgame), results per opening, worst moments | |
| Lichess's cached deep evaluations | |
| What Lichess players or masters play from a position | |
| Perfect play for 7 or fewer pieces | |
| Daily puzzle or a puzzle by id | |
| Check which account a token belongs to | |
Contribute |
| Publish over-the-board or club games publicly on Lichess |
| Push an engine-annotated review into a Lichess Study chapter |
The two "Contribute" tools write to Lichess. Their descriptions tell the model to confirm with the user first.
How the review judges moves
It follows Lichess's own method:
Each eval is converted to a win percentage:
50 + 50 * (2 / (1 + exp(-0.00368208 * cp)) - 1).A move is an inaccuracy, mistake or blunder when it loses ≥5, ≥10 or ≥15 win-percentage points and wasn't the engine's choice.
Allowing a forced mate, or letting one slip, is judged by Lichess's mate rules.
Per-move accuracy uses
103.1668 * exp(-0.04354 * loss) - 3.1669, averaged across the game. That's close to Lichess's number but not identical.
Related MCP server: Lichess MCP
Setup
Requires Python 3.10+ and a Stockfish binary.
python -m venv .venv
.venv/bin/pip install -r requirements.txt # Windows: .venv\Scripts\pipEnvironment variable | Default | Purpose |
|
| Engine binary |
| unset | Only for |
| half the CPUs | Stockfish threads |
| 256 | Stockfish hash |
| system store | Custom CA bundle, for example behind a TLS-inspecting proxy |
Register with Claude Code
claude mcp add lichess -e STOCKFISH_PATH=/usr/games/stockfish -- /path/to/.venv/bin/python /path/to/server.pyOr use a project .mcp.json:
{
"mcpServers": {
"lichess": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/server.py"],
"env": { "STOCKFISH_PATH": "/usr/games/stockfish", "LICHESS_TOKEN": "${LICHESS_TOKEN:-}" }
}
}
}Windows with WSL: run the server inside WSL by setting "command": "wsl.exe" and "args": ["-e", "env", "STOCKFISH_PATH=...", "/home/you/.venv/bin/python", "/mnt/c/.../server.py"]. Add "WSLENV": "LICHESS_TOKEN" to env to pass the token through.
Example prompts
"Review my last 10 blitz games on Lichess (user
<name>) and tell me my recurring mistakes.""Review lichess.org/abcd1234 and add the annotated version to my study
<id>.""What do 1800-rated players play after 1.e4 c5 2.Nf3 d6, and what does Stockfish think?"
Tests
python tests/test_server.py # engine + live Lichess
python tests/test_server.py offline # engine onlyMore ways to support the community
fishnet: donate CPU to Lichess's free server-side analysis.
Fishtest: donate CPU to test Stockfish patches.
lichess-bot: run an engine as a public bot. Upgrading to a bot account is permanent, so use a new account.
Fair play
Use this only after games, for study, or for your own imported games. Getting engine help during a live game breaks the Lichess (and Chess.com) Terms of Service.
License
MIT for this code. Stockfish itself is GPLv3 and isn't included. This server runs it as a separate program.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Chess MCP for Claude: engine analysis, attack maps, game review. One URL, no install.
Interactive Stockfish 19 chess review & boards for MCP Apps hosts (Claude, ChatGPT).
Lichess MCP server for ChatGPT, Claude and any AI agent: accept team join request, send team update, create Arena tournament, create broadcast, import PGN to study and export games in your own Lichess account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Lichess yourself; Cotlet does not store your password and you need no Lichess API key. About the official Lichess API: Lichess has a full, free REST API with personal and OAuth tokens, but no official MCP server (checked 17 Oct 2026). The API covers teams, Arena and Swiss tournaments, studies, broadcasts, challenges and game export, so the gap is a hosted, maintained MCP with no token to create, scope or revoke. Setup and FAQ: https://cotlet.dev/integrations/lichess-api-mcp-server
Free chess tools for AI agents: Stockfish best move, evaluation, openings and game analysis.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables natural language interaction with Lichess chess platform to play games, analyze positions, manage challenges and tournaments, and interact with other players through Claude Desktop.MIT
- AlicenseAqualityDmaintenanceConnects Claude to Lichess for playing chess games, analyzing positions with Stockfish cloud evaluation, and solving puzzles. Supports real-time gameplay including moves, challenges, draw offers, and accessing user profiles and game history.28MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to perform professional-grade chess analysis using Stockfish and optionally Leela Chess Zero, including position analysis, full game review, opening lookup, and puzzle generation.13 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables local Stockfish-powered chess game analysis, mistake classification, puzzle finding and generation, and study-resource recommendations through MCP tools.-