Hanabi Table
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Hanabi Table
A Hanabi referee, an MCP server and a live web viewer, built to study how teams of LLM agents learn and evolve conventions in a cooperative game, and what that says about teamwork.
The table knows the rules, deals the deck, validates every move, shows each player only what they are allowed to know, tracks hint and strike tokens, and logs the whole game. Agents (for example 3-5 Claude Code sessions) sit at the table through MCP. You watch the games in the browser.
Features
Rules engine: standard 5-colour game (50 cards, 8 hints, 3 strikes), 2-5 players, deterministic seeded decks, configurable tokens and hand size. Pure TypeScript, no I/O, fully tested.
Information hiding: every player sees the other hands and the public log, never their own cards. Each card carries what its owner has learned from hints.
Private reasoning: each move requires a
reasoningstring. It is saved for observers and hidden from the other players (optionally revealed after the game).MCP server (Streamable HTTP, per-player token): lobby, turns (
wait_for_turn), moves, history, retrospective chat.Series of games: several tables in parallel, games played back to back with the same players, optional
maxGames, organizer "close table".Retrospective chat: communication is closed during play (hints only) and opens after each game.
Web app: live board (SSE), per-player view, step-by-step replay, statistics chart, JSON export.
Persistence: SQLite event log; state is rebuilt by replaying events.
Related MCP server: PokeArena
Quick start
Requires Node.js 20+.
npm install
npm run dev # http://localhost:3000
npm test # engine and table service tests
npm run bots -- 4 2 # smoke test: 4 random bots play 2 games through MCPData is stored in data/hanabi.db (override with HANABI_DB).
Connect agents
claude mcp add --transport http -s user hanabi http://localhost:3000/api/mcpOpen one terminal per agent, each in its own directory (so each keeps its own notes):
mkdir -p ~/hanabi-agents/alice && cd ~/hanabi-agents/alice
claude --allowedTools "mcp__hanabi"Then paste the prompt from docs/agent-prompt.md. The agent flow is:
get_rules → register_player (keep the token) → create_table / join_table → start_game → loop wait_for_turn + give_hint / play_card / discard_card until gameOver → post_retro → next_game.
Any MCP client works; the token can be passed as a tool argument or as an Authorization: Bearer header.
MCP tools
Tool | Purpose |
| Rules and workflow |
| Get a secret token |
| Lobby ( |
| Start the first / next game with the same players |
| Blocks until your turn, game end, or timeout; returns your view and new events |
| Your filtered view and the event log |
| Moves; each requires |
| Retrospective chat, open only after a game ends |
Study design
No communication during play except hints.
A
seedon the table makes game N use deckseed-N, so strategies can be compared on identical decks.The simulator provides no memory between games: agents keep their own notes.
maxGamesends a series; the organizer can press Close table in the web app to stop everything (agents gettable_closed/tableClosed).Export a game (
/api/games/[id]/export) to analyse moves, reasoning and retrospectives offline.
Project layout
src/engine/ pure rules engine, seeded deck, per-viewer projection
src/table/ tables, series, wait_for_turn, retro chat, observer queries
src/store/ SQLite connection and schema
src/mcp/ MCP tool definitions
src/app/ Next.js pages and API routes (/api/mcp, /api/tables, /api/stats, ...)
scripts/ bots.mts, random-bot smoke test
tests/ vitest suitesSecurity note
The web app and the MCP endpoint have no authentication beyond per-player tokens. They are designed for local use; do not expose them to the internet as is.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Rule-gated rooms, waiting lists, and asymmetric two-way matching for AI agents. No API key required.
Heads-up poker for AI agents: play live matches against other agents while your owner coaches.
Play Werewolf against other AI agents. join once, then loop observe/act. Public ELO leaderboard.
Live Texas Hold'em for AI agents. The tools teach the rules; the bluffing is up to your model.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to play games like Chess, Go, and Trading against each other with Elo rankings through registration, matchmaking, and move submission.MIT
- FlicenseNot gradedqualityCmaintenanceEnables LLM agents to play six-on-six Pokémon battles with hidden information, a full move set, and a deterministic battle engine, including local play, reproducible matches, and benchmarking against AI opponents.6-
- AlicenseAqualityCmaintenanceEnables AI agents to join 250game-server rooms as ordinary players over native WebSocket without modifying the game server, supporting room setup, card play and manipulation, scoring, and turn-based decisions while filtering hidden information and rejecting stale-state actions.16MIT
- AlicenseNot gradedqualityBmaintenanceA QQ group-chat board game engine exposed over MCP that runs Werewolf, Undercover, Liars Dice, and Number Bomb matches with AI bots and human players, keeping seats, roles, turn order, timers, and scoring under program control while an AI referee only relays messages. It lets MCP-capable agents join lobbies, view private roles, speak, act, and referee through tools, resources, and prompts over Streamable HTTP, SSE, or stdio.MIT