lichess-mcp
Provides tools for interacting with the Lichess public API, including user profiles, recent games, game analysis, opening statistics, position analysis, daily puzzles, player search, and tournament information.
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., "@lichess-mcp What's DrNykterstein's blitz rating, and is he on a streak right now?"
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.
lichess-mcp
An MCP server that puts the Lichess public API in front of any MCP-compatible agent, so you can ask about chess in plain language instead of reading JSON.
"How did Magnus do in blitz this week, and what did the engine think of his last loss?"
No API key, no account, no OAuth — every tool here uses Lichess' public endpoints.
What you get
Tool | What it answers |
| Ratings in every format, title, country, account stats, current win/loss streak |
| Recent games with PGN, result, opponent, opening and accuracy; filter by format or colour |
| Per-side accuracy and ACPL, plus every blunder/mistake/inaccuracy with the engine's preferred move and the eval swing |
| Win/draw/loss and score% for one opening, for one player, as a given colour |
| Top engine lines for a FEN, from Lichess' cloud evaluation cache, rendered in SAN |
| Today's daily puzzle: FEN, themes, rating, and the solution |
| Autocomplete a half-remembered username |
| Arena or Swiss tournament: time control, player count, games played, standings |
Plus a resource, lichess://api-reference, summarising the endpoints behind each tool, the
rate limits, and the known gaps — so an agent can read the manual instead of guessing.
Output is shaped for reading, not parsing
Raw Lichess payloads bury the result of a game under ninety clock timestamps. Every tool here returns a small dict with obvious keys:
// get_recent_games("DrNykterstein", count=1, format="blitz")
{
"game_id": "kAdOQKeh",
"url": "https://lichess.org/kAdOQKeh",
"played_at": "2026-04-08T19:39:03+00:00",
"format": "blitz",
"time_control": "3+0",
"opening": "Alekhine Defense: Sämisch Attack",
"color": "black",
"result": "win",
"my_rating": 3145,
"rating_change": 8,
"my_accuracy": 93,
"opponent": { "username": "respects_55", "rating": 2644, "accuracy": 89 },
"pgn": "[Event \"Take Take Take Arena\"]\n..."
}Engine lines come back as SAN, because 1... e5 2. g3 Nf6 is legible and e7e5 g2g3 g8f6
is not. Evaluations are normalised so a positive score always favours the side to move, and
forced mates are reported as mate_in rather than a huge centipawn number.
Related MCP server: mcp-server
Install
Requires Python 3.10+.
uvx lichess-mcpor
pip install lichess-mcpClaude Desktop
Add this to your claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json,
Windows: %APPDATA%\Claude\claude_desktop_config.json), then restart Claude Desktop:
{
"mcpServers": {
"lichess": {
"command": "uvx",
"args": ["lichess-mcp"]
}
}
}If you installed with pip rather than using uvx, point at the installed script instead:
{
"mcpServers": {
"lichess": {
"command": "lichess-mcp"
}
}
}Claude Code
claude mcp add lichess -- uvx lichess-mcpTry these
"What's DrNykterstein's blitz rating, and is he on a streak right now?" →
get_user_profile"Show me my last 5 rapid games as Black and tell me which openings went badly." →
get_recent_games, thenget_opening_stats"Pull up today's Lichess puzzle and give me the position — don't tell me the answer yet." →
get_puzzle_of_day"Here's a FEN from my game —
r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3. What does the engine want to play?" →analyze_position"Find every blunder in lichess.org/dmvL2duu and explain what each one missed." →
get_game_analysis
Openings, tournaments and player search work the same way: "How do I score with the Sicilian as White over my last 200 games?", "Who won tournament W1OrjDLM?", "There's a player called something like 'penguin' — find them."
Configuration
Everything is optional.
Variable | Default | Purpose |
| unset | A personal access token. Raises your rate limit and unlocks your own private data. Nothing here requires it. |
|
| Seconds between requests. Lichess asks for 1 req/sec; lower it only with a token and a good reason. |
|
| Longest 429 back-off to sit out before reporting the rate limit to the caller. |
|
| Per-request timeout in seconds. |
|
| Set to |
Being a good API citizen
Lichess is free, donation-funded, and asks clients for at most one request per second.
This server enforces that globally with an async rate limiter rather than trusting each tool
to behave, and backs off politely on HTTP 429. That means tools which scan many games
(get_opening_stats with a large max_games) are deliberately unhurried.
If you want the whole games database, take it from database.lichess.org, not from this server.
Known limits
Computer analysis is opt-in on Lichess.
get_game_analysisand theaccuracyfields only have data for games where a player requested analysis. Games without it returnanalysis_available: falseand say so, rather than failing.analyze_positionreads a cache, not a live engine. Lichess' cloud eval covers positions someone has already analysed — common openings and popular games. Novel positions returncached: falsewith an explanation.get_opening_statssamples recent games. Lichess' personal opening explorer now requires OAuth, so this aggregates the games export instead. Results describe the lastmax_gamesgames (default 200, max 500), not a lifetime total.Streaks are derived, not fetched — Lichess has no streak endpoint, so
get_user_profilecomputes the current run from the 30 most recent rated games.
Development
git clone https://github.com/Anay704/lichess-mcp
cd lichess-mcp
python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest # offline, sub-second
.venv/bin/ruff check .The suite stubs the HTTP layer, so the default run is fast and works offline. A handful of tests that really call lichess.org are opt-in:
LICHESS_MCP_LIVE_TESTS=1 .venv/bin/pytestLicense
MIT — see LICENSE.
Not affiliated with or endorsed by Lichess. Lichess is a free/libre, open-source chess server; if you get value out of this, consider donating to them.
Available Tools
8 toolsanalyze_positionAnalyze positionA
Evaluate a chess position given as a FEN using Lichess' cloud engine cache. Returns the top engine lines with evaluations, in readable SAN notation.
Inputs: fen (required), lines. Returns: object
get_game_analysisGet game analysisA
Computer analysis of a single Lichess game: per-player accuracy and average centipawn loss, plus every blunder, mistake and inaccuracy with the move that was played, the engine's preferred move, and the evaluation swing.
Inputs: game_id (required). Returns: object
get_opening_statsGet opening statsB
Win/draw/loss breakdown for one player in a specific opening, as a given colour. Scans the player's recent games and aggregates by opening name.
Inputs: username (required), color, format, max_games, +1 more. Returns: object
get_puzzle_of_dayGet puzzle of the dayA
Today's Lichess daily puzzle: the FEN to solve, whose move it is, the puzzle rating, its tactical themes, and the solution in UCI and SAN.
Inputs: no named parameters. Returns: object
get_recent_gamesGet recent gamesB
Fetch a player's most recent games with PGN, result, opponent, opening and accuracy. Optionally filter to one time format or one colour.
Inputs: username (required), color, count, format, +2 more. Returns: object
get_tournament_infoGet tournament infoA
Details and standings for a Lichess arena or Swiss tournament: name, time control, player count, games played, and the leaderboard.
Inputs: tournament_id (required), top. Returns: object
get_user_profileGet user profileA
Look up a Lichess player: ratings in every format they play, title, country, account stats, and their current win/loss/draw streak.
Inputs: username (required), include_streak. Returns: object
search_playersSearch playersA
Autocomplete Lichess usernames from a partial string. Use this to resolve a half-remembered or misspelled username before calling other tools.
Inputs: pattern (required), limit. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct purpose: user profile, player search, recent games, game analysis, opening stats, daily puzzle, position evaluation, and tournament info. There is no overlapping functionality or ambiguity between tools.
All tool names follow a consistent verb_noun pattern: get_* for retrieval, search_players for search, and analyze_position for analysis. The verbs are clear and the nouns are specific, making the naming predictable and uniform.
With 8 tools, the set is well-scoped for a chess data server. It covers core Lichess features without feeling bloated or sparse, and each tool contributes a necessary capability.
The tool set covers the main read-only Lichess workflows: user profiles, game retrieval, analysis, openings, puzzles, positions, and tournaments. Minor gaps exist, such as no direct way to fetch a user's full game history or a specific game by ID, but these can be worked around via recent games and analysis.
Maintenance
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseCqualityBmaintenanceAn MCP server that enables natural language interaction with the Lichess chess platform, allowing users to play games, analyze positions, manage their account, and participate in tournaments through Claude.9028 npm20MIT
- FlicenseBqualityDmaintenanceMCP server that enables web search via Tavily API and chess player stats via Chess.com API.10-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query public Lichess data including player profiles, games, opening explorer, and tablebase via the Pipeworx MCP gateway.139 npmMIT
- AlicenseAqualityBmaintenanceMCP chess runtime that lets LLMs play, analyze, and adapt strength by exposing Stockfish, human move likelihood (Maia3), and Lichess statistics, with the LLM handling strategy and the server handling computation.1331 npmAGPL 3.0