Pokerai API
v0.2.0Browse postflop cache coverage and read Flop, Turn and River GTO strategy for study.
MCP server for the Pokerai API — solver-grade GTO strategy for 6-max No-Limit Hold'em, exposed as tools your LLM agent (Claude, Cursor, Claude Code, …) can call. Ask *"what's GTO for AKs on the button facing a UTG open?"* and the agent gets real presolved frequencies, not a guess. You need a Pokerai API key — get one free at https://pokerai.bet/login.
Summary extracted from the README.
@pokerai/mcp
MCP server for the Pokerai API — solver-grade GTO strategy for 6-max No-Limit Hold'em, exposed as tools your LLM agent (Claude, Cursor, Claude Code, …) can call.
Ask "what's GTO for AKs on the button facing a UTG open?" and the agent gets real presolved frequencies, not a guess.
Setup
You need a Pokerai API key — get one free at https://pokerai.bet/login.
The server runs over stdio via npx, so there's nothing to install globally.
Claude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"pokerai": {
"command": "npx",
"args": ["-y", "@pokerai/mcp"],
"env": { "POKERAI_API_KEY": "gto_your_key_here" }
}
}
}
Claude Code
claude mcp add pokerai -e POKERAI_API_KEY=gto_your_key_here -- npx -y @pokerai/mcp
Cursor
~/.cursor/mcp.json (or Settings → MCP), same shape as the Claude Desktop block above.
Tools
Presolved lookups (spend your presolved quota — 10/mo on the free tier):
| Tool | What it returns |
|---|---|
preflop_versions |
selectable strategy chart sets (free) |
preflop_strategy |
fold/call/raise frequencies for a hand vs an action line |
preflop_range |
the whole 169-hand-type range for a position + line |
flop_tree |
flop decision tree (nodes carry tokens); optional flop_version picks the dataset |
flop_node |
strategy at one flop node (with or without a hero hand) |
Persistent postflop cache:
| Tool | What it returns |
|---|---|
postflop_cache_coverage |
one page of cached Flop presets for a pack and board, free with any valid API key |
postflop_cache_query |
cached Flop, Turn or River strategy and navigation tokens, available to Builder and Pro |
Real-time solver (flop/turn/river) — off by default because it spends the scarce solve quota
(5/mo on the free tier). Enable with POKERAI_ENABLE_SOLVE=1:
| Tool | What it returns |
|---|---|
solve_schedule |
trigger an on-demand solve (costs 1 solve quota) |
solve_tree |
poll the solve + get its nodes |
solve_node |
strategy at one solved node |
node_evs |
per-hand, per-action EVs at a node |
Follow a cached line in Claude
- Ask Claude to call
postflop_cache_coveragewithpreflop_packset to6maxandboardset to2c2d2h. To browse another page, passnext_cursorascursorwith the same pack and exact board spelling. An empty page can have a cursor. Pagination ends whennext_cursorisnull. - Choose one returned item. To read its Flop root, ask Claude to pass that item as the arguments to
postflop_cache_query, optionally addinghole_cardssuch asAdKd. - Follow the action line one step at a time by passing the chosen cached child's
tokenasnode. The response'snodefield is a path for display. Use thetokenfield for requests. When the response is a Flop chance node, pass its owntokenasnodewith the chosen cachedturn_card. Follow Turn actions the same way, then pass the Turn chance token withriver_card. Treat cursors and strategy tokens as private, opaque values.
Each admitted root or new deal spends one cache query, including a cache miss or read failure
after the debit. Passing only a node token, optionally with hole_cards, is free. Ask for a root
or deal explicitly to authorize the lookup. The API returns cache_quota when it has a receipt for
that call. Some errors lack a receipt, so its absence alone cannot establish whether a debit occurred.
HTTP errors are tool errors with a numeric status, API error code, and cache_quota when returned.
404 not_cached means the requested strategy is absent. 410 cache_token_expired means the token
has expired. 429 signals quota or admission limits. 503 and 504 signal a read failure or
timeout. The cache tools send one request per call, with no automatic retries or solver fallback.
Environment
| Var | Purpose |
|---|---|
POKERAI_API_KEY |
required — your key from https://pokerai.bet/login |
POKERAI_ENABLE_SOLVE |
set to 1 to expose the real-time solver tools |
POKERAI_API_BASE |
override the API base (default https://pokerai.bet) |
Notes
- The server authenticates with your key and spends your quota — it holds no shared credential and has no abuse surface of its own.
- stdout is the MCP protocol channel; the server logs only to stderr.
About Pokerai API
Pokerai API provides solver-grade GTO strategy and poker computation APIs for training products, review tools, coaches, researchers, and AI agents.
Free tier: 10 presolved lookups + 5 real-time solves per month.
Real-time assistance (RTA) at real-money tables is prohibited.
- Website: https://pokerai.bet/
- Docs: https://pokerai.bet/docs
- API reference: https://pokerai.bet/reference
- OpenAPI: https://pokerai.bet/openapi.en.json
MIT licensed. Docs: https://pokerai.bet/docs · Reference: https://pokerai.bet/reference