SC2 Map Editor MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SC2 Map Editor MCPOpen the map file and list its components"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SC2 Map Editor MCP
An MCP server that lets a coding agent inspect and edit StarCraft II maps and mods by manipulating their file contents directly, instead of driving the Galaxy Editor UI.
Status: pre-release. Most of PLAN.md is implemented, with the gaps stated
explicitly rather than glossed. Read Current capabilities, or ask
a running server via sc2_get_server_info — that is the authoritative answer for a
particular build and machine.
Current capabilities
The server reports this itself via sc2_get_server_info — that is the authoritative
answer for a running build. As of now:
Subsystem | Read | Write | Notes |
Workspace staging | ✅ | ✅ | Unpacked documents, plus packed documents when the MPQ helper is available |
Component inventory | ✅ | ✅ | Resolve component files; add, update, or remove lossless |
GameData catalogs | ✅ | ✅ | Search, inspect, resolve inheritance, find references, patch/clone/create/delete. Local dependencies load read-only |
MPQ archives ( | ✅ | ✅ | Byte-identical round trips on real ladder maps, and maps packed here open in the editor — see docs/native-helper.md |
Galaxy scripts | ✅ | ✅ | Parse, symbols, syntax diagnostics, safe text patching. No type checking — needs the game's natives. Requires the vendored toolkit to be built |
Triggers | ✅ | ✅ | Full local reference graph, names, search, rename, graph-safe clone, and shared-node-aware delete |
Localization | ✅ | ✅ | Text tables, preserving BOM and CRLF exactly |
SC2Layout | ✅ | ✅ | List, read, diagnose, search, create, and losslessly patch layout elements |
Placed objects / regions | ✅ | ✅ | Both are XML, not binary. Place, move, delete — round-tripped through the editor. Terrain height is not consulted |
Terrain | ✅ | ✅ | Typed height, texture, pathing, and cliff reads/writes, synchronized-file updates, validation, and bounded raw component access. See docs/terrain.md |
Map player slots | ✅ | ✅ | Reads and rewrites version 39 |
Editor/test launch | ✅ | ✅ | Opens documents in the Galaxy Editor; writes bounded |
Why the gaps are where they are, and what "⚠️" means in each row: docs/capabilities.md.
Packed archives work end to end: an existing map opened from a .SC2Map, extended here,
repacked here, and opened in the Galaxy Editor loads as a real document, with the editor
resolving the added catalogs by name. Building the helper needs a C++ toolchain and the Windows SDK
(scripts/build-native.ps1); without it capabilities.mpq reports false and packed
archives are refused with a clear error.
Dependencies: local ones load, Blizzard's do not. A .SC2Mod directory beside your map
is indexed, and its objects become visible for inheritance and references - read-only, since
this server never modifies dependency archives. Blizzard's stock mods live inside the
installation's CASC store, which this build cannot read; they are reported as in-casc
rather than missing, because that is a very different thing from your map being broken.
Editor and in-game testing. sc2_launch_editor opens a packed document, a workspace's
staged copy, or a blank Galaxy Editor. sc2_test_document accepts a packed .SC2Map or a
map workspace, copies it to the installation-owned Maps\Test area without changing the
source, and launches it through the editor-compatible SC2Switcher workflow. It refuses to
start if another StarCraft II client is running. After launch, sc2_get_last_test_log
reports whether the game is still running and returns the GameLogs plus parsed Alerts and
ScriptError diagnostics for that specific run.
Tools
Tool | Read-only | Purpose |
| yes | Versions, configuration, capability matrix, limitations |
| yes | Find StarCraft II without scanning the disk |
| no | Stage a document, get a |
| yes | Kind, counts, components, dependencies, diagnostics, known gaps |
| yes | Recover a |
| yes | Parse |
| no | Add a lossless component declaration, normally for files already in the workspace |
| no | Change a component type, logical path, or locale |
| no | Remove a declaration while preserving its staged files |
| yes | Name, author, mod type, icon, screenshots, dependencies |
| yes | Dependency chain in resolution order |
| yes | Reference table of component type codes |
| yes | Catalog domains present, with entry counts |
| yes | Find catalog objects by id, filtered by domain |
| yes | One object's own declaration, plus verbatim XML |
| yes | Effective values with inheritance, and where each came from |
| yes | What refers to an object, and whether it is shared |
| no | Field-level edits by path, with shared-object warnings |
| no | Copy an object under a new id, byte-for-byte |
| no | Add a new object with a parent, root attributes, and child fields |
| no | Remove an object; refuses while referenced |
| yes | Locales and text tables present |
| yes | Search a text table by key or value |
| yes | Read one localized string |
| no | Create or update localized strings |
| no | Remove localized strings |
| no | Copy strings between keys or locales |
| yes | Catalog objects with no display name |
| no | Open a document in the Galaxy Editor to confirm it loads |
| yes | List or read the editor's own logs |
| no | Stage and launch a map through the editor-compatible SC2Switcher workflow |
| yes | Running/exited status, game logs, and parsed Alerts and ScriptError diagnostics for the last test |
| yes | The user's Maps folder, resolved through the registry |
| yes | Read version 39 |
| no | Set an exact contiguous human slot range and synchronize |
| yes | Scripts in the document; flags the generated MapScript |
| yes | Read a script, optionally by line range |
| yes | Functions, variables, structs, includes |
| yes | Syntax errors with line and column |
| no | Exact-text edit, refused if it breaks the parse |
| no | Add a library, syntax-checked first |
| no | Generate a bounded |
| yes | Layout files with frame and diagnostic counts |
| yes | Exact layout source plus an element index |
| yes | XML and structural layout diagnostics |
| yes | Find frame, template, and include declarations |
| no | Create a valid SC2Layout file |
| no | Targeted, lossless element or attribute edits |
| yes | The trigger tree with names resolved |
| yes | One element: type, name, contents, referrers, raw XML |
| yes | Find trigger elements by name |
| no | Rename an element (edits TriggerStrings only) |
| no | Clone an editor-authored subgraph and remap every local id |
| no | Detach a branch; remove only nodes with no remaining incoming path |
| yes | Units, doodads, and points on the map |
| no | Place a unit, doodad, or point with the next free id |
| no | Move, rotate, or rescale a placed object |
| no | Remove a placed object |
| yes | Regions with their shapes |
| no | Add a region with the next free id |
| no | Move or rename a region |
| no | Remove a region |
| no | Append a dependency; later entries win in load order |
| no | Remove a dependency, matched by its |
| no | Set a single-valued |
| yes | Decode the descriptor and validate all terrain components |
| yes | Read render and synchronized height at one vertex |
| no | Write render and synchronized height together |
| yes | Read pathing, cliff, texture blend, and synchronized texture data |
| no | Set one pathing-flags byte |
| no | Paint eight texture layers and update synchronized texture data |
| no | Set descriptor and synchronized cliff data together |
| yes | Read a bounded raw byte range as base64 |
| no | Apply a bounded raw patch and validate the component before writing |
| no | Clone a unit with a name, stats, and its own weapon |
| no | Change one unit's damage without touching units that share it |
| no | Give one owner its own copy of something shared |
| yes | Would editing this reach beyond one owner? |
| yes | Every check this build has, per category, with unchecked ones named |
| no | Write the staged document out, with backup and preflight |
| yes | Unified diff against the source, or against a snapshot |
| yes | Change history, with the snapshot taken before each |
| no | Undo the most recent change |
| no | Pin a known-good state |
| yes | Snapshots held for a workspace |
| no | Roll the staging tree back to a snapshot |
| yes | Paginated listing of the staged tree |
| yes | Read one staged file (text, or base64 for binary) |
| yes | Literal substring search across staged text files |
| no | Delete the staging copy; source untouched |
Related MCP server: loenn-mcp
The safety model
This is a program that edits your maps on a language model's instructions, so the defaults are conservative:
Your source is never modified.
sc2_open_documentcopies the document into a server-owned staging directory. Every edit lands there.sc2_commit_documentis the only way anything leaves it, and it refuses on three independent grounds — validation errors, the source having changed underneath you, and an occupied destination — each of which has to be waived separately.Paths are allowlisted. Nothing outside
allowedRootscan be read or written. Paths are canonicalised first, so symlinks cannot be used to escape.Nothing runs a shell. External programs are spawned with argument arrays, a timeout, and a trimmed environment. There is no "run this command" tool.
Unimplemented means unimplemented. A capability flag is only
truewhen the code exists and its backend is present on this machine. The server would rather tell you it cannot do something than guess.Shared objects are never edited by accident. Twenty units share one weapon. Asking to change "this unit's damage" clones the chain, rewires only that unit, and tells you exactly what it copied — unless you explicitly ask to modify the shared original.
Edits are lossless, previewable, and reversible. XML changes splice exact byte ranges, so everything outside the edit — comments, attribute order, CRLF endings, whether the file ends in a newline — comes out identical. Every mutation snapshots first, supports
dry_run, rolls back completely if any part fails, and can be reverted afterwards. Text changes produce unified diffs; binary changes report exact before and after hashes.
Requirements
Node.js 22 or newer (developed against 26)
pnpm 10
Windows, for anything involving StarCraft II itself. The core is cross-platform; editor integration is not.
Getting started
pnpm installpnpm run verifyverify runs lint, typecheck, build, and the full test suite — including an
integration test that spawns the built server as a real child process and speaks MCP to
it over stdio.
MCP Gauntlet acceptance map
scripts/gauntlet-acceptance.mjs drives the built MCP server to turn a blank/template map
into the four-player survival roguelite used for end-to-end acceptance. The generated
.SC2Map stays in the user's Maps directory and is intentionally not committed.
$env:SC2MCP_GAUNTLET_MAPS_ROOT = "$env:USERPROFILE\Documents\StarCraft II\Maps"
node scripts/gauntlet-acceptance.mjs build 'Blank.SC2Map'
node scripts/gauntlet-acceptance.mjs inspect 'MCP Gauntlet.SC2Map'
node scripts/gauntlet-acceptance.mjs test 'MCP Gauntlet.SC2Map'The build command creates and validates all map data through MCP, commits the packed map,
and checks the reopened archive. The test command launches the installed SC2 client and
polls Alerts and ScriptError diagnostics. logs performs a one-shot query against the
current server process and is mainly useful while extending the harness.
To read or write packed .SC2Map archives you also need the sc2mpq sidecar, which is
built rather than shipped — it is a native binary, and a committed one would carry the
build machine's paths. Fetch the pinned StormLib and compile it:
pwsh scripts/bootstrap.ps1 -Only StormLibpwsh scripts/build-native.ps1This needs CMake, the MSVC toolset and the Windows SDK; see
docs/native-helper.md, which explains what fails without them.
Everything except packed-archive support works fine if you skip it — capabilities.mpq
simply reports false.
Create a config file (see docs/configuration.md):
node apps/sc2-mcp-server/dist/main.js doctor --config C:\path\to\sc2-mcp.config.jsondoctor prints the resolved configuration, the detected StarCraft II installation, and
the capability matrix. It exits non-zero when the server would be unable to do anything
useful — for example when no allowed roots are configured.
Connecting an MCP client
The server speaks MCP over stdio. Codex stores local MCP registrations in its shared configuration. Register this server with the supported CLI command:
codex mcp add sc2_editor -- node C:\path\to\SC2EditorMCP\apps\sc2-mcp-server\dist\main.js --config C:\path\to\SC2EditorMCP\sc2-mcp.config.json
codex mcp get sc2_editorRestart the Codex client after adding the server. The Codex app, CLI, and IDE extension share the same local MCP configuration. See the official Codex MCP setup.
For another MCP client, point its STDIO configuration at the same built entry point:
{
"mcpServers": {
"sc2": {
"command": "node",
"args": ["C:\\path\\to\\SC2EditorMCP\\apps\\sc2-mcp-server\\dist\\main.js"],
"env": {
"SC2MCP_ALLOWED_ROOTS": "C:\\Users\\me\\OneDrive\\Documents\\StarCraft II\\Maps"
}
}
}
}Repository layout
apps/sc2-mcp-server/ MCP protocol layer: tools, schemas, error translation, stdio entry
packages/sc2-core/ Domain layer: config, path guard, workspace staging, MPQ adapter
packages/sc2-test-utils/ Test fixtures and temp-directory helpers
native/sc2mpq/ C++ MPQ sidecar (StormLib), built separately
docs/ capabilities.md, sc2-formats.md, native-helper.md, galaxy.md
docs/adr/ Architecture decision records
vendor/PINS.json Pinned upstream sources (checkouts are gitignored)
scripts/ bootstrap.ps1 (fetch pins), build-native.ps1 (build the sidecar)
tests/ Cross-package integration testsThe layering rule (PLAN.md §4): tool handlers validate input, call a domain service, and translate the result. SC2 parsing never lives in a tool handler.
Licensing and content
MIT — see LICENSE. Trademark and third-party notices are in NOTICE.md; this project is not affiliated with or endorsed by Blizzard Entertainment.
No Blizzard assets, extracted game data, or copyrighted map content is included in this repository, and none will be. Test fixtures are project-authored placeholders — useful for exercising staging and transaction machinery, useless for validating format parsers, which must be checked against real editor output.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
2,000+ MCP servers read at source level. Know what one does before you connect. Free, no key.
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server for deep research or task groups
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceMCP server for reading World of Warcraft client files via CASC storage, enabling file discovery and content retrieval.-
- AlicenseNot gradedqualityAmaintenanceAn MCP server that enables AI agents to read, edit, analyze, procedurally generate, and preview Celeste .bin map files without the Lönn editor.2MIT
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol (MCP) server for exploring, analyzing, and decompiling Java JAR files.2715MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for Windows process memory inspection/editing and crash dump analysis, enabling live memory scanning, patching, pointer resolution, disassembly, and offline dump examination via structured tool calls.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/erivgout/sc2-map-editor-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server