Skip to main content
Glama

Lichess MCP

Habla con Lichess en lenguaje natural para interactuar con la plataforma de ajedrez. Úsalo con Claude Desktop para jugar partidas, analizar posiciones y gestionar tus actividades de ajedrez.

Construido utilizando el Model Context Protocol.

El servidor permite:

  • Gestionar tu cuenta de Lichess

  • Jugar partidas de ajedrez y retos

  • Analizar posiciones y partidas

  • Unirse a torneos y equipos

  • Interactuar con otros jugadores

Configuración

El token de la API de Lichess se puede configurar de dos maneras:

  1. Variables de entorno: Añádelo a tu archivo .env en la raíz del proyecto o configúralo directamente:

    LICHESS_TOKEN=your-lichess-api-token
  2. Usando la herramienta set_token durante la ejecución:

    set_token({
      token: "your-lichess-api-token"
    });

El token se puede generar en https://lichess.org/account/oauth/token

Related MCP server: Lichess MCP

Herramientas disponibles

1. Gestión de cuenta

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

// 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. Análisis de partidas

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

// 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. Interfaces de usuario interactivas (Claude Desktop)

Estas herramientas abren un tablero de ajedrez real dentro del chat —arrastra piezas, navega por los movimientos y haz clic en los árboles de apertura— utilizando la extensión MCP Apps. En clientes sin soporte de interfaz de usuario, cada herramienta vuelve a una respuesta de texto que contiene enlaces 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" });

Notación de ajedrez

Formatos de movimiento

La API de Lichess acepta movimientos en estos formatos:

  • UCI: Formato de Interfaz de Ajedrez Universal (ej., e2e4, g8f6)

  • SAN: Notación Algebraica Estándar (ej., e4, Nf6) - solo para algunos endpoints

Formato FEN

La Notación Forsyth-Edwards (FEN) se utiliza para representar posiciones de ajedrez:

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

Esto representa:

  • Posiciones de las piezas (desde la octava fila hasta la primera)

  • Color activo (w/b)

  • Disponibilidad de enroque (KQkq)

  • Casilla objetivo de peón al paso

  • Reloj de medio movimiento

  • Número de movimiento completo

Manejo de errores

El servidor proporciona mensajes de error detallados para:

  • Movimientos o posiciones no válidos

  • Problemas de autenticación

  • Límites de tasa

  • Casos de recursos no encontrados

Instrucciones de instalación

Instalación a través de Smithery

Para instalar Lichess Integration para Claude Desktop automáticamente a través de Smithery:

npx -y @smithery/cli install @karayaman/lichess-mcp --client claude

Instalación manual

  1. Clona el repositorio:

    git clone https://github.com/karayaman/lichess-mcp.git
    cd lichess-mcp
  2. Instala las dependencias:

    npm install
  3. Configura las variables de entorno: Crea un archivo .env en el directorio raíz:

    LICHESS_TOKEN=your-lichess-api-token
  4. Construye el proyecto:

    npm run build
  5. Instala el paquete globalmente (recomendado para la integración con Claude Desktop):

    npm install -g
  6. Inicia el servidor (para uso independiente):

    npm start

Configuración de Claude Desktop

Para usar este servidor MCP con Claude Desktop:

  1. Localiza tu archivo de configuración de Claude Desktop:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    • Linux: ~/.config/Claude/claude_desktop_config.json

  2. Añade el servidor Lichess MCP a tu configuración:

    {
      "mcpServers": {
        "lichess": {
          "command": "lichess-mcp",
          "env": {
            "LICHESS_TOKEN": "your-lichess-api-token",
            "DEBUG": "*"
          }
        }
      }
    }

    Nota: Reemplaza your-lichess-api-token con tu token real de la API de Lichess. La variable de entorno DEBUG es opcional pero útil para solucionar problemas.

  3. (Opcional) También puedes añadir otros servidores 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"
          }
        }
      }
    }
  4. Reinicia Claude Desktop para aplicar los cambios.

    • Asegúrate de cerrar completamente Claude Desktop (incluyendo desde la bandeja del sistema/barra de menús)

    • Inicia Claude Desktop de nuevo

    • Busca un icono de martillo en la interfaz, lo que indica que los servidores MCP están conectados

  5. Prueba la integración preguntando a Claude sobre tu cuenta de Lichess:

    • "Show me my Lichess profile"

    • "Start a new chess game with 10 minutes time control"

Solución de problemas

Si encuentras problemas con la conexión del servidor MCP:

  1. Asegúrate de haber instalado el paquete globalmente con npm install -g

  2. Verifica que el comando lichess-mcp esté disponible en tu PATH (which lichess-mcp)

  3. Comprueba que tu archivo de configuración tenga el formato correcto (el formato más nuevo mcpServers en lugar de mcp_servers)

  4. Reinicia Claude Desktop completamente

  5. Intenta habilitar el Modo Desarrollador en Claude Desktop (si está disponible) para obtener registros adicionales

  6. Verifica que tu token de la API de Lichess sea válido

Referencias

Available Tools

88 tools
abort_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

    C2.9/5.0

    Scored across 88 tools

    Disambiguation4/5

    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.

    Naming Consistency5/5

    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.

    Tool Count2/5

    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.

    Completeness5/5

    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

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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
    • A
      license
      A
      quality
      D
      maintenance
      Connects 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.
      28
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that exposes Stockfish chess analysis to LLM chat clients, enabling move analysis, game review, and explanation of engine choices.
      -
    • A
      license
      A
      quality
      D
      maintenance
      MCP 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.
      8
      MIT