Skip to main content
Glama

sc2-mcp — StarCraft II AI Coach for ChatGPT, Claude, Codex and other MCP clients

An MCP server for StarCraft2.ai. From ChatGPT, Claude, Claude Code, Codex, Cursor or any other MCP client you can:

  • Ask StarCraft II questions. Answers come from the same knowledge base the AI Coach cites: Liquipedia unit data, current patch notes, strategy articles and pro-game insights.

  • Upload a replay from a file on your computer or from a download link.

  • Get an AI Coach report on a game: strengths, mistakes, key moments and what to work on.

  • Ask follow-up questions about a game ("why did I lose that fight at 8:30?").

Uploading works without an account. Everything else needs a StarCraft2.ai account. To upload every game automatically instead, install the auto-uploader. The tools use your account's minerals, at the same prices as the website:

What

Cost

Knowledge search, uploads, reading an existing report

free

AI Coach report on a replay

1 mineral (free if the replay already has one)

Follow-up questions on a replay

first 3 free, then 1 mineral per 20

Check-in note across your recent games

reading the saved one is free; a new one is 1 mineral

A new connection can't spend minerals at all until you allow it on starcraft2.ai/auth/mcp under Connected apps, so a sign-in someone tricked you into approving can read but not spend. Once allowed, a tool still never spends unless it's called with confirm_spend: true, and the tool descriptions tell the assistant to ask you first. If your client supports MCP elicitation, the server also asks you directly before spending, so nothing the assistant reads in a replay or a report can approve a purchase for you. Buy minerals at starcraft2.ai/en/billing.

Install

ChatGPT and Claude (hosted connector, nothing to install)

Add a custom connector with this URL:

https://www.starcraft2.ai/api/mcp
  • Claude (claude.ai, desktop and mobile apps): Customize → Connectors → Add custom connector, then Connect and sign in. Team and Enterprise owners add it under Organization settings → Connectors.

  • ChatGPT (paid plans, chatgpt.com): turn on developer mode (Settings → Security and login → Developer mode), then Plugins → +, paste the URL and sign in. ChatGPT can pass an attached replay file straight to upload_replay.

The hosted connector runs the same tools as this package on starcraft2.ai (it imports sc2-mcp/lib). It signs in with OAuth and has no login/logout tools; spending still needs to be allowed under Connected apps. Step-by-step with screenshots: starcraft2.ai/en/mcp.

Claude Code (plugin)

/plugin marketplace add tomkit/sc2-mcp
/plugin install sc2-coach@starcraft2-ai

The plugin adds the MCP server and a skill that tells Claude how to use it. Then ask something like "analyze my latest SC2 replay" and Claude will sign you in.

Codex (plugin)

codex plugin marketplace add tomkit/sc2-mcp
codex plugin add sc2-coach@starcraft2-ai

Same server and skill as the Claude Code plugin. Start a new Codex session and ask it to analyze a replay; it will sign you in through the browser. codex mcp list should show sc2.

Or register just the server: codex mcp add sc2 -- node /absolute/path/to/sc2-mcp/dist/index.js.

Claude Code (server only)

git clone https://github.com/tomkit/sc2-mcp ~/sc2-mcp
claude mcp add sc2 -- node ~/sc2-mcp/dist/index.js

Claude Desktop, Cursor and other clients

Nothing to download: the config runs the server straight from this repo with npx. In Claude Desktop, open Claude → Settings… → Developer → Edit Config, replace the contents of claude_desktop_config.json with this (or add the sc2 entry to your existing mcpServers), save, and quit and reopen Claude:

{
  "mcpServers": {
    "sc2": {
      "command": "npx",
      "args": ["-y", "github:tomkit/sc2-mcp"]
    }
  }
}

Then check + → Connectors → Manage connectors lists sc2, and ask Claude to sign you in to StarCraft2.ai. Step-by-step instructions with screenshots: starcraft2.ai/en/mcp. A local clone works too: "command": "node", "args": ["/absolute/path/to/sc2-mcp/dist/index.js"].

Claude Desktop can also use the hosted connector above, which needs no Node.js and no config file.

It needs Node.js 18.17 or newer on your PATH, including for the Claude Code and Codex plugins (neither installer brings Node with it). dist/index.js is a self-contained bundle, so there is nothing to npm install.

Related MCP server: stellavault

Signing in

Every tool except login needs you signed in. login gives you two ways to approve, and whichever you finish first signs you in:

  • On the same computer: if you ask for it (the assistant passes open_browser), it opens StarCraft2.ai in your browser. Sign in if you aren't already, check the request and click Allow. That's the OAuth 2.1 authorization-code flow with PKCE and a loopback redirect to 127.0.0.1 (RFC 8252).

  • From your phone or any other device: it also gives you a short code like BCDF-GHJK. Open starcraft2.ai/auth/device, enter the code and approve. That's the device authorization grant (RFC 8628): nothing is redirected to your computer, so it works when the server runs on a Mac you're not sitting at, over SSH, or in a container. Only enter a code that your own assistant gave you, and never one someone sent you.

The server never sees your password. The resulting token is saved to ~/.config/sc2-mcp/credentials.json (%APPDATA%\sc2-mcp on Windows) with owner-only permissions. It lasts 180 days for a browser sign-in and 30 days for a code sign-in, and you get an email each time an app connects. logout revokes it, and so does Disconnect on starcraft2.ai/auth/mcp, which lists every connected device.

You can also set SC2_API_TOKEN in the server's environment; it takes precedence over the saved token, which follows the MCP spec's advice for stdio servers to take credentials from the environment. Treat a token like a password: it can spend your minerals.

Tools

Tool

What it does

login / logout

Browser sign-in; revoke and forget the token

get_account

Mineral balance, claimed SC2 profile, prices

search_sc2_knowledge

Passages from the SC2 knowledge base for general questions

upload_replay

Upload a .SC2Replay (or Brood War .rep) by path or url. Works without signing in (anonymous upload)

list_my_replays

Your games, newest first: ones you played (via your linked SC2 profile), coached, asked about or uploaded, with your result and whether a report exists

search_replays

Search your games (or another player's, by name) by date range, map, opponent, teammates, units built (e.g. at least 8 Liberators and Vikings), your race, opponent's race, win/loss, 1v1/2v2 and whether a report exists. Each result has its link

get_analysis

A replay's details and its AI Coach report, if one exists

analyze_replay

Run the AI Coach on one side of a game (1 mineral, needs confirm_spend; player picks the side, default yours)

ask_about_replay

Ask the coach a follow-up question about a coached replay

unlock_more_questions

20 more follow-up questions on a replay (1 mineral, needs confirm_spend)

coach_my_progress

The coach's check-in note across your last 5 coached ranked (or unranked) games: are you fixing what it flagged last time, what's working, the one recurring leak, and what to work on next, citing the games. The saved note is free; a new one is 1 mineral (refresh + confirm_spend)

A coach run takes 3–7 minutes. analyze_replay waits up to wait_seconds (default 50) and sends MCP progress notifications while it waits. If the run isn't done by then it returns and the run carries on; get_analysis picks up the report. Runs that fail on the site's side are refunded automatically.

Configuration

Variable

Default

SC2_API_TOKEN

–

Use this token instead of the browser sign-in

SC2_API_BASE

https://www.starcraft2.ai

Site origin (for local development)

SC2_MCP_CREDENTIALS

~/.config/sc2-mcp/credentials.json

Where the token is saved

SC2_MCP_NO_BROWSER

–

1 to print the sign-in URL instead of opening a browser

Development

npm install
npm run build   # typecheck + bundle to dist/index.js (commit the bundle)
npm test        # protocol and credit-gating tests against a mock site
npm run inspect # MCP Inspector

The end-to-end test (real browser sign-in, upload, a paid coach run and follow-ups against a local build of the site) lives in the site's repository.

License

MIT

Available Tools

10 tools
analyze_replayRun the AI Coach on a replayA

Run StarCraft2.ai's AI Coach on an uploaded replay. COSTS 1 MINERAL (the site's paid credits) unless the replay already has a report, which is returned free. Refuses to spend unless confirm_spend is true — tell the user the price and their balance and get a yes first. A run takes 3–7 minutes: this waits up to wait_seconds, then returns and the run continues; call get_analysis to collect it. Failed runs are refunded by the site.

Inputs: replay (required), upgrade, language, wait_seconds, +1 more.

ask_about_replayAsk the coach about a replayA

Ask StarCraft2.ai's coach a follow-up question about a replay that has an AI Coach report (it can check the replay's numbers and the knowledge base). The first 3 questions per replay are free; after that the site needs 1 mineral per 20 more, bought with unlock_more_questions (ask the user first). Shows the remaining free/unlocked questions.

Inputs: replay (required), question (required).

get_accountAccount and mineral balanceA
Read-only

The signed-in user's mineral balance (StarCraft2.ai credits), claimed SC2 profile, and where to buy more minerals.

Inputs: no named parameters.

get_analysisGet a replay's AI Coach reportA
Read-only

Read a replay's details and its AI Coach report if one exists. If this session started a coach run that is still going, waits for it (up to wait_seconds) and returns the report when it lands. Free — never spends minerals.

Inputs: replay (required), wait_seconds.

list_my_replaysList my replaysA
Read-only

The signed-in user's uploaded replays on StarCraft2.ai, newest first, with whether each has an AI Coach report. Free.

Inputs: limit.

loginSign in to StarCraft2.aiA

Sign in to the user's StarCraft2.ai account. Opens the site's sign-in page in the browser (OAuth with PKCE); the user approves there and this tool finishes. Required before any other tool. If the browser didn't open, show the user the URL from the result.

Inputs: wait_seconds.

logoutSign outA
DestructiveIdempotent

Sign out of StarCraft2.ai on this computer: revokes this device's token and deletes it locally.

Inputs: no named parameters.

search_sc2_knowledgeSearch StarCraft II knowledgeA
Read-only

Search StarCraft2.ai's StarCraft II knowledge base — Liquipedia unit/building/ability data, current patch notes, strategy and matchup articles, and pro-game insights — the same sources the AI Coach cites. Use it to answer general SC2 questions (unit stats, counters, build orders, patch changes, matchup advice); answer from the passages and cite their URLs. Free.

Inputs: query (required), limit.

unlock_more_questionsBuy more follow-up questionsA

Spend 1 MINERAL to unlock 20 more follow-up questions on one replay (same price as the website). Refuses unless confirm_spend is true — only after the user agreed to spend the mineral.

Inputs: replay (required), confirm_spend.

upload_replayUpload a replayA
Idempotent

Upload a StarCraft II replay (.SC2Replay) — or a Brood War .rep — to StarCraft2.ai from a local file path or a download URL. The site parses it and it is attributed to the signed-in user. Returns the replay id and whether an AI Coach report already exists. Free. On Windows the default replay folder is Documents\StarCraft II\Accounts\…\Replays\Multiplayer; on macOS ~/Library/Application Support/Blizzard/StarCraft II/Accounts/…/Replays/Multiplayer.

Inputs: url, path.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a distinct action or resource: auth (login/logout), account info, knowledge search, replay upload/list, report reading, coach run, follow-up Q&A, and paid unlocks. The only potential overlaps (get_analysis vs analyze_replay, search_sc2_knowledge vs ask_about_replay) are clearly separated by descriptions as read vs run and general vs replay-specific.

    Naming Consistency4/5

    All names use snake_case and mostly follow verb_noun (get_account, upload_replay, list_my_replays, analyze_replay). The bare verbs login/logout are a minor deviation but still unambiguous and consistent within the auth pair.

    Tool Count5/5

    10 tools is well within the typical 3–15 range and each tool maps to a distinct step in the account/replay analysis workflow. No tool feels redundant or missing from a scope perspective.

    Completeness4/5

    The surface covers the core lifecycle: authentication, account info, knowledge search, replay upload/list, report retrieval, coach analysis, follow-up questions, and paid unlocks. Minor gaps exist (e.g., no delete-replay or direct mineral purchase tool), but they are workaroundable or external to the main workflow.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Desktop to search custom knowledge bases using retrieval-augmented generation via a simple MCP tool.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude to read, search, and analyze your entire knowledge vault locally via MCP tools like search, drafting, and linting.
      101 npm
      7
      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
      -