关于 Chess.com MCP Server
Chess.com MCP Server 通过工具和资源开放 Chess.com 文档所述的公开 API,涵盖棋手、俱乐部、锦标赛和谜题。默认使用 stdio,也支持可选的 SSE 传输,且无需身份验证。
主要功能
- 01获取棋手资料和统计数据
- 02浏览对局、存档和 PGN 下载
- 03查看俱乐部、比赛和锦标赛
- 04获取每日及随机谜题
- 05读取棋手和俱乐部资源
适用场景
- 01查询棋手资料和近期对局
- 02查看锦标赛轮次或俱乐部比赛
- 03获取棋谜用于分析
MCP 相关
该服务通过 30 个 MCP 工具和 7 个资源提供 Chess.com PubAPI 数据。默认使用 stdio,也支持可选的 SSE 传输。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
30收录的工具列表 · 更新于 2 周前
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| username | string | 是 |
详细介绍
Chess.com MCP 服务
这是一个使用 TypeScript 编写的 Model Context Protocol 服务,适用于 Chess.com 公共 API。它无需身份验证即可通过 30 个工具和 7 个资源提供 Chess.com PubAPI 中所有已公开文档说明的功能。
从 npm 安装
要求:Node.js 20.9 或更高版本。
直接运行最新发布的软件包:
npx -y chess-mcp-node@latest
默认传输方式为 stdio。该软件包通过 npm 分发,注册表元数据发布后,也可以从 VS Code MCP Gallery 安装。
对于 VS Code,请在工作区中创建或打开 .vscode/mcp.json:
{
"servers": {
"chess": {
"command": "npx",
"args": ["-y", "chess-mcp-node@latest"]
}
}
}
发布后,在 VS Code 中搜索 @mcp chess,然后选择 Install,即可从 MCP Gallery 添加服务。
对于 Claude Desktop,请将服务添加到其 MCP 配置中:
{
"mcpServers": {
"chess": {
"command": "npx",
"args": ["-y", "chess-mcp-node@latest"]
}
}
}
从源代码运行
要求:Node.js 20.9 或更高版本。
npm ci
npm run build
npm start
默认的源码运行传输方式为 stdio。如需运行可选的 SSE 传输方式:
# macOS/Linux
MCP_TRANSPORT=sse npm start
# Windows PowerShell
$env:MCP_TRANSPORT = "sse"
npm start
SSE 服务默认监听端口 8000,并提供 /sse、/messages 和 /health。设置 PORT 和 HOST 可覆盖这些默认值。
设置 CHESS_API_BASE_URL 可在开发或测试时覆盖 Chess.com API 基础 URL。
开发
运行测试套件和类型检查器:
npm test
npm run typecheck
使用以下命令生成覆盖率报告:
npm run test:coverage
可用工具
get_player_profileget_titled_playersget_player_statsis_player_onlineget_player_current_gamesget_player_games_to_moveget_player_game_archivesget_player_games_by_monthget_player_live_gamesdownload_player_games_pgnget_player_clubsget_player_matchesget_player_tournamentsget_club_profileget_club_membersget_club_matchesget_tournamentget_tournament_roundget_tournament_round_groupget_team_matchget_team_match_boardget_live_team_matchget_live_team_match_boardget_country_profileget_country_playersget_country_clubsget_daily_puzzleget_random_puzzleget_streamersget_leaderboards
可用资源
chess://player/{username}chess://player/{username}/statschess://player/{username}/games/currentchess://player/{username}/games/{year}/{month}chess://player/{username}/games/{year}/{month}/pgnchess://titled/{title}chess://club/{url_id}
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。