Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

♟️ Chess MCP Server

PyPI version

Give your AI Agent eyes to see the board and hands to make the move.

This is not just a chess API. It's a Model Context Protocol (MCP) server designed to let Large Language Models (LLMs) like Claude play chess agentically.

Capable of visualizing the board in real-time HTML, understanding spatial relationships via Markdown, and challenging you with a hybrid difficulty engine (Levels 1-10)—or simply facilitating a game between you and your Agent.

🚀 Features

  • MCP-UI Support: Interactive HTML board embedded directly in the chat (where supported).
  • Hybrid AI Engine: Adjustable difficulty from "Random Blunderer" (Level 1) to "Minimax Master" (Level 10).
  • Agent vs. Agent: Let two AI personalities battle it out.
  • Web Dashboard: Automatically launches a local sidecar dashboard (http://localhost:8080) to monitor all active games.

🧰 Tools API

Tool Description
createGame Initializes a new chess game session against Computer or another Agent.
joinGame Joins an existing game using its Game ID.
finishTurn Submits a move in UCI format and optionally claims a win.
waitForNextTurn Long-polling tool that waits for the opponent's move.

For full specification, see docs/spec/tools.md.

📦 Installation

Prerequisites

1. Installation

You can install directly from PyPI:

pip install chess-mcp-server

2. Configure MCP Client

Add the following to your MCP Client configuration file (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

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

Alternatively, using pip installation:

{
  "mcpServers": {
    "chess": {
      "command": "python",
      "args": ["-m", "src.mcp_server"]
    }
  }
}

🛠️ Development

If you want to modify the code:

  1. Clone & Setup
    git clone https://github.com/fritzprix/chess-mcp-server.git
    cd chess-mcp-server
    
    python -m venv .venv
    source .venv/bin/activate
    pip install -e .
    

🎮 How to Play

Once the server is connected, you can ask your Agent to start a game.

Start a Game

Ask: "Start a new chess game against the computer at level 5."

  • The Agent calls createGame.
  • Pro Tip: You can also ask "I want to play against YOU. Create a game where you are White."

Join an Existing Game

If you have a Game ID (e.g., from another agent), you can ask: "Join game [Game_ID]".

  • The Agent calls joinGame.

The Game Loop

  1. Your Move:
    • Interact with the HTML Board if shown. Drag your piece and click Confirm.
    • Or tell the Agent: "Move pawn to e4."
  2. Agent's Turn:
    • The Agent calls waitForNextTurn.
    • It sees the board (Markdown or HTML) and thinks about the move.
    • It calls finishTurn to submit its move.
  3. Checkmate:
    • If you deliver the final blow, you can check the "Claim Checkmate" box on the UI or tell the Agent "Checkmate!".

Dashboard

When the server starts, it will try to open http://localhost:8080. You can view the list of all active games and spectator views there.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chess_mcp_server-0.1.17b5.tar.gz (127.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chess_mcp_server-0.1.17b5-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file chess_mcp_server-0.1.17b5.tar.gz.

File metadata

  • Download URL: chess_mcp_server-0.1.17b5.tar.gz
  • Upload date:
  • Size: 127.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chess_mcp_server-0.1.17b5.tar.gz
Algorithm Hash digest
SHA256 2a056c2ddcea2a6d27ed408b7d4b8165bfee0e30ccf47957d5bbb1246bdf3a9a
MD5 212469f4e227ae9850c5f88480545683
BLAKE2b-256 da2a47693563e567a1a2ae362ff4b1ddf4fcd60edd714bb0464f915808f9bbc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for chess_mcp_server-0.1.17b5.tar.gz:

Publisher: publish.yml on fritzprix/chess-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chess_mcp_server-0.1.17b5-py3-none-any.whl.

File metadata

File hashes

Hashes for chess_mcp_server-0.1.17b5-py3-none-any.whl
Algorithm Hash digest
SHA256 03c763e2c18abd14f03d79f47a20cc5cfce84bfb0ee43a5b9ff801bf2ee05f15
MD5 9fe31abc4b859ade3d5c58cf375c492e
BLAKE2b-256 2e3b89ac58444188275e55a500d4a057479a1720106ff22c3b53a1d1b163c358

See more details on using hashes here.

Provenance

The following attestation bundles were made for chess_mcp_server-0.1.17b5-py3-none-any.whl:

Publisher: publish.yml on fritzprix/chess-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.17

2 files

This release

0.1.17b5 This release

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page