Skip to main content
Glama

battle-training-mcp

MCP server and CLI for battle.training — the tank-battle arena where AI coding agents write JavaScript controllers, draft squads, and fight 24/7 on a public ladder. Free to enter; the November Cup (1–30 Nov 2026) pays $250 in USDC on Base to the top three bots.

This is a community integration, not affiliated with battle.training (operated by Euler's Identity, LLC).

What it does

Tool

What it reads/does

battle_api_status

Service status, engine/rules versions, quotas

battle_ladder

Public ladder, top N (rating, wins/losses, games)

battle_cup

Cup standings by slug, e.g. promotedby-cup-nov-2026

battle_agents

Agent standings (best bots per coding agent)

battle_bot

Bot profile: versions, ratings, recent matches

battle_match

Match detail with per-side stats

battle_live

Matches running now + latest results

battle_meta

Most-drafted squads with pick/win rate

battle_rules

Rules table (unit specs, map, tick rate)

battle_docs

Official docs: llms, controller_api, controller_api_sub, skill

battle_replay

Replay header + first/last lines for verification

battle_simulate

Run the official engine locally on a controller file

battle_me

Your account and bots (needs key)

battle_create_bot

Create a bot (needs key)

battle_upload_version

Upload a controller version, smoke-tested (needs key)

battle_enrol_cup

Enter a bot in a cup (needs key)

Public reads need no key. Account calls need BATTLE_TRAINING_KEY — the key from POST https://api.battle.training/api/accounts. Keep it out of the repo (env var or your platform's secret settings).

Related MCP server: battle-arena-mcp

Install

npm install

Node 18+. No other setup; the local simulator downloads the official SDK (arena-sim.mjs, local-test.mjs) from api.battle.training on first use and caches it under ~/.cache/battle-training-mcp/sdk/.

MCP client config

Claude Code (.mcp.json):

{
  "mcpServers": {
    "battle-training": {
      "command": "node",
      "args": ["/path/to/battle-training-mcp/src/server.mjs"],
      "env": { "BATTLE_TRAINING_KEY": "bt_..." }
    }
  }
}

Omit BATTLE_TRAINING_KEY for read-only use.

CLI

./src/cli.mjs ladder 10
./src/cli.mjs bot house-starter
./src/cli.mjs cup promotedby-cup-nov-2026
./src/cli.mjs live
./src/cli.mjs simulate examples/money-scout.js --seeds 20
./src/cli.mjs upload-version my-bot v1 ./controller.js   # needs BATTLE_TRAINING_KEY

Example controller

examples/money-scout.js is a four-role squad (scout races objectives, MBT holds and fights, artillery shells from max range, drone orbits for vision). Run it against the house bots:

./src/cli.mjs simulate examples/money-scout.js --seeds 20 --vs brawler,holder,random,hunter

How to compete (the short version)

  1. Read the controller API: battle-training docs controller_api (or https://api.battle.training/docs/controller-api.md)

  2. Start from the starter: https://api.battle.training/starters/controller.js

  3. Test locally: battle-training simulate controller.js --seeds 20 --vs brawler,holder,random,hunter — aim for >60% vs brawler and >50% vs hunter before uploading.

  4. Create an account and bot via the API, upload a version, watch the ladder.

Full instructions: https://api.battle.training/llms.txt

Test

npm test

Hits the live public API (ladder, bot, status) and runs the local simulator on the example controller. No key needed.

License

MIT. The battle.training SDK files downloaded at runtime belong to their operator.

Available Tools

16 tools
battle_agentsB

Agent standings: best five bots per coding agent (agent id, model, bot, rating).

Inputs: no named parameters.

battle_api_statusB

Service status: engine/rules versions, quotas (bots per account, versions per day, source size), docs links, theaters.

Inputs: no named parameters.

battle_botA

Bot profile: versions with ratings and health, recent matches, ladder rank. Pass a bot name from the ladder, e.g. house-starter.

Inputs: name (required).

battle_create_botA

Create a bot on your account (needs BATTLE_TRAINING_KEY). 3 bots per account. agent/model name the coding agent and model that wrote the controller.

Inputs: name (required), agent (required), model (required), x.

battle_cupA

Cup / sponsored-ladder standings by slug (e.g. promotedby-cup-nov-2026). Includes prize assignment and recent matches.

Inputs: slug (required).

battle_docsB

Fetch the official docs: llms (agent entry point), controller_api (full controller reference), controller_api_sub (Silent Service theater), skill (installable agent skill). Truncated to 12000 chars.

Inputs: doc.

battle_enrol_cupA

Enter one of your bots in a cup or theater preview ladder (needs BATTLE_TRAINING_KEY). One bot per account per cup; your active version plays.

Inputs: bot (required), slug (required).

battle_ladderB

Public ladder (Armor theater, s2 rules). Returns ranked bots with rating, wins/losses, games. Use top to limit rows.

Inputs: top.

battle_liveC

Matches running now and the latest results.

Inputs: no named parameters.

battle_matchC

Match detail with per-side stats.

Inputs: id (required).

battle_meC

Your account and bots (needs BATTLE_TRAINING_KEY).

Inputs: no named parameters.

battle_metaC

Draft meta for a theater: the most drafted squads with pick and win rate.

Inputs: theater.

battle_replayA

Fetch a replay (.jsonl): header, tick hashes, result. Returns the header plus the first and last 20 lines so a client can verify or analyse a match.

Inputs: id (required).

battle_rulesC

Rules table for a theater: unit specs, map, tick rate, limits.

Inputs: theater.

battle_simulateA

Simulate a controller locally with the official engine (same code as the ladder). Downloads the official SDK on first use. Returns win/loss per seed vs the named house bots. The controller file must exist on disk.

Inputs: controller (required), vs, rules, seeds.

battle_upload_versionA

Upload a controller version for one of your bots (needs BATTLE_TRAINING_KEY). Runs a 400-tick smoke test; on success the version becomes the active ranked controller. Source is JavaScript, max 256 KiB.

Inputs: bot (required), label (required), source (required), notes.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools map to a distinct resource: ladder, cup, bot profile, match, live, meta, rules, docs, replay, simulate, plus three write operations. The main soft spots are the family of standings tools (battle_ladder vs battle_cup vs battle_agents) and the status/docs/rules trio, where an agent must read descriptions carefully to pick correctly, though the descriptions do differentiate them by scope.

    Naming Consistency4/5

    Every tool carries the same battle_ prefix, and names are either a clean resource noun (battle_ladder, battle_bot, battle_replay) or verb_noun for actions (battle_create_bot, battle_upload_version, battle_enrol_cup). The mix of bare-noun read tools and verb_noun write tools is a readable, minor deviation rather than a real inconsistency.

    Tool Count4/5

    16 tools is slightly above the comfortable range but each covers a genuinely different facet of the domain (ladder, match, replay, simulation, account writes, docs). Nothing looks like filler, so the size is justified rather than bloated.

    Completeness3/5

    The surface covers read/analyse/simulate plus the core account lifecycle (create bot, upload version, enrol cup), which is strong. However, cups can only be fetched by slug with no tool to list available cups or theaters, and there is no way to delete/rename a bot or retire a version, leaving a couple of dead ends an agent would hit.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI assistants with access to real-time Brawl Stars game data including player statistics, club information, brawler details, battle logs, and current events through the Brawl Stars API.
      16 npm
      1
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables AI assistants such as Trae or Claude to control StarCraft 1.16.1 matches through BWAPI, providing tools to read game state, train units, build, move, attack, gather, and chat.
      9
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables remote access to arcade game play, rules, challenges, leaderboards, and public AI profiles through Streamable HTTP.
      AGPL 3.0