Back to MCP directory
publicPublicdnsLocal runtime

chess-mcp

一个为Chess.com公开数据API提供标准化MCP接口的服务,支持查询玩家资料、对局记录等信息

article

README

🚀 国际象棋网MCP服务器

国际象棋网MCP服务器是一个为国际象棋网(Chess.com)发布数据API提供的模型上下文协议(MCP)服务器。借助标准化的MCP接口,该服务器能够访问国际象棋网的玩家数据、游戏记录及其他公开信息,方便AI助手搜索和分析国际象棋相关信息。

链接

✨ 主要特性

  • [x] 可访问玩家个人资料、统计信息和游戏记录
  • [x] 支持按日期和玩家搜索游戏
  • [x] 能够检查玩家在线状态
  • [x] 可获取俱乐部和头衔玩家的信息
  • [x] 无需身份验证(使用国际象棋网的公共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

或者,您可以直接使用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

💻 使用示例

以下是MCP服务器支持的工具列表及简单说明:

  • get_player_profile: 获取玩家个人资料信息。
  • search_games_by_date: 按日期搜索游戏记录。
  • check_online_status: 检查玩家在线状态。
  • get_club_info: 获取俱乐部详细信息。
  • retrieve_titled_players: 获取具有特定头衔的玩家列表。

每个工具都有详细的文档和示例,帮助您轻松集成到项目中。

🔧 技术细节

开发

欢迎贡献!如果您有任何建议或改进,请打开问题或提交拉取请求。

该项目使用 uv 管理依赖项。按照平台说明安装 uv

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

然后创建虚拟环境并安装依赖项:

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

测试

该项目包含一个测试套件,确保功能并防止 regressions。

运行测试:

npm test
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client