Skip to main content

Poker Coach Engine

A small MCP math engine for a No-Limit Texas Hold'em Poker Coach Agent.

What it does

The MCP server exposes one tool: poker_analyze.

It can return:

  • current hand class
  • Hero equity versus a supplied Villain range
  • fallback equity versus random opponent cards
  • required equity / pot odds for a call
  • call EV relative to folding
  • SPR
  • next-card hand-improvement outs
  • board classification
  • basic legal-action validation

It intentionally does not invent GTO frequencies or final strategy. Your Agent should combine this tool with its poker strategy / GTO knowledge base and opponent model.

Supported range notation (v0.1)

Examples:

AA
77,22,A7s,A2s,AQs,AJs
99+
AJs+
A5s-A2s
76s-54s
AKs
AKo
AK
AhKh
A5s:0.5

A5s:0.5 means the combo class is weighted at 50% when sampled.

Important input definition

pot_before_call means the pot already in the middle after Villain's current bet/raise has gone in, but before Hero calls.

Example:

  • 38 BB is currently in the pot
  • Hero needs 11 BB more to call

Use:

pot_before_call = 38
call_amount = 11

The required equity is 11 / (38 + 11) = 22.45%.

Local install

Requires Python 3.10+.

python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
pip install -e .

Run the MCP server over stdio:

poker-coach-engine

Test the math modules

PYTHONPATH=src python -m unittest discover -s tests -v

On Windows PowerShell:

$env:PYTHONPATH="src"
python -m unittest discover -s tests -v

Build for PyPI

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*

Upload to TestPyPI first if desired, then publish to PyPI.

After it is public on PyPI, Alibaba Cloud Model Studio can launch a Python MCP package through uvx <package-name>.

Bailian MCP config

After publishing the package, use:

{
  "mcpServers": {
    "poker-engine": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "poker-coach-engine"
      ]
    }
  }
}

If PyPI says the package name is already taken, rename [project].name in pyproject.toml, publish using that new name, and put the same new name in the args array.

Safety / scope

This package performs poker math and simulation. It does not interact with poker clients, automate gameplay, obtain hidden cards, or bypass platform rules.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poker_coach_engine-0.1.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poker_coach_engine-0.1.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file poker_coach_engine-0.1.0.tar.gz.

File metadata

  • Download URL: poker_coach_engine-0.1.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.1

File hashes

Hashes for poker_coach_engine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba5f3b10dfa7f0a3479aae693e0a751ae25fe8a2eb875f01bbb07e6b790b2909
MD5 473557f71a7bad9efc4ef62e409c1f77
BLAKE2b-256 5a1ff4fd092333e533f5f8af22d8f141d9e6381ed049c62885b8e0e3857f78c5

See more details on using hashes here.

File details

Details for the file poker_coach_engine-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for poker_coach_engine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0dc65a4a3e01afe13c63fb8aaf8f399cbdc25a65e2ea34ebdd9a6e75e58ac5a3
MD5 516495587ecddcf79a079c186e8a3a82
BLAKE2b-256 c31107346c21ecd45b990b8a4f9e0f815ae1dc13b9ccde0c748c8700bcfcd0a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page