gap
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gapplay a game of chess against yourself"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Game2AgentProtocol (GAP)
A minimal protocol that lets any local AI agent play any turn-based game, served over MCP so it works out of the box with Claude Code, Claude Desktop, Cursor, OpenAI Agents SDK, LangChain — anything that speaks MCP. Two independent agents can sit at one table and play each other, with hidden information (poker hole cards) properly scoped.
Docs: RESEARCH.md (landscape research + why this design) · MEMORY.md (state + next steps) · AGENTS.md / CLAUDE.md (instructions for AI coding agents).
The protocol (GAP v0.2)
A game is agent-playable when it implements three verbs (gap.py):
Verb | Meaning | Returns |
| start a fresh game |
|
| current state, from one seat's viewpoint |
|
| apply one action (a string) |
|
Every Observation carries: state_text (LLM-readable board), legal_actions
(the only strings act accepts), turn, seat, done, result, and
structured (machine extras like FEN). Illegal actions fail with the legal
list in the error — agents self-correct instead of derailing.
Adapters (adapters.py): chess (python-chess), tic-tac-toe (stdlib), and poker (No-limit Texas Hold'em via PokerKit — hidden information: each seat only ever sees its own hole cards).
Related MCP server: Haven League
MCP tools
list_games · reset(game, table) · join(table, seat) →
secret seat_token · observe(table, seat_token) ·
act(table, action, seat_token) · wait_turn(table, seat_token, timeout_s)
(blocks until it's your turn — the turn-arbitration primitive).
Quickstart — solo agent (stdio)
uv sync && uv run python test_gap.py # self-check
claude mcp add gap -- uv run --directory /path/to/Game2AgentProtocol game2agent
claude "play a game of chess against yourself using the gap tools"(Claude Desktop: same command under mcpServers in its config.)
Two agents, one table (shared HTTP server)
game2agent serve # one shared server at http://127.0.0.1:8423/mcpIn each agent's session:
claude mcp add --transport http gap http://127.0.0.1:8423/mcpEach agent runs the same loop: join(table, seat) once, then
wait_turn → pick from legal_actions → act, until done. The server
blocks the waiting seat (no polling), enforces turn order, and scopes
observations per seat — poker opponents never see your cards.
Design decisions
MCP, not a new wire protocol. Transport, discovery, and auth are solved; GAP only standardizes the game-facing shape (observation + legal actions + seating). Full rationale in RESEARCH.md.
Turn-based blocking. The game waits for the agent — how every serious LLM×games project (Cradle, VideoGameBench) handles the latency gap between LLM inference (seconds) and game ticks (milliseconds).
Seat tokens, not player ids.
joinmints a secret token; private state and turn rights hang off it, so seats can't be spoofed.Server-side validation.
legal_actionsin, clean errors out — cuts hallucinated moves to a retry instead of a crash.
Roadmap
Publish: PyPI (
uvx game2agent) + official MCP Registry listing.Multi-hand poker (button rotation, configurable stakes/seats).
OpenSpiel or TextArena bridge adapter — ~70 games in one stroke.
Real-time games via the planner/controller split: GAP carries high-level intents; a fast game-side controller (mod, RCON, scripted macros) executes.
Available Tools
6 toolsactA
Play one action (must be in your legal_actions). Returns your new observation.
On a table with claimed seats you must pass your seat_token, and it must be
your turn.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| action | Yes | ||
| seat_token | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It reveals key prerequisites (action legality, turn requirement, seat_token) and the return value (new observation). However, it does not describe error behavior for invalid actions, whether the action is irreversible, or any side effects beyond changing the game state, which is implied but not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no filler. The first sentence states the purpose and return value, the second captures a conditional requirement. It is compact, front-loaded, and every phrase earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple action-execution tool with three parameters and no output schema, the description covers the essential operational context: legality, turn enforcement, seat_token handling, and the returned observation. It assumes domain knowledge about legal_actions and table identity, which is reasonable given the sibling tool set, but it could have briefly clarified the table parameter or mentioned error handling for invalid actions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning to 'action' (must be in legal_actions) and 'seat_token' (required on claimed seats), which is valuable. However, 'table' is left undefined, and there is no detail on the format or possible values of 'action', leaving a partial semantic gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Play one action' clearly indicates the tool executes a game action. It also specifies that the action must be in your legal_actions and that it returns a new observation, making the tool's core function unambiguous and distinct from siblings like observe or wait_turn.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool: it must be your turn, and on claimed seats you must pass your seat_token. It does not explicitly name alternative tools or exclusion scenarios, but the turn and seat-token conditions effectively guide an agent to use this tool for active gameplay rather than observation or waiting.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
joinA
Claim a seat at a table (a specific one, or the next open one).
Returns your secret seat_token — pass it to wait_turn/observe/act. Your
observations are scoped to your seat (hidden information stays hidden).
| Name | Required | Description | Default |
|---|---|---|---|
| seat | No | ||
| table | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that the returned token is secret, that observations are seat-scoped, and that hidden information remains hidden. This goes well beyond a bare 'join' statement, though it does not mention failure cases such as joining a full table.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded, with no filler. Every sentence adds useful information: the action, the return value, the token usage, and the scoping behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter tool with no output schema and no annotations, the description is quite complete. It covers purpose, return value, token propagation, and information-scoping. Minor gaps like error conditions or table full behavior prevent a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It clarifies that 'table' identifies the table and 'seat' is optional because the tool can pick the next open one. However, it does not define the expected value formats or how table/seat identifiers should be specified.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Claim a seat at a table', and clarifies the two modes of use ('a specific one, or the next open one'). It also differentiates this tool from siblings by explaining the returned seat_token and its role with wait_turn/observe/act.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes the intended workflow clear: join first, then pass the seat_token to wait_turn/observe/act. It does not explicitly contrast with list_games or reset, but it gives enough context for an agent to understand when join is the appropriate entry point.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_gamesA
List available games (with action grammar), active tables, and their open seats.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of explaining behavior. It clearly indicates this is a read-only inspection tool that returns available games, action grammar, active tables, and open seats, which is sufficient for a simple listing operation. It does not detail internal state changes, but 'list' strongly implies no side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One concise, front-loaded sentence that covers the tool's purpose and output without redundancy. Every element earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, simple listing tool, the description gives enough context: it enumerates the key categories of returned information. It could be slightly more specific about what 'action grammar' means, but this is a minor gap given the low complexity and absence of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema is empty, so no parameter documentation is needed. The description correctly focuses on output content rather than inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States the specific verb 'List' and resource ('available games', 'active tables', 'open seats'), with an added detail about action grammar. The phrasing distinguishes it from siblings like act, join, and observe, which are actions rather than discovery.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is the tool for discovering what games and tables exist before joining or observing, but it does not explicitly state when to use it versus siblings. No exclusions or alternative routing are provided, leaving the agent to infer context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
observeB
Current observation for a table — seat-scoped if you pass your seat_token.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| seat_token | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description alone must disclose behavioral traits. It does mention the key conditional behavior (seat-scoping via seat_token) and implies a read-only snapshot, but it fails to explain what the observation contains, whether it has side effects, error conditions, or how the result is structured. This is a significant gap for a tool with no annotation safety net.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one concise sentence with information front-loaded: 'Current observation for a table' comes first, followed by the optional seat-scoping nuance. There is no filler or repetition. It is grammatically a noun phrase rather than a full sentence, but it remains efficient and scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with only two parameters and no nested output schema, so the bar for completeness is lower. The description covers the core operation and the one meaningful parameter behavior. Still, an agent would not know what the observation looks like, whether it is mutable, or what happens when seat_token is omitted versus supplied, so some gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does add meaning to seat_token by explaining it changes the observation to be seat-scoped. However, the table parameter is left at the schema's bare title 'Table', with no format, allowed values, or relationship to the sibling list_games. The compensation is partial at best.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the resource ('a table') and the action ('Current observation'), which maps directly to the tool name 'observe'. It also distinguishes the optional seat-scoped mode from the default table-level observation, setting it apart from siblings like join/act/wait_turn. However, it lacks an explicit verb like 'get' or 'retrieve', so it stops just short of a perfect clarity score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool: when you need the current observation of a table, optionally seat-scoped by passing seat_token. It does not explicitly state when to avoid it or point to alternatives such as list_games or wait_turn. The usage context is clear enough for a simple read operation, but exclusions are missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resetA
Start a fresh game on a table and return the initial observation.
table names the session so several games can run concurrently (defaults to
the game name). Solo play: just call act() next. Multi-agent play: each
agent calls join() to claim a seat, then loops wait_turn() -> act().
| Name | Required | Description | Default |
|---|---|---|---|
| game | Yes | ||
| table | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. 'Start a fresh game' conveys that reset creates a new session and effectively replaces prior table state, and 'return the initial observation' sets output expectations. It adds session-scoping context via table, though it does not spell out permissions or behavior if the table already has an active game.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences deliver the core action first, followed by table semantics and then the solo/multi-agent flow. Every sentence contributes actionable information without repetition, and the line break makes the workflow easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The definition explains the entry point, return value, table/session scoping, and the exact next tools for solo and multi-agent play, so the agent can call reset correctly. It lacks only minor details like error behavior for occupied tables or an explicit pointer to list_games for valid game names. Given there is no output schema, the 'initial observation' return is stated but not structurally detailed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only types and titles with 0% description coverage, so the description must compensate. It clearly defines table as a session name that defaults to the game name, but game is only indirectly described as the game being started; there are no valid game-name examples or an explicit pointer to list_games for discovery. This is partial but not complete compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence pairs an action verb ('Start a fresh game') with a specific resource ('on a table') and return value ('initial observation'). This clearly differentiates reset from siblings: observe/act/wait_turn operate within an existing game, join claims a seat, and list_games enumerates options.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives an explicit call sequence: after reset, solo play proceeds to act(), multi-agent play requires each agent to join() then loop wait_turn() -> act(). It also explains when the table parameter matters, so the agent can decide whether to pass it. The workflow guidance is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_turnA
Block until it is your seat's turn (or the game ends, or timeout).
On timeout the observation comes back with your_turn=false — just call
wait_turn again. Keep timeout_s below your client's tool timeout.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| timeout_s | No | ||
| seat_token | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully carries the behavioral disclosure. It clearly reveals the blocking nature, the timeout result (your_turn=false), and that re-calling is safe. It does not describe failure modes like invalid seat_token, but core runtime behavior is well specified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short, purposeful sentences. The core purpose is front-loaded, followed by actionable timeout handling and a practical caveat. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers the main wait-retry loop, timeout semantics, and the critical timeout_s constraint. It does not explain where seat_token comes from or the exact game-end observation, but these are minor for a simple blocking tool with a clear sibling set (join provides the token).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaningful guidance for timeout_s ('keep below your client's tool timeout') but says nothing about table or seat_token beyond their self-explanatory names. Since two of three parameters lack semantic elaboration, the description falls short for low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Block'), the resource ('your seat's turn'), and the three exit conditions (turn, game end, timeout). This makes it immediately distinguishable from siblings like observe or act, which are non-blocking state reads/writes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly advises calling wait_turn when it is not your turn, and instructs to call it again on timeout. It also gives a concrete usage constraint to keep timeout_s below the client's tool timeout. It does not name alternatives, but the context strongly implies when this tool is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.2.0- First observed
act - First observed
join - First observed
list_games - First observed
observe - First observed
reset - First observed
wait_turn
TDQS
Scored across 6 tools
Each tool targets a distinct operation: reset starts a game, join claims a seat, observe reads state, act changes state, wait_turn blocks for turn changes, and list_games enumerates available games and tables. There is no meaningful overlap or ambiguity between their purposes.
Tool names are all lowercase imperative verbs, with compound names using snake_case (wait_turn, list_games). The style is consistent and readable, though bare verbs like act and observe are less descriptive than verb_noun patterns.
Six tools form a well-scoped set for a game-session server: setup, joining, turn handling, acting, observing, and discovery. Nothing feels redundant or missing at the count level.
The core game lifecycle is covered: create/start, join, observe, act, wait, and list. Minor gaps exist such as no explicit leave/seat-release or table-close operation, but agents can work around them using the available surface.
Maintenance
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
Read-only MCP server for the OPERANT AI operating-agent calibration benchmark.
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExpose any Gymnasium environment as an MCP server, automatically converting the Gym API into MCP tools that any agent can call via standard JSON interfaces.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables human coaches to train AI agents to play Monopoly, with MCP tools for game actions, match hosting, and AI commentary.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP agents to play chess locally, supporting join, state, legal moves, and move execution with per-session color ownership.MIT
- FlicenseNot gradedqualityCmaintenanceMCP server for playing turn-based games like tictactoe against other AI agents, with shared state on a server and live-viewable matches.-