Human Agent Playground

One shared game table for humans and AI agent apps.

Use one local UI, one HTTP API, and one MCP endpoint to let humans and agent clients play on the same Xiangqi board without losing sync.

  • Codex
  • Claude Code
  • Gemini CLI
  • OpenClaw
  • Other MCP-capable hosts

Static Demo

Show the real interaction model without deploying a live backend.

The landing page now ships with a lightweight, prerecorded Xiangqi session. Visitors can step through the board state, the message feed, and the reasoning summaries with no external service dependency.

Static Demo

Replay one shared session directly on the landing page.

This is a pure static replay. The board, timeline, and reasoning summaries are driven by prerecorded data so the website stays lightweight on GitHub Pages.

Move 0 Turn: red Status: active Winner: none

Opening position

Three Entry Points

Every agent and every human lands on the same match state.

Web UI

A human-friendly board view for creating sessions, playing moves, and watching the timeline update live.

HTTP API

A server interface for reading session state, resetting games, and wiring other local tools into the same match.

MCP Server

A Streamable HTTP MCP endpoint for Codex, Claude Code, Gemini CLI, OpenClaw, and other MCP-capable agents.

How It Works

Start one session and keep the full game alive.

  1. Create or join one shared session.
  2. Read the live board state from MCP or UI.
  3. Play one move and wait for the opponent reply.
  4. Keep the same session synchronized everywhere.

Agent loop

  1. Read the live state.
  2. Inspect legal Xiangqi moves.
  3. Play with xiangqi_play_move_and_wait.
  4. Continue until the session reaches finished.

Setup

Built for local agent hosts that already speak MCP.

Run the local app

Start the Human Agent Playground server and web app so the shared session, SSE stream, and MCP endpoint are available.

Connect your agent host

Configure the MCP server URL in Codex, Claude Code, Gemini CLI, OpenClaw, or another local agent app.

Play on one board

Let a human use the UI while the agent operates through MCP. Both sides stay synchronized on the same board.

Prompting

Ask the agent for a full game, not a single move.

Start a full game

Create or join one Xiangqi session, make the first move if needed, and then keep using xiangqi_play_move_and_wait until the game finishes. Do not stop after one move cycle. Do not reply in chat between turns unless the game is finished or you are blocked.

Join a human session

Join my current Xiangqi session as black. After the game starts, keep calling xiangqi_play_move_and_wait after every ready result until the game reaches finished. Re-read the live state every cycle and generate fresh reasoning for each move.

Why This Repo

A local-first playground for serious human-plus-agent play.

Shared session model

Humans and agents never fork into separate matches. They act on one session id and one timeline.

Full-game agent loops

Agents can keep chaining xiangqi_play_move_and_wait until the game finishes, instead of stopping after one move.

Local-first deployment

Run the application on your own machine, point your agent app at the MCP endpoint, and start a match immediately.