Chess in your terminal,
right beside Claude.

A Claude Code plugin: a board pane next to the chat, an engine compiled to native code with Perry, and online games against other people. Ask Claude about your position while you play.

/plugin install chess --marketplace skelpo/chess

Then type /chess. Needs Claude Code 2.1.316 or later.

Black to move.
Engine Perry native
depth 4 · 12,785 nodes · 31 ms

1. e4 e5
2. Nf3 Nc6
3. Bb5

[ New ] [ Undo ] [ Hint ]

High scores

Wins in online games. Only games of at least 10 half-moves count.

#PlayerWonLostDrawn
Loading…

Install

  1. In Claude Code (2.1.316 or later), run /plugin install chess --marketplace skelpo/chess.
    On older versions: /plugin marketplace add skelpo/chess, then /plugin install chess@skelpo-chess.
  2. Type /chess. The board opens in a pane.
  3. For the board beside the chat instead of below it, switch Claude Code to its fullscreen layout: /tui fullscreen. There you can also click the board.

Update later with /plugin marketplace update skelpo-chess and /plugin update chess@skelpo-chess.

Docs

Playing

Type moves as coordinates (e2e4, e7e8q) in the pane's move field, or use its menu: New game, Undo, Hint, Flip, Easier, Harder, Engine, Play online. ctrl+x tab gives the pane the keyboard, Tab walks the menu, Esc returns to the prompt. You can also play from the prompt: /chess e2e4, /chess undo, /chess hint.

Board keyAction
Arrows, EnterMove the cursor, pick, play
q r b nPromotion piece
u n hUndo, new game, hint
f gFlip, glyphs or letters
+ -Engine level

Board keys work after clicking the board, in the fullscreen layout.

CommandStarts
/chessOpens the board
/chess black 7As Black, level 7 of 10
/chess bothTwo players, no engine
/chess fen <FEN>From a position

Claude plays along

Claude sees the same game through its tools, so you can ask "what should I play here?", "why was that a mistake?", or have it move for you. Its tools: chess_new_game, chess_move, chess_show, chess_legal_moves, chess_hint, chess_engine_move, chess_undo, chess_claim_draw, chess_settings. During an online game Claude stays out of it.

Online

The engine

The engine is plain TypeScript with no dependencies. The plugin runs it as a native executable compiled by Perry, which starts in about 10 ms, so every engine move and hint is a fresh native process outside Claude Code. The online server is the same: one TypeScript file, compiled by Perry, running here.

Other agents (MCP)

The same tools are available to opencode, Cursor and any other MCP client as a local stdio server, either from source or from the native binary:

node mcp/src/server.ts            # Node 22.18+
chess-engine-<os>-<arch> mcp      # Perry native, no Node

API

The online server is https://api.tuichess.dev: HTTP and JSON with long polling. Authenticated calls send Authorization: Bearer <token>.

EndpointPurpose
POST /v1/registerBody {"name"}. Claims a username, returns {"name", "token"}.
GET /v1/state?since=<n>Everything one player sees: online players, challenges, the game, the high scores. Held up to 25 s until something changes.
POST /v1/actionqueue, unqueue, challenge / accept / decline with name, cancel, move with uci, resign, draw, leave.
GET /v1/leaderboardThe high scores. No token needed.
GET /healthok
curl -s https://api.tuichess.dev/v1/leaderboard