boardgamearena-mcp
# boardgamearena-mcp
[Board Game Arena](https://boardgamearena.com/) MCP server for Claude. It reads your
tables, whose turn it is, game state and history. For **Can't Stop**, **Pickomino** and
**Downforce** it can advise on a move and, after you confirm, send it.
> This project was developed and is maintained by AI (Claude Code). Use at your own discretion.
## Ranked play: read this first
Board Game Arena's rules treat **outside assistance in RANKED games as cheating**. That
includes advice from this server. Use the advisor and move tools to learn the games, or
at **friendly / unranked tables**. Every advisor and move tool says so in its
description. Every move preview says whether the table is ranked: `unranked` in BGA's
table record, where `"0"` means ranked. When BGA doesn't say, the preview treats the
table as ranked.
## How it works
Board Game Arena has no public API for players. Your session (cookies plus a per-session
request token) lives in your browser, so this server makes no requests of its own.
Every request runs in **your already-signed-in boardgamearena.com tab**, relayed by the
[ContextMint Bridge](https://github.com/nullnet-app/contextmint-bridge) extension over
the fetchproxy bridge (`127.0.0.1:37149`).
## Setup
1. Install the ContextMint Bridge extension and sign in to
<https://boardgamearena.com> in that browser.
2. Add the server to your MCP client:
```json
{
"mcpServers": {
"boardgamearena": {
"command": "npx",
"args": ["-y", "boardgamearena-mcp"]
}
}
}
```
3. Call `bga_healthcheck`. On the first run it returns a pair code. Approve it in the
ContextMint Bridge popup. You only do this once; the pairing persists. After that,
the healthcheck tells you which hop is broken, if any: the bridge, the extension
pairing, or your BGA sign-in.
| Variable | Required | |
|---|---|---|
| `BGA_WS_PORT` | no | Override the fetchproxy WebSocket port (default 37149). |
Nothing else needs configuring. A signed-out browser shows up on the first call, with a
message saying to sign in.
## Tools
| Tool | What it does |
|---|---|
| `bga_healthcheck` | Checks the bridge, the extension pairing and your BGA sign-in, end to end |
| `bga_list_tables` | Your tables in play: game, ranked or not, players, progression and whose turn (`view: "brief"` gives one line per table, your turn first) |
| `bga_get_table` | One table record: status, ranked flag, game server, players, game page URL, and why it ended once archived |
| `bga_get_game_state` | The live state: state name, possible actions and their args, whose turn, scores, plus the game's own fields as BGA sends them |
| `bga_get_history` | The game log as text, newest moves with `last` |
| `bga_cantstop_advise` | Can't Stop: the board per column, the exact chance the next roll busts, the dice choices ranked, and whether to continue or stop (rule of 28 plus the one-roll expectation) |
| `bga_cantstop_choose_dice` | Can't Stop move: pick a dice pairing |
| `bga_cantstop_continue` | Can't Stop move: roll again or stop and save progress |
| `bga_cantstop_confirm_bust` | Can't Stop move: acknowledge a bust |
| `bga_pickomino_advise` | Pickomino: pure maths, no table read. Ranks which face to keep by exact expected worms, and says whether to stop or roll on |
| `bga_pickomino_roll` | Pickomino move: roll the remaining dice |
| `bga_pickomino_take_die` | Pickomino move: keep every die of one face |
| `bga_pickomino_take_tile` | Pickomino move: take a tile from the grill or steal an opponent's top tile |
| `bga_downforce_bid` | Downforce move: bid a card in the auction, or pass |
| `bga_downforce_play_speed_card` | Downforce move: play a speed card |
| `bga_downforce_move_car` | Downforce move: move a car |
| `bga_downforce_decline_move` | Downforce move: decline a movement |
| `bga_downforce_choose` | Downforce move: keep a power, choose a joker colour, bet colour, colour to remove, or the movement order |
| `bga_perform_action` | Any game: send any named action with raw args, as an escape hatch for actions no typed tool covers |
**Moves are confirm-gated.** The first call sends nothing. It returns a preview and a
`confirmToken`: the table, the game, the move, the current state, and whether the table
is ranked. Repeat the call with that token to send the move. A token is bound to the
table's move number, so one approved before the game moved on is refused. Each typed move
tool refuses when it is clearly someone else's turn. If a move gets no answer from BGA,
the result's status is `unknown`: the move may have been played. Re-read the table with
`bga_get_game_state` before you try again.
**Move shapes are not yet live-verified.** The request shape comes from BGA's own web
client and each game's client code, not from a captured move. So make your first move
with each tool at a friendly / unranked table, then check the game page.
Pickomino's moves take a `lastop` argument, the id of the last operation BGA's client
processed. Where BGA exposes it is not verified yet, so the tools take it explicitly.
Reads return player names, table options and game-log text written by other players.
They come back inside an untrusted-data envelope.
The endpoints, request token, envelope and every move action are documented in
[`docs/BGA-API.md`](docs/BGA-API.md).
## Without the server: the `boardgamearena-fpx` skill
[`skills/boardgamearena-fpx`](skills/boardgamearena-fpx/SKILL.md) gives the same reads
from a shell, using the [`fpx`](https://www.npmjs.com/package/@fetchproxy/cli) CLI and a
sourceable helper (`scripts/bga.sh`), with `jq` recipes for each endpoint. It also has
a preview-then-`--send` move helper.
## Development
```sh
npm install
npm run build # tsc --noEmit + esbuild bundle → dist/bundle.js
npm test # typecheck + vitest (all mocked; no network)
npm run typecheck
```
## License
MIT
TDQS
Scored across 19 tools
Tools are namespaced by game (bga_cantstop_*, bga_pickomino_*, bga_downforce_*) and by read verb (list_tables / get_table / get_game_state / get_history), so boundaries are usually obvious from the name alone. The main soft spots are bga_perform_action, which overlaps every typed action tool (mitigated by an explicit 'prefer the typed tools' instruction), and bga_downforce_choose, a catch-all for several distinct Downforce choices that could be confused with the other downforce_* actions.
Every tool uses the same bga_ prefix, snake_case, and a game/domain segment followed by a verb or verb_noun (bga_pickomino_take_die, bga_cantstop_choose_dice, bga_get_game_state). No camelCase or mixed conventions leak into the tool names themselves.
19 tools is slightly heavy, but the count is driven by three separate games each needing its own action set plus a shared read-only core, so each tool has a concrete job. The generic bga_perform_action keeps the surface from growing linearly with every new game, though an agent could reasonably call it heavy for a single game.
The read/inspect layer is solid (list tables, table detail, live state, history, healthcheck) and any uncovered move can be sent via bga_perform_action, so the surface has no dead ends. The gap is asymmetric support: advice helpers exist for Can't Stop and Pickomino but not Downforce, and there is no way to discover or start tables, only to act on ones already in play.