Lichess MCP
Lichess MCP
自然言語でLichessに話しかけて、チェスプラットフォームを操作しましょう。Claude Desktopと組み合わせて、対局、局面の分析、チェス関連のアクティビティの管理が可能です。
Model Context Protocolを使用して構築されています。
このサーバーでできること:
Lichessアカウントの管理
チェスの対局やチャレンジ
局面や対局の分析
トーナメントやチームへの参加
他のプレイヤーとの交流
設定
Lichess APIトークンは以下の2つの方法で設定できます:
環境変数:プロジェクトルートの
.envファイルに追加するか、直接設定します:LICHESS_TOKEN=your-lichess-api-token実行時に
set_tokenツールを使用する:set_token({ token: "your-lichess-api-token" });
トークンは https://lichess.org/account/oauth/token から生成できます。
Related MCP server: Lichess MCP
利用可能なツール
1. アカウント管理
// Set your Lichess API token
set_token({
token: "your-lichess-api-token"
});
// Get your Lichess profile
get_my_profile();
// Get another user's profile
get_user_profile({
username: "player_name",
trophies: true // include trophies, optional
});2. 対局
// Create a challenge against another player
create_challenge({
username: "opponent_username",
timeControl: "10+0", // 10 minutes, no increment
color: "random" // or "white", "black"
});
// Make a move in a game
make_move({
gameId: "abcd1234",
move: "e2e4",
offeringDraw: false
});
// Get your ongoing games
get_ongoing_games({
nb: 10 // number of games to fetch
});3. 対局分析
// Export a game in PGN format
export_game({
gameId: "abcd1234",
clocks: true,
evals: true
});
// Get cloud evaluation for a position
get_cloud_eval({
fen: "rnbqkbnr/ppp1pppp/8/3p4/4P3/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2"
});4. トーナメント
// List current tournaments
get_arena_tournaments();
// Join a tournament
join_arena({
tournamentId: "abc123"
});
// Create a new tournament
create_arena({
name: "My Tournament",
clockTime: 3,
clockIncrement: 2,
minutes: 45
});5. インタラクティブUI (Claude Desktop)
これらのツールは、MCP Apps拡張機能を使用して、チャット内に実際のチェスボードを表示します。駒のドラッグ、棋譜の移動、オープニングツリーのクリックなどが可能です。UIをサポートしていないクライアントでは、各ツールはFEN/PGN/Lichessリンクを含むテキスト応答にフォールバックします。
// Open today's daily puzzle (or a specific id) as an interactive solver.
play_puzzle({ puzzleId: "Bmfot" });
// Step through a Lichess game or raw PGN with prev/next/play controls.
view_pgn({ gameId: "abcd1234" });
view_pgn({ pgn: "1. e4 e5 2. Nf3 ..." });
// Walk the opening tree: click moves to drill down; toggle masters/lichess.
explore_openings({ source: "masters" });チェスの表記法
指し手の形式
Lichess APIは以下の形式の指し手を受け付けます:
UCI: Universal Chess Interface形式 (例:
e2e4,g8f6)SAN: Standard Algebraic Notation (例:
e4,Nf6) - 一部のエンドポイントのみ
FEN形式
Forsyth-Edwards Notation (FEN) はチェスの局面を表すために使用されます:
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1これは以下を表します:
駒の配置 (8段目から1段目まで)
手番 (w/b)
キャスリングの可否 (KQkq)
アンパッサンのターゲットマス
ハーフムーブクロック
フルムーブ数
エラーハンドリング
サーバーは以下の場合に詳細なエラーメッセージを提供します:
無効な指し手や局面
認証の問題
レート制限
リソースが見つからない場合
セットアップ手順
Smithery経由でのインストール
Smithery経由でClaude Desktop用のLichess統合を自動的にインストールするには:
npx -y @smithery/cli install @karayaman/lichess-mcp --client claude手動インストール
リポジトリをクローンします:
git clone https://github.com/karayaman/lichess-mcp.git cd lichess-mcp依存関係をインストールします:
npm install環境変数を設定します: ルートディレクトリに
.envファイルを作成します:LICHESS_TOKEN=your-lichess-api-tokenプロジェクトをビルドします:
npm run buildパッケージをグローバルにインストールします (Claude Desktop統合には推奨):
npm install -gサーバーを起動します (スタンドアロンで使用する場合):
npm start
Claude Desktopの設定
このMCPサーバーをClaude Desktopで使用するには:
Claude Desktopの設定ファイルを見つけます:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Lichess MCPサーバーを構成に追加します:
{ "mcpServers": { "lichess": { "command": "lichess-mcp", "env": { "LICHESS_TOKEN": "your-lichess-api-token", "DEBUG": "*" } } } }注意:
your-lichess-api-tokenを実際のLichess APIトークンに置き換えてください。DEBUG環境変数はオプションですが、トラブルシューティングに役立ちます。(オプション) 他のMCPサーバーを追加することも可能です:
{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop", "/Users/username/Downloads" ] }, "lichess": { "command": "lichess-mcp", "env": { "LICHESS_TOKEN": "your-lichess-api-token" } } } }Claude Desktopを再起動して変更を適用します。
Claude Desktopを完全に終了させてください (システムトレイ/メニューバーからも終了)
Claude Desktopを再度起動します
インターフェースにハンマーアイコンが表示されていることを確認してください。これがMCPサーバーが接続されていることを示します
ClaudeにLichessアカウントについて尋ねて、統合をテストします:
"Show me my Lichess profile"
"Start a new chess game with 10 minutes time control"
トラブルシューティング
MCPサーバーの接続で問題が発生した場合:
npm install -gでパッケージがグローバルにインストールされていることを確認してくださいlichess-mcpコマンドがPATHで利用可能か確認してください (which lichess-mcp)設定ファイルが正しい形式であることを確認してください (古い
mcp_serversではなく、新しいmcpServers形式)Claude Desktopを完全に再起動してください
追加のログが必要な場合は、Claude Desktopで開発者モードを有効にしてみてください
Lichess APIトークンが有効であることを確認してください
参照
Available Tools
88 toolsabort_board_gameC
Abort a board game
Inputs: gameId (required).
accept_challengeC
Accept an incoming challenge
Inputs: challengeId (required).
accept_join_requestB
Accept a join request for your team
Inputs: teamId (required), userId (required).
add_user_noteC
Add a private note about a user
Inputs: username (required), text (required).
block_userC
Block a player
Inputs: username (required).
cancel_challengeC
Cancel an outgoing challenge
Inputs: challengeId (required).
claim_victoryC
Claim victory if opponent abandoned the game
Inputs: gameId (required).
create_arenaC
Create a new arena tournament
Inputs: name (required), clockTime, clockIncrement, minutes, +10 more.
create_challengeC
Challenge another player
Inputs: username (required), rated, clock, days, +3 more.
create_puzzle_raceD
Create a puzzle race
Inputs: no named parameters.
create_simulC
Create a new simul
Inputs: name (required), variant, clockTime, clockIncrement, +4 more.
create_swissC
Create a new Swiss tournament
Inputs: name (required), teamId (required), clock (required), nbRounds, +4 more.
decline_challengeC
Decline an incoming challenge
Inputs: challengeId (required), reason.
decline_join_requestC
Decline a join request for your team
Inputs: teamId (required), userId (required).
export_all_study_chaptersC
Export all chapters of a study in PGN format
Inputs: studyId (required).
export_gameC
Export one game in PGN or JSON format
Inputs: gameId (required), moves, pgnInJson, tags, +5 more.
export_games_by_idsC
Export multiple games by IDs
Inputs: ids (required), moves, pgnInJson, tags, +3 more.
export_ongoing_gameC
Export ongoing game of a user
Inputs: username (required), moves, pgnInJson, tags, +3 more.
export_study_chapterC
Export one study chapter in PGN format
Inputs: studyId (required), chapterId (required).
export_user_gamesC
Export all games of a user
Inputs: username (required), since, until, max, +16 more.
follow_userC
Follow a player
Inputs: username (required).
get_all_top_10B
Get the top 10 players for each speed and variant
Inputs: no named parameters.
get_arena_gamesC
Get games of an arena tournament
Inputs: tournamentId (required).
get_arena_infoC
Get info about an arena tournament
Inputs: tournamentId (required).
get_arena_resultsC
Get results of an arena tournament
Inputs: tournamentId (required).
get_arena_tournamentsC
Get current tournaments
Inputs: no named parameters.
get_broadcastC
Get a broadcast by its ID
Inputs: broadcastId (required).
get_broadcast_roundC
Get one round of a broadcast
Inputs: broadcastId (required), roundId (required).
get_cloud_evalC
Get cloud evaluation for a position
Inputs: fen (required), multiPv.
get_current_simulsB
Get recently started simuls
Inputs: no named parameters.
get_fide_playerC
Get FIDE player information
Inputs: playerId (required).
get_followingB
Get users followed by the logged in user
Inputs: no named parameters.
get_kid_modeC
Get kid mode status
Inputs: no named parameters.
get_leaderboardC
Get the leaderboard for a single speed or variant
Inputs: perfType (required), nb.
get_my_emailB
Get your email address
Inputs: no named parameters.
get_my_profileB
Get your Lichess profile information
Inputs: no named parameters.
get_official_broadcastsC
Get official broadcasts (TV shows)
Inputs: no named parameters.
get_ongoing_gamesC
Get your ongoing games (real-time and correspondence)
Inputs: nb.
get_preferencesC
Get your preferences
Inputs: no named parameters.
get_puzzle_activityC
Get your puzzle activity
Inputs: max.
get_puzzle_dashboardC
Get your puzzle dashboard
Inputs: days.
get_puzzle_raceC
Get info about a puzzle race
Inputs: raceId (required).
get_puzzle_storm_dashboardC
Get your puzzle storm dashboard
Inputs: days.
get_rating_historyC
Get rating history of a user for all perf types
Inputs: username (required).
get_swiss_gamesC
Get games of a Swiss tournament
Inputs: swissId (required).
get_swiss_infoB
Get info about a Swiss tournament
Inputs: swissId (required).
get_swiss_resultsC
Get results of a Swiss tournament
Inputs: swissId (required).
get_team_battle_resultsC
Get results of a team battle tournament
Inputs: tournamentId (required).
get_team_infoC
Get team information by ID
Inputs: teamId (required).
get_team_join_requestsB
Get join requests for a team
Inputs: teamId (required).
get_team_membersC
Get members of a team
Inputs: teamId (required), max.
get_threadC
Get a message thread
Inputs: userId (required).
get_timelineC
Get your timeline
Inputs: since, nb.
get_tv_channelsB
Get all TV channels and their current games
Inputs: no named parameters.
get_tv_gameB
Get current TV game in PGN format
Inputs: channel.
get_user_activityC
Get activity feed of a user
Inputs: username (required).
get_user_performanceC
Get performance statistics of a user
Inputs: username (required), perf (required).
get_user_profileC
Get a user's Lichess profile information
Inputs: username (required), trophies.
get_user_public_dataC
Get public data of a user
Inputs: username (required), withTrophies.
get_users_by_idC
Get multiple users by their IDs
Inputs: ids (required).
get_users_statusC
Get real-time users status
Inputs: ids (required), withSignal, withGameIds, withGameMetas.
get_user_studiesC
Get studies created by a user
Inputs: username (required).
handle_draw_board_gameC
Handle draw offers for a board game
Inputs: gameId (required), accept.
join_arenaC
Join an arena tournament
Inputs: tournamentId (required).
join_simulC
Join a simul
Inputs: simulId (required).
join_swissC
Join a Swiss tournament
Inputs: swissId (required).
join_teamC
Join a team
Inputs: teamId (required), message.
kick_user_from_teamC
Kick a user from your team
Inputs: teamId (required), userId (required).
leave_teamC
Leave a team
Inputs: teamId (required).
list_challengesC
List incoming and outgoing challenges
Inputs: no named parameters.
make_board_moveC
Make a move in a board game
Inputs: gameId (required), move (required), offeringDraw.
make_moveC
Make a move in an ongoing game
Inputs: gameId (required), move (required), offeringDraw.
push_broadcast_round_pgnC
Push PGN to a broadcast round
Inputs: broadcastId (required), roundId (required), pgn (required).
resign_board_gameC
Resign a board game
Inputs: gameId (required).
revoke_tokenB
Revoke the current access token
Inputs: no named parameters.
search_fide_playersC
Search FIDE players by name
Inputs: name (required).
search_teamsC
Search for teams
Inputs: text (required), page.
send_messageC
Send a private message to another player
Inputs: username (required), text (required).
set_kid_modeC
Set kid mode status
Inputs: value (required).
set_tokenB
Set your Lichess API token
Inputs: token (required).
test_tokensC
Test multiple OAuth tokens
Inputs: tokens (required).
unblock_userC
Unblock a user
Inputs: username (required).
unfollow_userC
Unfollow a player
Inputs: username (required).
upgrade_to_botA
Upgrade to Bot account. WARNING: This is irreversible and the account must not have played any games.
Inputs: no named parameters.
withdraw_from_arenaC
Withdraw from an arena tournament
Inputs: tournamentId (required).
withdraw_from_simulC
Withdraw from a simul
Inputs: simulId (required).
withdraw_from_swissC
Withdraw from a Swiss tournament
Inputs: swissId (required).
write_in_chatC
Write in the chat of a board game
Inputs: gameId (required), room (required), text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 88 tools
Most tools have distinct purposes, such as 'create_arena' for tournaments and 'make_board_move' for gameplay, but there is some overlap between 'make_board_move' and 'make_move' which could cause confusion. Descriptions clarify that 'make_board_move' is for board games and 'make_move' for ongoing games, but the similarity in naming might lead to misselection without careful reading.
Tool names consistently follow a verb_noun pattern, such as 'accept_challenge', 'export_game', and 'get_user_profile'. There are no deviations in naming conventions, making the set predictable and easy to parse for agents.
With 88 tools, the count is excessive for the Lichess domain, leading to potential overwhelm and inefficiency. While the server covers many features, the high number suggests over-fragmentation, such as having separate tools for each tournament type (arena, swiss, simul) and multiple export functions, which could be consolidated.
The tool set comprehensively covers the Lichess domain, including user management, gameplay, tournaments, puzzles, studies, broadcasts, and team interactions. There are no obvious gaps; it supports full CRUD operations and lifecycle management across all major features, ensuring agents can handle diverse tasks without dead ends.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for AI dialogue using various LLM models via AceDataCloud
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted Notion MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
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
- FlicenseNot gradedqualityDmaintenanceAn MCP server that exposes Stockfish chess analysis to LLM chat clients, enabling move analysis, game review, and explanation of engine choices.-
- AlicenseAqualityDmaintenanceMCP server that exposes the Lichess public API through tools for querying player profiles, games, analysis, openings, puzzles, and tournaments, allowing natural-language chess questions without an API key.8MIT