Chess.com MCP Server

by pab1it0
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides access to Chess.com player data, profiles, statistics, game records, online status checks, club information, and titled player lists through Chess.com's Published Data API.

Chess.com MCP 服务器

Chess.com 的已发布数据 API 的模型上下文协议(MCP) 服务器。

这使得可以通过标准化的 MCP 接口访问 Chess.com 玩家数据、游戏记录和其他公共信息,从而允许 AI 助手搜索和分析国际象棋信息。

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

特征

  • [x] 访问玩家资料、统计数据和游戏记录
  • [x] 按日期和玩家搜索游戏
  • [x] 检查玩家在线状态
  • [x] 获取有关俱乐部和冠军球员的信息
  • [x] 无需身份验证(使用 Chess.com 的公共 API)
  • [x] Docker 容器化支持
  • [x] 为AI助手提供交互工具

工具列表是可配置的,因此您可以选择要向 MCP 客户端提供的工具。

用法

Docker(推荐)

使用Claude Desktop运行 chess-mcp 最简单的方法是使用 Docker。如果你还没有安装 Docker,可以从Docker 的官方网站获取。

编辑您的 Claude Desktop 配置文件:

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

然后添加如下配置:

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

与紫外线一起运行

或者,您可以直接使用 UV 运行服务器。编辑您的 Claude Desktop 配置文件(位置见上文)并添加服务器配置:

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

注意:如果您在Claude Desktop中看到Error: spawn uv ENOENT ,则可能需要指定uv的完整路径或在配置中设置环境变量NO_UV=1

发展

欢迎贡献代码!如果您有任何建议或改进,请提交 issue 或 pull request。

本项目使用uv来管理依赖项。请按照您平台的说明安装uv

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

然后,您可以创建一个虚拟环境并使用以下命令安装依赖项:

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

测试

该项目包括一个测试套件,可确保功能并有助于防止回归。

使用 pytest 运行测试:

# Install development dependencies uv pip install -e ".[dev]" # Run the tests pytest # Run with coverage report pytest --cov=src --cov-report=term-missing

可用工具

玩家信息

  • get_player_profile - 从 Chess.com 获取玩家的个人资料
  • get_player_stats - 从 Chess.com 获取玩家的统计数据
  • is_player_online - 检查玩家当前是否在 Chess.com 上在线
  • get_titled_players - 从 Chess.com 获取有头衔的玩家列表

游戏

  • get_player_current_games - 获取 Chess.com 上玩家正在进行的游戏
  • get_player_games_by_month - 从 Chess.com 获取特定月份玩家的游戏
  • get_player_game_archives - 获取 Chess.com 上玩家可用的每月游戏档案列表
  • download_player_games_pgn - 从 Chess.com 下载特定月份所有游戏的 PGN 文件

俱乐部

  • get_club_profile - 获取 Chess.com 上某个俱乐部的信息
  • get_club_members - 获取 Chess.com 俱乐部的成员

执照

麻省理工学院


You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

通过标准化的MCP接口,提供对Chess.com棋手数据、对局记录、公开信息的访问,让AI助手可以搜索、分析棋谱信息。

  1. Features
    1. Usage
      1. Docker (Recommended)
      2. Running with UV
    2. Development
      1. Testing
    3. Available Tools
      1. Player Information
      2. Games
      3. Clubs
    4. License

      Appeared in Searches

      ID: cyf19u8re9