API & MCP

Personal access tokens for the HTTP API and MCP server. Read your sessions, opponents, and analytics; enqueue postflop solves into Explorer. Studio plan required. Mint a key on API Keys.

Authentication

Send the key as a Bearer header. Tokens start with psk_ and authenticate as you — they can read your study data and enqueue solves.

Authorization: Bearer psk_YOUR_TOKEN

Analytics

Shown-hand aggregates over your uploaded sessions. Same auth as the rest of the API. get_opponent_limp_range is also on MCP.

POST https://www.pokerstudy.ai/api/analytics/opponent-limp-range — first-in limp 169-grids from hole cards that went to showdown. Always pass position for a seat-specific range (SB limp ≠ EP limp). Response includes classesByPosition so mixed seats stay split. Optional opponent_id, session_id, table_size, game_type, since, until, limit (1–169, default 30).

curl https://www.pokerstudy.ai/api/analytics/opponent-limp-range \
  -H "Authorization: Bearer psk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"position":["SB"],"table_size":6}'

Sample is showdown-only — limps that folded before showdown are invisible. Do not treat the grid as a complete limp range.

Quickstart

curl https://www.pokerstudy.ai/api/solver/queue \
  -H "Authorization: Bearer psk_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"KK7r SRP","board":"Kh Kd 7h","pot":5.5,"effective_stack":97.5}'

Range lookups for offline solver packs live on the PokerData Ranges API. This token is for your study data and the solver queue.

Connect via MCP

Give Claude (or any MCP client) direct access to your study data. The server speaks the Model Context Protocol over a single HTTP endpoint and authenticates with a token from API Keys.

Server

https://www.pokerstudy.ai/api/mcp — Streamable HTTP, stateless. Auth: Authorization: Bearer psk_YOUR_TOKEN.

  • list_my_sessionsRecent uploaded sessions — id, hero, dates, hands, net.
  • get_session_summaryOne session's headline numbers and HUD stats.
  • list_my_opponentsVillains across your sessions, with note counts.
  • get_opponent_notesRolled-up notes for one opponent.
  • get_opponent_limp_rangeShown first-in limp 169-grid. Pass position — SB limp ≠ EP limp.
  • enqueue_solveQueue a heads-up postflop solve; the dump lands in Explorer.
  • get_queued_solvePoll one queued solve by id — pending, running, done, or failed.
  • list_queued_solvesThis account's solver-queue jobs, newest first.
  • list_library_solutionsFinished solves already in your Explorer library.

Claude Code (CLI)

claude mcp add --transport http poker-study https://www.pokerstudy.ai/api/mcp \
  --header "Authorization: Bearer psk_YOUR_TOKEN"

Claude Desktop / claude.ai (custom connector)

Settings → Connectors → Add custom connector
URL:    https://www.pokerstudy.ai/api/mcp
Header: Authorization: Bearer psk_YOUR_TOKEN

Generic MCP client config (Cursor, Windsurf, …)

{
  "mcpServers": {
    "poker-study": {
      "url": "https://www.pokerstudy.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer psk_YOUR_TOKEN"
      }
    }
  }
}

Smoke test (no client needed)

curl -s https://www.pokerstudy.ai/api/mcp \
  -H "Authorization: Bearer psk_YOUR_TOKEN" \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'