Skip to main content

MCP server for Chess.com API integration

Project description

Chess.com MCP Server

A Model Context Protocol (MCP) server for Chess.com's Published Data API.

This provides access to Chess.com player data, game records, and other public information through standardized MCP interfaces, allowing AI assistants to search and analyze chess information.

https://github.com/user-attachments/assets/3b33361b-b604-465c-9f6a-3699b6907757

Features

  • Access player profiles, stats, and game records
  • Search games by date and player
  • Check player online status
  • Get information about clubs and titled players
  • No authentication required (uses Chess.com's public API)
  • Docker containerization support
  • Provide interactive tools for AI assistants

The list of tools is configurable, so you can choose which tools you want to make available to the MCP client.

Usage

Docker (Recommended)

The easiest way to run chess-mcp with Claude Desktop is using Docker. If you don't have Docker installed, you can get it from Docker's official website.

Edit your Claude Desktop config file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Then add the following configuration:

{
  "mcpServers": {
    "chess": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "pab1it0/chess-mcp"
      ]
    }
  }
}

Running with UV

Alternatively, you can run the server directly using UV. Edit your Claude Desktop config file (locations listed above) and add the server configuration:

{
  "mcpServers": {
    "chess": {
      "command": "uv",
      "args": [
        "--directory",
        "<full path to chess-mcp directory>",
        "run",
        "src/chess_mcp/main.py"
      ]
    }
  }
}

Note: if you see Error: spawn uv ENOENT in Claude Desktop, you may need to specify the full path to uv or set the environment variable NO_UV=1 in the configuration.

Development

Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.

This project uses uv to manage dependencies. Install uv following the instructions for your platform:

curl -LsSf https://astral.sh/uv/install.sh | sh

You can then create a virtual environment and install the dependencies with:

uv venv
source .venv/bin/activate  # On Unix/macOS
.venv\Scripts\activate     # On Windows
uv pip install -e .

Testing

The project includes a test suite that ensures functionality and helps prevent regressions.

Run the tests with pytest:

# Install development dependencies
uv pip install -e ".[dev]"

# Run the tests
pytest

# Run with coverage report
pytest --cov=src --cov-report=term-missing

Available Tools

Player Information

  • get_player_profile - Get a player's profile from Chess.com
  • get_player_stats - Get a player's stats from Chess.com
  • is_player_online - Check if a player is currently online on Chess.com
  • get_titled_players - Get a list of titled players from Chess.com

Games

  • get_player_current_games - Get a player's ongoing games on Chess.com
  • get_player_games_by_month - Get a player's games for a specific month from Chess.com
  • get_player_game_archives - Get a list of available monthly game archives for a player on Chess.com
  • download_player_games_pgn - Download PGN files for all games in a specific month from Chess.com

Clubs

  • get_club_profile - Get information about a club on Chess.com
  • get_club_members - Get members of a club on Chess.com

License

MIT


Project details


Download files

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

Source Distribution

mseep_chess_mcp-0.1.1.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

mseep_chess_mcp-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file mseep_chess_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: mseep_chess_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_chess_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 76504301e3bf097af61639f327c59e081a098c9761fdafc1e845ffbbf83dec9d
MD5 1f68c6baa5d82438d821fa814e7e3389
BLAKE2b-256 a5c0b834b5be15e846eed2b65484d9c2032b998e0d9dbc0ae29009b7a768b087

See more details on using hashes here.

File details

Details for the file mseep_chess_mcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_chess_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b0e81420bf3228a8dfc8b1a377f68d3957201ea182b7079f85af81707eb8072
MD5 f8ffcb437f871a2d832c0fff1ebc75c1
BLAKE2b-256 0c39ea2d747a5ed2dc2996144ceea29d81e1e2065b2fd49a07879e2e42b91168

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page