Skip to main content
Glama

MCP 国际象棋服务器

这个 MCP 让您可以与任何 LLM 下棋。

安装

要使用此国际象棋服务器,请将以下配置添加到您的 MCP 配置中:

{ "mcpServers": { "chess": { "command": "uvx", "args": [ "mcp-chess" ] } } }

Related MCP server: Lichess MCP

用法

玩游戏: 国际象棋黑棋起始位置

几步之后

在 PGN 中查找用于游戏分析的位置:

在 PGN 中查找位置

可用工具

该服务器提供以下工具:

  • get_board_visualization() :以图像形式提供棋盘的当前状态。棋盘方向会根据用户指定的颜色自动翻转。

  • get_turn() :指示轮到谁了(“白”或“黑”)。

  • get_valid_moves() :以UCI符号列出当前玩家所有合法的走法(例如“e2e4”、“g1f3”)。如果游戏结束,则返回空列表。

  • make_move(move_san: str) :使用标准代数符号 (SAN) 在棋盘上移动一步(例如,'e4'、'Nf3'、'Bxe5')。返回 SAN 和 UCI 中的移动步数、新棋盘 FEN 以及游戏状态。

  • new_game(user_plays_white: bool = True) :开始新游戏,重置棋盘。默认情况下,用户走白棋。设置用户棋盘方向的颜色。返回确认消息。

  • find_position_in_pgn(pgn_string: str, condition: str) :查找 PGN 字符串中第一个符合条件(例如“象在 a3 上”)的棋盘位置,并返回该棋盘状态的图像。条件格式为“棋子类型在方格名称上”。有效的棋子类型包括“兵”、“马”、“象”、“车”、“后”、“王”。

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jiayao/mcp-chess'

If you have feedback or need assistance with the MCP directory API, please join our Discord server