跳到正文
FunCoding

dota2.ai — Dota 2 post-match coach

官方 MCP Registry 已收录

Dota 2 post-match coach: reviews a game from its replay, every point backed by checked evidence.

Star
13
版本
v0.1.0
最近提交
2026年12月1日

Most Dota 2 tools stop at end-of-game KDA. dota2.ai downloads and parses your actual .dem replay, investigates your deaths, fights, spell casts, item timings, and objectives through 23 lookup tools, and fact-checks every single clock time, number, and reference in code before showing a word to you — across English, 简体中文, and Русский on Web, DeepSeek Harness Desktop, MCP, and CLI.


One Real Match, End to End

Everything below comes straight from a single real match in this repository — Match #9100904020 (Beastmaster · Patch 7.42 · 42:31) — with every timestamp and figure computed directly from its parsed .dem trace.

1. What a KDA scoreboard hides

On paper, Beastmaster did his job: 16/16 teamfights attended, a +3,565 gold lead at 25:00, a clutch BKB-piercing Primal Roar on Phantom Assassin at 27:27 (stunned 3.4s → kill at 27:38), and a clean 1-for-3 fight at 33:23 without dying. Yet Dire lost at 42:31.

2. What the replay tools actually saw

Instead of guessing from box-score stats, the coach queries the parsed trace. Here is the exact record returned by immunity_windows for the game's turning fight (30:26–30:48):

{
  "ref": "immune:phantom_assassin:3:beastmaster-primal_roar",
  "hero": "phantom_assassin",
  "modifier": "black_king_bar_immune",
  "clock": "30:34",
  "seconds": 7,
  "watched": {
    "state": "on_cooldown",
    "cooldown_left": 66,
    "last_cast": { "clock": "30:25", "target": "necrolyte", "seconds_before": 9.1 },
    "distance": 914
  }
}

One record explains the swing:

  • At 30:34, Phantom Assassin popped a 7-second Black King Bar just 914 units away and dealt 8,524 hero damage — while Dire's only BKB-piercing stun had 66 seconds left on cooldown, because it had gone onto Necrophos 9.1 seconds earlier (30:25).
  • At 36:05 (death:beastmaster:9), Beastmaster died from 2,915 HP with Primal Roar ready and unused (3 deaths total with Roar available; only 4 of 10 Roars hit PA).
  • From 19:00–29:00 (window:beastmaster:2), Dire led by up to +3,565 gold but converted only 1 of 6 won fights (22:57) into a building within 120 seconds, and Beastmaster finished the game without Blink Dagger or Black King Bar.

3. What reaches your screen

Real dota2.ai review for Match 9100904020 Beastmaster: lead verdict, next-game focus rule, clickable replay moments, and replay-backed coach chat
10-hero 2D minimap moment replay at 27:27 with movement trails, cast log, and clock scrubber

10-Hero 2D Moment Replay — second-by-second positions, cast log, playback speed & 1-click Dota 2 client jump (dota_spectator_go_to_time).

Trace-recomputed replay evidence card comparing Beastmaster items against patch 7.42 pro builds with next-game action rule

Trace-Recomputed Evidence Cards — every card is rebuilt directly from the trace (never trusted from LLM prose), with patch-matched pro item context and a concrete next-game rule.

Tip

Try this exact Demo locally in 10 seconds — zero API keys, zero network:

git clone https://github.com/qianhaoq/dota2.ai.git && cd dota2.ai
npm ci && npm run build && npm run preview:mock
# Open http://localhost:4180/r/9100904020?hero=beastmaster

Or inspect it live right now at dota2.ai/r/9100904020?hero=beastmaster.


Full Coaching Suite

Beyond single-match mistakes, dota2.ai connects draft strategy, party play, cross-match habits, and live patch shifts in one workflow:

  • Draft Matchup & 5v5 Win Blueprint — Opens every deep review with a post-draft tactical overview: your draft's strengths and weaknesses, win condition, all 5 allied hero jobs, all 5 enemy threats and counter-play, and 5v5 teamfight execution order — every sentence checked by the same verifyReview gate.
  • 3-Phase Party Match Recap — Whole-team 5-hero recap for Radiant, Dire, or the losing side split across laning (0:00–10:00), midgame (10:00–25:00), and late fights (25:00+). Switch between lighthearted banter and objective analysis with built-in tone guardrails, zero hardcoded blame formulas, and one-click shareable battle recaps.
  • My Dota Cockpit & Cross-Match Player Trends — Bind up to 5 Steam accounts (main + party alts) to turn / into your personal coaching cockpit: latest unreviewed game, pinned Next-Game Focus Card with one-click Focus Check on your next replay, cross-match Recent Habits Snapshot, Practice Log, and automatic cross-match playerTrends context wired into future deep reviews.
  • Live Patch Advisor — Automatically merges Valve's official multilingual patch notes across major and letter releases (7.42 + 7.42a + …) alongside STRATZ rank-bracket pre-/post-patch hero win-rate deltas for patch-grounded Q&A.
My Dota Cockpit: multi-account switcher, latest game review CTA, pinned Focus Card with next-game check, recent habits snapshot, Practice Log, and filterable recent matches

How It Works

dota2.ai architecture: Valve/Perfect World .dem replay distilled into a ~250 KB trace, investigated by 23 progressive lookup tools, gated by deterministic verifyReview code checks, and rendered as trace-recomputed evidence and a cross-match Focus Loop

Four engineering invariants that keep the coach honest

InvariantHow it is enforced in code
Tools give facts; the model judgesNo hard-coded rule picks "the main reason" or "whose fault". The agent receives a factual match_brief and calls 23 lookup tools (parallel batches, up to 28 steps / 60 calls) with compact decision briefs (<= 24 KB per tool, CI-gated in agentToolBudget.test.ts) and full record drill-down via replay_query.
Zero unverified claimsverifyReview (lib/agent/review/verify.js) checks every timestamp, number, item share, and ref against tool outputs from that exact run. Unsupported claims get 1 in-place repair round, then get dropped. DeepSeek DSML tool-call markup is intercepted and never leaks into prose.
Unknown is never falseMissing fields stay null with an explicit gaps entry — never coerced to 0, false, or "none". Every spell effect, item cost, and cooldown matches the exact letter release & mid-release hotfix the game was played on (7.40 through 7.42a).
Evidence is recomputed from the traceExpandable evidence cards and 2D minimap replays are computed directly from the trace (lib/agent/evidence.js), never copied from model output. Vision/fog-of-war claims (sightClaims) are rejected automatically.
Browse all 23 lookup tools
DomainTools
Whole game & macromatch_overview, key_moments, decision_points, economy_and_tempo, siege_report, roshan_report, macro_report
Fights, deaths & wardsfight_report, fight_timeline, game_state, death_context, save_report, ward_report
Abilities & itemsability_audit, skill_build, immunity_windows, item_analysis, power_spikes
Draft & laningdraft_and_timing, lane_report
Full record drill-downreplay_query
Patch, reference & wiki datareference_lookup
Web (reading only, never cited)web_search

Honest boundaries (what it cannot see)

  • Vision / Fog of War — Ward placements are known; who could see whom is not. The coach states distances, never sight.
  • Creep-Wave Equilibrium — Last hits and gold sources are known; exact creep-wave position is not yet extracted (#360).
  • Expired Replays — Valve retains replays for roughly two weeks; older .dem files cannot be downloaded.
  • Coaching Priority — Code verifies facts, not judgment. If a factually accurate finding missed what really decided your game, share it in #164.

Use dota2.ai Everywhere

One pure review engine powers four surfaces — with full English (en), Chinese (zh), and Russian (ru) support across the Web UI, DSH plugin, MCP server, and CLI:

SurfaceBest forSetupAPI KeyLimits
DeepSeek Harness Desktop (Recommended)Regular reviews & full native UIDownload app + paste 1 sentenceYour own (in DSH)None — local & unlimited
Web (dota2.ai)Instant browser try & sharingPaste match ID or friend codeNoneShared daily site cap
MCP ServerCoding & AI assistants1 command or 1-click linkNoneSame hosted daily cap
CLI & HTTP APIScripts, pipelines & custom agentsLocal checkout / curlNonePer-caller rate limit

How long does a review take? Typically ~2 minutes (~45–60s to parse the replay, ~60–90s to investigate and write the review). Slow replay mirrors (primary region capped at 7 minutes with automatic regional/CN Perfect World fallback inside a 14-minute parse budget) or complex 60-minute matches using the expanded investigation budget can take a few minutes longer.

Run the complete dota2.ai review workspace natively inside the DeepSeek Harness desktop app (macOS / Windows) using your own DeepSeek API key — no terminal, no Node.js setup, no queue, and all traces/reviews stay private on your machine.

  1. Install DeepSeek Harness and sign in or add your DeepSeek API Key.
  2. Paste this one message into any chat (auto-installs @qianhaoq/dsh-dota2ai from npm / npmmirror):
    Install the dota2.ai Dota 2 replay coach plugin @qianhaoq/dsh-dota2ai into my active desktop profile, then tell me how to open dota2.ai in the left sidebar.
    
  3. Click dota2.ai in the left sidebar to open the full match review & cockpit page — or ask directly in chat: "Review my Dota 2 match 9100904020 — I played Beastmaster."
Linux / terminal setup (dsh web) & the 6 local DSH session tools

Requires Node 24.9+ and DSH 0.2.x (>= 0.2.1-rc.3):

npm install -g pnpm @deepseek-ai/[email protected]
dsh plugin --profile web add @qianhaoq/dsh-dota2ai
DEEPSEEK_API_KEY=sk-... dsh web

Shared local $DSH_HOME/dota2ai cache with 6 session tools (packages/dsh):

ToolWhat it does
dota2ai_replay_reviewFull fact-checked replay review on your DSH model (en | zh | ru; auto-polls parsing / reviewing)
dota2ai_recent_matchesRecent public matches by Steam friend code, SteamID64, or profile link
dota2ai_match_scoreboardFactual 10-player scoreboard, items, gold curve, and data_gaps
dota2ai_replay_askFollow-up Q&A backed by the parsed replay trace (en | zh | ru)
dota2ai_hero_matchupHero-vs-hero matchup stats from pro games and rank brackets
dota2ai_wiki_lookupOffline-first Dota 2 Wiki mechanics, formulas, hero/item edge cases, interaction tables & mode="interact" matrices

MCP (Claude Code, Codex, Gemini CLI, Cursor, VS Code)

ClientRun once
Claude Codeclaude mcp add --transport http dota2ai https://dota2.ai/mcp
Codexcodex mcp add dota2ai --url https://dota2.ai/mcp
Gemini CLIgemini mcp add --transport http dota2ai https://dota2.ai/mcp
VS Codecode --add-mcp '{"name":"dota2ai","type":"http","url":"https://dota2.ai/mcp"}'
CursorOne-click install in Cursor
Streamable HTTPhttps://dota2.ai/mcp (docs: packages/mcp)

No MCP client? Point any web-capable agent at https://dota2.ai/llms.txt.

CLI & HTTP API

node packages/cli/bin/dota2ai.js recent <friend-code-or-profile-url>
node packages/cli/bin/dota2ai.js scoreboard 9091400302 --hero tidehunter
node packages/cli/bin/dota2ai.js matchup tidehunter ursa --rank legend
node packages/cli/bin/dota2ai.js wiki mechanic "debuff immunity" [--offset N]
node packages/cli/bin/dota2ai.js wiki interact axe,bristleback --topics bkb,break

Every CLI command supports --lang en|zh|ru and --json (packages/cli, agent skills: dota2ai-coach, dota2-wiki); for truncated >22,000-character wiki mechanic articles, pass --offset <next_offset> (character offset) to continue reading. Public HTTP API (GET /api/agent/<match>, GET /api/agent/<match>/scoreboard, GET /api/agent/wiki, GET /api/agent/players/<accountId>/profile): see llms.txt.


Run Locally & Contribute

Requires Node 20.10+.

npm ci
npm run build && npm run preview:mock    # Offline demo on http://localhost:4180 (zero API keys)

cp .env.example .env                     # Export into your shell; server.js does not load .env itself
npm run start:dev                        # Vite on :5173 + Express on :8080
lib/agent/                        Review agent: loop, 23 tools, verifyReview, evidence, Party Recap, chat
lib/upstream/                     Multi-source upstream clients (OpenDota, STRATZ, Steam Web API, Steam GC, odota/parser)
lib/data/                         Patch-matched 7.40–7.42a constants, hotfix snapshots, pro & rank-bracket references
lib/data/wiki/                    Offline Dota 2 Wiki snapshot, progressive query engine & hero/item interaction compiler
packages/review-engine/src/trace  Pure columnar replay trace builder & query primitives
src/agent/, src/coach/, src/user/ Match review page, 5v5 Blueprint, Party Recap, My Dota Cockpit, multi-account store
packages/dsh/, packages/mcp/      DeepSeek Harness native plugin & Streamable HTTP MCP server
packages/cli/                     Offline/online CLI & trace query tool
services/steam-retriever/         Optional self-hosted Steam Game Coordinator fallback retriever
server.js                         Express host

Pre-PR gate: npx tsc --noEmit && node --check server.js && npm run build && npm test. Deep-dive docs: docs/AGENT_PIPELINE.md, docs/GAME_UNDERSTANDING.md, CONTRIBUTING.md, AGENTS.md.

Environment variables
VariableEnables
DEEPSEEK_API_KEYReview agent, Party Match Recap, follow-up coach chat, and Patch Advisor
STEAM_WEB_API_KEYSteam profile fallback (GetPlayerSummaries), Vanity URL resolution, and match history fallback
DOTA_EXTRACT_BIN, AGENT_TRACE_DIR, AGENT_REVIEW_DIRLocal .dem replay parsing and disk cache
AGENT_BUCKET, TRACE_WORKER_URL, TRACE_WORKER_FALLBACK_URL, TRACE_WORKER_PREFER_FALLBACK_CNRemote parse worker with regional/CN Perfect World fallback and GCS storage
OPENDOTA_API_KEY, STRATZ_API_TOKENHigher API rate limits and secondary match / rank-bracket data source
Tiered offline evaluation, feedback flywheel & calibration scripts
Tier / PurposeCommand
Free trace fact check (no LLM)node scripts/eval-facts.mjs --traces <dir> [--rubrics evals/reviews] [--lang zh]
Cheap targeted item probenode scripts/probe-chat.mjs <traces dir> --lang zh --players <match>.<hero>,… --kinds answer_to_top_killer --repeat 10
Full review eval & shared baselinenode scripts/eval-run.mjs --traces <dir> --out <dir> [--games <match>.<hero>,…] [--runs N] [--concurrency 4] · scripts/eval-baseline.mjs pull|push
Offline rubric scoring & optional judgenode scripts/eval-review.mjs <reviews dir> [--rubrics evals/reviews] [--baseline base.json] [--judge --budget 2 --floor 50]
Feedback audit & rubric flywheelnode scripts/feedback-report.mjs <feedback dir> [--markdown] · scripts/feedback-to-rubric.mjs <feedback dir> [--out evals/reviews]
Corpus replay collection (zero LLM)node scripts/corpus-collect.mjs --out <dir> [--source mixed|pro|public] [--max 30] [--days 14] [--min-rank 60] [--patch <name>] [--reserve 400] [--extract <bin>] [--gcs gs://...] [--dry-run] [--json]
Corpus benchmarks & role calibrationnode scripts/corpus-benchmarks.mjs <traces dir> [--matches <dir>] [--out <file>] [--out-dir <dir>] [--manifest <file>] [--min-sample 30] [--bracket all|under_40|from_40_to_59|from_60] [--patch <name>] [--coverage] [--json] · node scripts/calibrate.mjs --by-bracket · node scripts/calibrate-role.mjs <traces> <matches>
Win-probability model & XP auditnode scripts/wp-train.mjs --data <dir> [--schema v1|v2 --baseline-brier <n>] · scripts/wp-audit-levels.mjs <traces> <matches>

Acknowledgements — Data, APIs & Dependencies

dota2.ai stands on the shoulders of the Dota 2 open-data community, official Valve & Perfect World datafeeds and replay servers, community encyclopedia maintainers, and the open-source ecosystem. Sincere thanks to every data provider, API host, and dependency that makes this project possible:

Dota 2 Data, APIs & Knowledge Partners

Partner / ProjectData, APIs & Tooling Provided
OpenDota (API Docs · odota/dotaconstants · odota/parser)Primary public match metadata, player recent matches, replay address discovery (cluster & replay_salt), /constants/* snapshots (heroes, items, abilities, patches), SQL Explorer pro-match datasets (pro item builds, counter items, pro matchups, corpus discovery), historical release/hotfix snapshot builder via dotaconstants, and optional self-hosted fallback parser via odota/parser.
STRATZ (GraphQL API)Rank-bracket public match statistics across Herald–Immortal (heroStats: hero matchups & lane outcomes, position-by-rank item builds & median completion timings, hero win-rate-by-duration curves, and pre-/post-patch hero meta deltas), secondary match fallback when OpenDota is unavailable or rate-limited, match start-time boundary lookups for exact letter-patch & hotfix rollout detection, and optional corpus prefiltering. All surfaces displaying rank-bracket statistics credit STRATZ.
DOTA2 刀塔百科 (wiki.dota2.com.cn)Authoritative Chinese Dota 2 community encyclopedia hosted under dota2.com.cn, providing comprehensive Chinese documentation on heroes, abilities, items, game mechanics, patch breakdowns, and terminology that support our Chinese coaching knowledge and lookup verification.
Valve Corporation & Perfect World (完美世界)Official www.dota2.com/datafeed multilingual (english, schinese, russian) patch notes, localized hero/item/ability names, and Aghanim's Scepter/Shard upgrades; official Valve (replay*.valve.net) and Perfect World CN (replay*.dota2.com.cn) .dem replay servers; Steam Web API (GetPlayerSummaries, ResolveVanityURL, GetMatchHistory) & Steam CDN assets; and Dota 2 Game Coordinator protocol (via optional self-hosted services/steam-retriever).
Dotabuff Open Source (manta · d2vpkr)dotabuff/manta (Go Source 2 .dem replay parser powering our dota-extract extractor) and dotabuff/d2vpkr (commit-by-commit unpacked Valve NPC/script files enabling exact per-release & per-hotfix item/ability snapshots from 7.40 through 7.42a and Scepter/Shard tooltip operator extraction).
SteamDatabase (GameTracking-Dota2 · Protobufs)Historical English ability localization fallback and Dota 2 Game Coordinator Protobuf definitions (services/steam-retriever).

AI, Agent Ecosystem & Core Open-Source Dependencies


License

PolyForm Noncommercial 1.0.0 — free for personal review, study, research, and your own non-commercial tools and agents (preserve the license and its Required Notice line with any copy). Commercial hosting, subscriptions, ads, API resale, or use in paid coaching, boosting, betting, or analytics products requires a commercial license — please contact the owner via GitHub.

A fan project, not affiliated with or endorsed by Valve Corporation or Perfect World. Dota, Dota 2, and Steam are trademarks of Valve Corporation. Match data from public OpenDota and STRATZ endpoints and official Valve / Perfect World replays; rank-bracket statistics from STRATZ; Chinese Dota 2 wiki reference courtesy of DOTA2 刀塔百科.

同类 MCP Server

官方

markitdown

Convert various file formats (PDF, Word, Excel, images, audio) to Markdown.

MImicrosoft/markitdown199k近 7 天新增 1,075 个 star

HyperFrames by HeyGen

Official HyperFrames by HeyGen: the best AI video editor in chat. Captions, motion graphics, MP4.

HEheygen-com/hyperframes93k近 7 天新增 4,463 个 star

精选

tldraw

在画布上与智能体协作,绘制图形并实时执行代码。

TLtldraw/tldraw52k近 7 天新增 130 个 star

Next AI Draw.io

draw.io diagrams your AI agent draws on a live browser canvas that you can also edit by hand

DADayuanJiang/next-ai-draw-io37k近 7 天新增 119 个 star

精选

mcp-for-blender

让智能体在 Blender 里建模,搭建和修改 3D 场景。

AHahujasid/mcp-for-blender37k近 7 天新增 952 个 star

screenpipe

Search your local screen recordings, audio transcripts, and computer activity from screenpipe.

SCscreenpipe/screenpipe23k近 7 天新增 97 个 star