Chess Esca

io.github.AnglerfishChess由 GitHub 账号 AnglerfishChess 发布v0.4.0更新于 Oct 24, 2026

Read chess positions by the rules: legality with its evidence, draws, facts, openings, PGN

已验证STDIO仅桌面

概览

AI 生成的概览

以 JSON 形式提供国际象棋规则:合法性及原因、和棋、局面事实、开局、残局与 PGN,不含引擎与搜索。

可以做什么
  • 读取完整局面:行棋方、将军、状态、带证据的和棋、易位、牵制、子力与残局
  • 列出所有合法着法(SAN 与 UCI),并按吃子、将军、易位、升变、安静着法分组
  • 解释某着是否合法,给出全部原因及依据的格子,或说明它改变了什么
  • 按组报告命名的局面事实、子力形成的残局及理论结论、ECO 开局代码
  • 读写 PGN 棋局,并从你提供的 Polyglot 开局库文件中列出着法
适用场景
当助手需要按规则而非按评估来推理棋局时使用:检查合法性、解释和棋或可主张权利、识别开局与残局,或解析与生成 PGN。它补充而非替代提供评分与最佳着法的引擎服务器。
运行要求
以 PyPI 包形式通过 uvx 在本地以 stdio 运行;需要 Python 3.12 或更高版本以及 uv/uvx。无需参数、认证或环境变量。开局库查询需要你提供 Polyglot .bin 文件路径,未内置任何开局库。
安装前请注意
它不提供评估或最佳着法建议,不适合做引擎式分析。重复局面与五十回合和棋只有在提供到达该局面的着法时才可见,仅凭 FEN 无法判断。开局库查询会读取你指定的文件路径。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Chess Esca,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

chess-esca-mcp

An MCP server over esca: the rules of chess as JSON an agent can read.

FEN and moves go in; enums and the squares behind them come out. Whether a move is legal and why not, what a position's status is and what either side may claim, the named facts of the position, the ending the material makes and what theory says it is, the opening's ECO code, the moves an opening book holds, and PGN read and written. Every categorical answer also carries prose: the same thing in one plain English sentence, beside the enum rather than instead of it.

There is no engine here and no search. Nothing this server answers says how good a move is. For a number and a line, use chess-uci-mcp, which drives Stockfish or Leela; the two answer different questions and sit well side by side.

Dependencies

Python 3.12 or newer, and uv/uvx.

Usage

json
"mcpServers": {  "chess-esca-mcp": {    "command": "uvx",    "args": ["chess-esca-mcp@latest"]  }}

For Claude Desktop that is claude_desktop_config.json, under Settings → Developer → Edit Config:

  • macOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

For Claude Code, the plugin does the wiring:

/plugin marketplace add AnglerfishChess/plugins/plugin install chess-esca-mcp@anglerfish-chess

The server takes no arguments. It reads nothing but the position you hand it and, for book_moves, the book file you name.

Tools

Every tool takes the position the same way: fen (the start position when omitted), moves played from it — each written as SAN (Nf3) or as UCI (g1f3) — or a whole game as pgn instead. variant is classic or chess960. Repetition and fifty-move claims are only visible when the moves that led to the position are given, since a FEN does not carry them.

ToolAnswers
positionThe whole state: side to move, check and its checkers, game status, automatic and claimable draws with their evidence, legal-move count, opening, material, both castlings of both colours with every obstacle, the en-passant offer, pins and skewers, and the ending where the material makes one.
legal_movesEvery legal move in SAN and UCI, each with its role, victim, promotion, check and static exchange, and grouped as captures, checks, castling, promotions, en passant and quiet.
explain_moveWhether one move is legal. If not, every reason at once, each with the squares it was read off. If so, what it changes, the position after it, and the draws it would open.
factsThe named facts of the position, group by group, every value labelled by name and, where it differs between the sides, by colour. groups selects; placement and maps are left out unless asked for.
endingThe ending the material makes: its signature, its class, what theory says the result is, the technique that gets it, and the pawn race, bishops and opposition it was read off.
openingThe ECO code and name of the position, and the deepest named position the line reached.
book_movesThe moves a Polyglot opening book holds for the position, with their weights.
pgnA PGN game read into headers, moves, comments, final position, opening and result.
to_pgnA list of moves written out as a PGN game.

An input that names no position, no move or no game comes back as {"error": {"kind": ..., "message": ..., "hint": ...}} — never a traceback.

One resource, esca://facts-catalogue, lists every fact group and every field it holds, with the type each carries and one sentence of what it means; esca generates it from the fact definitions themselves. One prompt, analyse-position, walks an agent through reading a position with these tools.

Opening books

No book is bundled. book_moves takes the path to a Polyglot .bin file of your own; the format is the common one, so a book written for any engine that reads Polyglot works. esca.polyglot has download(url, path) for fetching one, and a Builder that writes a book from PGN.

Development

The server is a second distribution inside the esca repository: the library at the root, this directory beside it. It takes esca from the crate next door while you work on it, and from PyPI once installed.

bash
git clone https://github.com/AnglerfishChess/esca.gitcd esca/mcp
uv sync --all-groups     # builds the esca extension from ../ and installs it hereuv run --no-sync pytestuvx ruff check . && uvx ruff format --check . && uvx pyrefly check

Run it from the checkout with uv run chess-esca-mcp.

The version is esca's own: one tag releases the library and this server together, and the esca== pin names that same version.

The MCP registry

registry.modelcontextprotocol.io is the index of public MCP servers. The listing is described by server.json, under the name io.github.AnglerfishChess/chess-esca-mcp; ownership of the PyPI package is proven by the mcp-name: marker near the top of this file, which becomes the package description PyPI serves. The registry reads it from the published artifact, so it counts only once a release carrying it reaches PyPI.

Related projects

  • esca — the library this serves.
  • chess-uci-mcp — the engine side: analysis and best moves from Stockfish or Leela.

License

MIT — see LICENSE.

来源:mcp/README.md,提交 5c801e7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.4.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分