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/chessThen type /chess. Needs Claude Code 2.1.316 or later.
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.
| # | Player | Won | Lost | Drawn |
|---|---|---|---|---|
| Loading… | ||||
Install
- 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. - Type
/chess. The board opens in a pane. - 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 key | Action |
|---|---|
| Arrows, Enter | Move the cursor, pick, play |
q r b n | Promotion piece |
u n h | Undo, new game, hint |
f g | Flip, glyphs or letters |
+ - | Engine level |
Board keys work after clicking the board, in the fullscreen layout.
| Command | Starts |
|---|---|
/chess | Opens the board |
/chess black 7 | As Black, level 7 of 10 |
/chess both | Two 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
- Play online in the menu (or
onlinein the move field). Pick a username: 3 to 20 letters, digits,_or-, first come, first served. No password or email: the plugin keeps a random token for the name on your computer. - Play anyone pairs you with the next waiting player; whoever waited longer plays White. Or Challenge someone from the online list; they can Accept or Decline.
- No clocks and no chat. Someone gone from a game for 10 minutes loses it. No takebacks or hints online.
- The high scores rank wins, then fewer losses, then more draws. Games shorter than 10 half-moves don't count.
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>.
| Endpoint | Purpose |
|---|---|
POST /v1/register | Body {"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/action | queue, unqueue, challenge / accept / decline with name, cancel, move with uci, resign, draw, leave. |
GET /v1/leaderboard | The high scores. No token needed. |
GET /health | ok |
curl -s https://api.tuichess.dev/v1/leaderboard