MCP Chess Server

by jiayao

23 stars
248 downloads
Not rated
GitHub

About

MCP Chess Server lets you play chess against any large language model (LLM) through the Model Context Protocol. It provides a set of tools to manage a chess game, visualize the board, and analyze positions from PGN strings.

Details

Author
jiayao
GitHub stars
23
Downloads
248
Categories
Other

- Play a complete chess game against an LLM.
- Get a board visualization as an image with auto‑flip based on player color.
- List all legal moves for the current player in UCI notation.
- Make moves using Standard Algebraic Notation (SAN).
- Start a new game with configurable player color.
- Find a board position in a PGN string matching a condition (e.g., “bishop on a3”).

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Chess Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Add the server configuration to your MCP client configuration file using uvx as the command and mcp-chess as the argument. Once connected, use the provided tools to start a new game, make moves, get the board visualization, and more.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp chess server": {
            "chess": {
                "command": "uvx",
                "args": [
                    "mcp-chess"
                ]
            }
        }
    }
}

McpServers

{
    "chess": {
        "command": "uvx",
        "args": [
            "mcp-chess"
        ]
    }
}

MCP Chess Server

This MCP let's you play chess against any LLM.

Installation

To use this chess server, add the following configuration to your MCP config:

{
  "mcpServers": {
    "chess": {
      "command": "uvx",
      "args": [
        "mcp-chess"
      ]
    }
  }
}

Usage

Play a game:
Chess starting position with black pieces

A few moves later

Find a position in a PGN for game analysis:

Find a position in a PGN

Available Tools

The server provides the following tools:

get_board_visualization(): Provides the current state of the chessboard as an image. The board orientation automatically flips based on the user's assigned color.
get_turn(): Indicates whose turn it is ('white' or 'black').
get_valid_moves(): Lists all legal moves for the current player in UCI notation (e.g., 'e2e4', 'g1f3'). Returns an empty list if the game is over.
make_move(move_san: str): Makes a move on the board using Standard Algebraic Notation (SAN) (e.g., 'e4', 'Nf3', 'Bxe5'). Returns the move in SAN and UCI, the new board FEN, and game status.
new_game(user_plays_white: bool = True): Starts a new game, resetting the board. By default, the user plays white. Sets the user's color for board orientation. Returns a confirmation message.
find_position_in_pgn(pgn_string: str, condition: str): Finds the first board position in a PGN string matching a condition (e.g., "bishop on a3") and returns an image of that board state. The condition format is "piece_type on square_name". Valid piece types are "pawn", "knight", "bishop", "rook", "queen", "king".

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.