Labsco
karayaman logo

Lichess MCP

β˜… 17

from karayaman

Interact with the Lichess chess platform using natural language.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

Lichess MCP

smithery badge

Speak to Lichess in natural language to interact with the chess platform. Use it with Claude Desktop to play games, analyze positions, and manage your chess activities.

Built using the Model Context Protocol.

<a href="https://glama.ai/mcp/servers/x7iuw37s1v"> <img width="380" height="200" src="https://glama.ai/mcp/servers/x7iuw37s1v/badge" alt="Lichess MCP server" /> </a>

The server enables:

  • Managing your Lichess account
  • Playing chess games and challenges
  • Analyzing positions and games
  • Joining tournaments and teams
  • Interacting with other players

Available Tools

1. Account Management

// 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. Game Play

// 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. Game Analysis

// 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. Tournaments

// 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. Interactive UIs (Claude Desktop)

These tools open a real chess board inside the chat β€” drag pieces, navigate moves, and click through opening trees β€” using the MCP Apps extension. In clients without UI support, each tool falls back to a text response containing FEN/PGN/Lichess links.

// 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" });

Chess Notation

Move Formats

The Lichess API accepts moves in these formats:

  • UCI: Universal Chess Interface format (e.g., e2e4, g8f6)
  • SAN: Standard Algebraic Notation (e.g., e4, Nf6) - only for some endpoints

FEN Format

The Forsyth-Edwards Notation (FEN) is used to represent chess positions:

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

This represents:

  • Piece positions (from 8th rank to 1st rank)
  • Active color (w/b)
  • Castling availability (KQkq)
  • En passant target square
  • Halfmove clock
  • Fullmove number

Error Handling

The server provides detailed error messages for:

  • Invalid moves or positions
  • Authentication issues
  • Rate limits
  • Resource not found cases

References