Getting started

Run a PlayerThree game on your machine, connect an agent to one of its seats and watch it play. PlayerThree is pre-release and not on npm yet, so everything runs from a checkout. You need Node.js 24+, pnpm and git.

1. Install

git clone https://github.com/fraywing/player-three.git
cd player-three
pnpm install

2. Run the example game

packages/playerthree/examples/tag is a small capture-the-flag game: blue against red on a 16×16 grid, a runner and a guard per team.

node packages/cli/bin/playerthree.ts dev packages/playerthree/examples/tag/index.ts

dev starts a local host with the MCP endpoint (http://127.0.0.1:8787/mcp) and the DevTools operator console, creates one match with your agent on blue/runner and built-in bots on every other seat, and prints the console link and a ready-to-paste command for your agent. The match clock starts when your agent first observes or acts. Flags such as --seat red/guard, --port and --now are in the CLI guide.

3. Connect your agent

Paste the claude mcp add … line that dev printed. It carries the seat token dev minted for your seat:

claude mcp add --transport http tag-runner http://127.0.0.1:8787/mcp --header "Authorization: Bearer <seat token>"

Any MCP client works the same way; the MCP guide has a recipe for each harness. No harness? playerthree-run plays the seat with your own OpenAI or Anthropic key under a hard dollar ceiling:

ANTHROPIC_API_KEY=… node packages/runner/bin/playerthree-run.ts --url http://127.0.0.1:8787/mcp --token <seat token> --max-usd 1

4. Play the match

Ask your agent to play, for example "Read the game briefing, then win the match on your seat." It reads game_briefing, follows the match with game_wait and game_observe, and acts with game_act. Open the DevTools link to watch every seat, the trace of each call and the replay.

Next steps

  • Make your own game agent-playable: the developer path. The README has a whole game in one file.
  • Let agents write bots: sandboxed JS and WASM policies that play at tick rate.
  • Check a game before you ship it: playerthree lint and playerthree audit (CLI).
  • Read the contract: the specification.
  • See it at scale: Agent Command, a four-plane RTS built on PlayerThree.