Chess.com Mcp 服务器
一个用于Chess.com发布数据API的模型上下文协议服务器。它通过标准化的MCP接口提供对Chess.com玩家数据、游戏记录和其他公共信息的访问,使AI助手能够搜索和分析棋类信息。
概览
什么是棋类MCP?
棋类MCP是一个模型上下文协议服务器,旨在与Chess.com的发布数据API接口。它提供了一种标准化的方式来访问丰富的与棋类相关的数据,包括玩家统计、游戏记录和其他公共信息。这使得开发者和AI助手能够高效地搜索和分析棋类信息,从而更容易构建利用棋类数据的应用程序和工具。
棋类MCP的特点
- 标准化接口:棋类MCP利用标准化的模型上下文协议接口,确保不同应用程序之间对数据的一致访问。
- 综合数据访问:用户可以检索详细的玩家数据,包括排名、游戏历史和表现指标。
- AI集成:该协议旨在促进AI助手的集成,使其能够分析棋类信息并提供见解。
- 公共信息:通过棋类MCP访问的所有数据都是公开可用的,确保开发者和用户的透明性和可访问性。
- 开源:棋类MCP是一个开源项目,允许开发者根据需要贡献、修改和增强该协议。
如何使用棋类MCP
- 设置环境:确保您已安装与Chess.com API交互所需的工具和库。
- 访问API:使用标准化的MCP接口连接到Chess.com数据。这通常涉及向API端点发出HTTP请求。
- 检索数据:利用各种端点获取玩家数据、游戏记录和其他相关信息。
- 分析数据:在您的应用程序中实现逻辑以分析检索到的数据,无论是用于个人使用、AI训练还是其他目的。
- 贡献项目:如果您有改进或功能要添加,请考虑向GitHub上的棋类MCP代码库贡献。
常见问题解答
问:我可以通过棋类MCP访问什么类型的数据?
答:您可以访问各种与棋类相关的数据,包括玩家档案、游戏历史和来自Chess.com的统计信息。
问:棋类MCP是免费使用的吗?
答:是的,棋类MCP是一个开源项目,所有通过它访问的数据都是公开可用的。
问:我可以将棋类MCP与AI应用程序集成吗?
答:当然可以!棋类MCP旨在促进AI集成,使AI助手能够分析并提供基于棋类数据的见解。
问:我如何可以为棋类MCP做贡献?
答:您可以通过在GitHub上分叉代码库,进行更改,并提交拉取请求以供审核来贡献。
问:我在哪里可以找到棋类MCP的文档?
答:文档通常在代码库的README文件中或项目内的专门文档部分中提供。
详情
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 touv
or set the environment variableNO_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.comget_player_stats
- Get a player's stats from Chess.comis_player_online
- Check if a player is currently online on Chess.comget_titled_players
- Get a list of titled players from Chess.com
Games
get_player_current_games
- Get a player's ongoing games on Chess.comget_player_games_by_month
- Get a player's games for a specific month from Chess.comget_player_game_archives
- Get a list of available monthly game archives for a player on Chess.comdownload_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.comget_club_members
- Get members of a club on Chess.com
License
MIT
Server配置
{
"mcpServers": {
"chess-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--pab1it0--chess-mcp--chess-mcp",
"chess-mcp"
],
"env": {}
}
}
}