Token导航 LogoToken导航TokenDH.com
Chess Support MCP logo
运维云端stdio官方级别未说明来源级核验

Chess Support MCP

MCP Server

一个为LLMs/agents设计的国际象棋游戏状态管理服务器,提供创建/重置游戏、添加移动、检查移动合法性等功能。

工具数

9

提示词数

0

GitHub Stars

3

资源数

0
PythonClaude云端部署Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

danilop

提供方

danilop

最后核验

2026/5/17 20:19

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run pytest -q

详细介绍

国际象棋支持MCP服务器

为LLM/代理管理国际象棋游戏状态的MCP服务器。它故意不建议采取行动。相反,它提供了以下工具:

  • 创建/重置游戏
  • 添加移动(UCI)
  • 列出所有动作
  • 获取最后N个动作
  • 机器友好的板JSON(方形到块的映射) get_status()
  • 检查搬家是否合法
  • 获取状态(FEN、轮到谁、检查、游戏结束、结果)

需求

  • Python 3.13+
  • uv包管理器

直接从GitHub通过uvx运行(无需本地结账)

您可以使用以下命令运行此MCP服务器而无需克隆 uvx 使用Git URL。用您的仓库信息和可选的标签/提交替换占位符。

通用MCP配置(检查器样式):

{
  "servers": {
    "chess-support-mcp": {
      "transport": {
        "type": "stdio",
        "command": "uvx",
        "args": [
          "--from",
          "git+https://github.com/danilop/chess-support-mcp.git",
          "chess-support-mcp"
        ]
      }
    }
  }
}

克劳德桌面 mcpServers 例子:

{
  "mcpServers": {
    "chess-support-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/danilop/chess-support-mcp.git",
        "chess-support-mcp"
      ]
    }
  }
}

第一次运行可能需要更长的时间 uvx 解析并构建包;后续运行使用缓存。

配置为本地MCP服务器(JSON)

使用stdio uv run (没有硬编码路径)。通用JSON配置示例:

{
  "servers": {
    "chess-support-mcp": {
      "transport": {
        "type": "stdio",
        "command": "uv",
        "args": ["run", "chess-support-mcp"]
      }
    }
  }
}

使用占位符并通过以下方式设置工作目录,在不硬编码特定路径的情况下包含项目的本地路径 cwd (首选),或通过 --project:

选项A(首选:设置工作目录):

{
  "servers": {
    "chess-support-mcp": {
      "transport": {
        "type": "stdio",
        "command": "uv",
        "args": ["run", "chess-support-mcp"],
        "cwd": ""
      }
    }
  }
}

选项B(使用uv的项目标志):

{
  "servers": {
    "chess-support-mcp": {
      "transport": {
        "type": "stdio",
        "command": "uv",
        "args": ["run", "--project", "", "chess-support-mcp"]
      }
    }
  }
}

Claude Desktop配置(在JSON设置中),使用 mcpServers:

{
  "mcpServers": {
    "chess-support-mcp": {
      "command": "uv",
      "args": ["run", "chess-support-mcp"],
      "cwd": ""
    }
  }
}

工具(方法)

  • create_or_reset_game() → 重置到初始位置。退货 status (与 pieces 地图),以及 moves.
  • get_status() → 归还FEN; side_to_move (白色/黑色); fullmove_number; halfmove_clock; ply_count; last_move_uci; last_move_san; who_moved_last;检查旗帜; is_game_over; result 当结束时;以及a pieces 机器推理地图。
  • add_move(uci: str) → 如果合法,请采取行动(例如。, e2e4, g1f3,推广类 e7e8q).退货 { accepted, status } 关于成功 movesmoves_detailed.故障返回 { accepted:false, reason:"illegal"|"parse_error", expected_turn? } 随着 status 反映了不变的立场。
  • is_legal(uci: str) → 检查UCI在当前位置移动的合法性。
  • list_moves() → 到目前为止,UCI的所有动作。
  • list_moves_detailed() → 所有动作 ply, side, uci, san.
  • last_moves(n: int=1) → 最后一个N在UCI移动。
  • last_moves_detailed(n: int=1) → 最后N移动 ply, side, uci, san.
  • board_ascii() → ASCII板(可选,以人为本)。正常的API返回机器友好的JSON status.pieces.

API设计说明

  • 在UCI中总是提供移动(例如。, e2e4, g1f3,促销活动 e7e8q).服务器推断侧从位置移动;发送移动时,您永远不会指定白色/黑色。
  • get_status().side_to_move 告诉该轮到谁了。 who_moved_last, last_move_uci,以及 last_move_san 帮助上下文。
  • 详细的搬家清单单独提供 *_detailed 保持基本列表简单和向后兼容的工具。

备注

  • 服务器维护一个内存游戏。
  • 服务器不提供提示或最佳操作。

发展

  • 运行测试:
uv run pytest -q

目录标签

目录标签

PythonClaude云端部署国际象棋本地部署游戏管理LLM工具状态管理API服务

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

9

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP