Skip to main content

batru-mcp

A minimal, read-only MCP server over batru.gg's live API, so your LLM can answer Dota 2 / Deadlock / Marvel Rivals draft, counter, synergy, tier-list and win-rate questions with real, calibrated model predictions instead of guessing from memory.

It is a thin wrapper around batru.gg's public endpoints — no model runs locally; every number comes from the same production model the website serves.

Why calibrated matters

batru.gg's model is trained on ~20M real matches and calibrated: a reported 60% win rate corresponds to an empirically observed ~60% win rate. We deliberately do not headline a raw "accuracy" number — accuracy alone is misleading for win prediction. What you get from these tools are probabilities you can trust at face value. The tool descriptions instruct the host LLM to report these numbers verbatim and never invent matchup data.

Tools

Tool What it does
lookup_hero(query, game="dota2") Normalise a name/alias/shortName to {id, displayName, shortName}. game ∈ {dota2, deadlock}.
predict_dota_winrate(my_heroes, enemy_heroes, my_side="radiant") Calibrated win-rate % for both teams (partial drafts OK; empty → 50/50).
recommend_dota_pick(my_heroes, enemy_heroes, my_side="radiant") Top-3 heroes to pick next, each with its calibrated win rate.
get_dota_counters(hero, limit=12) Real matchup table: who this hero beats / loses to, with win rate % and sample size.
get_dota_tier_list(limit=20) Current Dota 2 hero tier list (best-first) with win rate %, pick rate % and sample size.
predict_deadlock_draft(team0_heroes, team1_heroes) Calibrated win-rate % for a Deadlock 6v6 (6 heroes per team).
get_deadlock_tier_list(limit=20) Current Deadlock hero tier list (best-first) with win rate %, pick rate % and sample size.
get_deadlock_counters(hero, limit=12) Deadlock matchup table: who this hero beats / loses to, with win rate % and sample size.
get_marvel_rivals_tier_list(limit=20) Current Marvel Rivals hero tier list (best-first) with win rate %, pick rate % and sample size.
get_marvel_rivals_counters(hero, limit=12) Marvel Rivals matchup table: who this hero beats / loses to, with win rate % and sample size.
get_marvel_rivals_synergy(hero, limit=12) Marvel Rivals best/worst teammates for this hero, by paired win rate % and sample size.
predict_marvel_rivals_draft(team0_heroes, team1_heroes) Calibrated, composition-only win-rate % for a Marvel Rivals 6v6 (6 heroes per team).

Hero names are accepted in any form (e.g. am, anti mage, Anti-Mage) and normalised internally — the backend silently drops names it doesn't recognise, so normalising first keeps predictions honest.

Install

Requires uv (or any way to run a Python 3.12+ package from PyPI):

uvx batru-mcp           # fetches from PyPI and starts the stdio MCP server

Configuration is via the BATRU_API_BASE environment variable (default https://batru.gg) — you normally don't need to set anything.

Claude Desktop config

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "batru": {
      "command": "uvx",
      "args": ["batru-mcp"]
    }
  }
}

Restart Claude Desktop; the batru tools appear in the tool picker. Claude Code: claude mcp add batru -- uvx batru-mcp.

Development

git clone https://github.com/batrugg/batru-mcp && cd batru-mcp
uv sync
uv run batru-mcp        # run the server from the checkout (blocks, waiting on stdin)

For a Claude Desktop pointing at the checkout, use "command": "uv", "args": ["run", "--directory", "/absolute/path/to/batru-mcp", "batru-mcp"].

Tests

uv run pytest            # offline: hero normalisation + draft assembly
uv run pytest -m live    # also hits the real batru.gg API

Prefer programmatic access from Python instead of MCP? pip install batru — the official batru SDK.

Metadata

Release files for batru-mcp 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for batru-mcp 0.2.1
File Size Uploaded
batru_mcp-0.2.1.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for batru-mcp 0.2.1
File Interpreter ABI Platform
batru_mcp-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 kB

Release files / batru_mcp-0.2.1.tar.gz

Download URL batru_mcp-0.2.1.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6aeb97e570f8b234e9d61fd10948fe2052f3bfed23231c38a1adb2264187a91f
BLAKE2b-256 checksum
How to use checksums
a42ae0f877590199742d6606f82637786ddb346ed497d4fdd5808ed4aebde04f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / batru_mcp-0.2.1-py3-none-any.whl

Download URL batru_mcp-0.2.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c79919ba3ad6cf3b2023eeb94ef664df88fe0d1508cff980aa22d3a1aef0dfa
BLAKE2b-256 checksum
How to use checksums
1ca4d509c39609dbac19d7b6e71d28db53f320c47b8556083adfefb5103f1465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page