MCP Chess Server

MCP Chess Server

Play chess against any LLM via Model Context Protocol tools.

14
Stars
6
Forks
14
Watchers
3
Issues
MCP Chess Server enables interactive chess gameplay between users and any large language model (LLM) by exposing standardized model context protocol tools. Users can play chess, analyze games from PGN files, and visualize board states through a variety of programmatically accessible functions. The system supports move validation, game state visualization, turn detection, and position finding within PGN strings, making it suitable for both human and automated (AI/LLM-driven) play and analysis.

Key Features

Play chess games against any LLM
Chessboard visualization tool with automatic color orientation
Game state and turn detection
Move validation and legal move listing in UCI notation
Support for Standard Algebraic Notation (SAN) and UCI move formats
Start new games with user color selection
Find and visualize specific positions within PGN files
Integration via standardized MCP configuration
Returns board state as FEN for further analysis
Game status reporting after each move

Use Cases

Enabling large language models to play chess autonomously or interactively
Providing chess game visualization for LLM-powered chess bots or applications
Programmatic validation and listing of legal moves for chess AI development
Starting new games and automating gameplay scenarios
Analyzing chess positions and finding specific states within PGN archives
Integrating chess game logic into LLM-based tutoring systems
Supporting step-by-step chess tutorials with live board visualization
Enhancing chatbots with chess play and analysis capabilities
Testing and debugging chess move processing for AI research
Developing chess coaching tools which interface with LLMs

README

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:

json
{
  "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".

Star History

Star History Chart

Repository Owner

jiayao
jiayao

User

Repository Details

Language Python
Default Branch main
Size 958 KB
Contributors 1
License Apache License 2.0
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • mcp-stockfish

    mcp-stockfish

    A Model Context Protocol server that connects AI systems to the Stockfish chess engine.

    mcp-stockfish provides a server implementing the Model Context Protocol (MCP) to enable seamless integration between AI models and the Stockfish chess engine. It supports multiple concurrent sessions, full UCI command support, and offers both stdio and HTTP server modes. Built for robust, concurrent usage, it handles session and command management, exposes a JSON-based API response, and offers Docker support for easy deployment.

    • 4
    • MCP
    • sonirico/mcp-stockfish
  • MCP Tic-Tac-Toe

    MCP Tic-Tac-Toe

    A Model Context Protocol server for playing and analyzing tic-tac-toe games through standardized tool interfaces.

    MCP Tic-Tac-Toe is a server implementation that provides a complete set of MCP tools for playing, managing, and analyzing tic-tac-toe games. It supports interactions with AI assistants such as Claude, enabling features like creating multiple parallel sessions, making moves, providing strategic analysis, and managing game context. The server is designed for easy integration with clients through various transport methods, including stdio and SSE, and supports seamless AI-human collaboration.

    • 2
    • MCP
    • tomholford/mcp-tic-tac-toe
  • Chess.com MCP Server

    Chess.com MCP Server

    Standardized MCP server for accessing and analyzing Chess.com public data

    Provides a Model Context Protocol (MCP) server that interfaces with Chess.com's public API, enabling AI assistants and applications to access player data, game records, clubs, and titled players through standardized tools. Offers Docker and UV-based deployment, and is configurable to suit specific assistant and client requirements. Supports seamless integration with Claude Desktop and exposes multiple ready-to-use tools for chess data retrieval and analysis.

    • 54
    • MCP
    • pab1it0/chess-mcp
  • Enrichr MCP Server

    Enrichr MCP Server

    Gene set enrichment analysis server for LLMs via the Model Context Protocol

    Enrichr MCP Server provides gene set enrichment analysis using the Enrichr API, supporting all available gene set libraries. It is designed to integrate with LLM tools through the Model Context Protocol and returns only statistically significant results. The tool allows queries across multiple biological, disease, tissue, drug, and pathway gene set libraries, with customizable configuration for popular or specific libraries. Installation and integration is streamlined for platforms like Claude Desktop, Cursor, and VS Code.

    • 7
    • MCP
    • tianqitang1/enrichr-mcp-server
  • mcp-server-chatsum

    mcp-server-chatsum

    Summarize and query chat messages using the MCP Server protocol.

    mcp-server-chatsum is an MCP Server designed to summarize and query chat messages. It provides tools to interact with chat data, enabling users to extract and summarize message content based on specified prompts. The server can be integrated with Claude Desktop and supports communication over stdio, offering dedicated debugging tools via the MCP Inspector. Environment variable support and database integration ensure flexible deployment for chat data management.

    • 1,024
    • MCP
    • chatmcp/mcp-server-chatsum
  • OP.GG MCP Server

    OP.GG MCP Server

    Seamlessly connect OP.GG data with AI agents via the Model Context Protocol.

    OP.GG MCP Server is an implementation of the Model Context Protocol (MCP) designed to provide standardized access to OP.GG data for AI agents and platforms. It enables retrieval of a wide range of real-time data from games like League of Legends, Teamfight Tactics, and Valorant through a unified interface. The server supports integration using MCP-compatible clients and simplifies remote data access for model-based applications. Its flexible tools cover champion statistics, match histories, esports schedules, and in-game leaderboards.

    • 46
    • MCP
    • opgginc/opgg-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results