SC2EditorMCP is a Model Context Protocol server for building and editing StarCraft II maps and mods with the Galaxy Editor. It generates mission, melee ladder and arcade maps and edits terrain, water, objects, game Data, GUI triggers and Galaxy scripts, cutscenes, UI, and localized text.
Project roles. SC2EditorMCP is the main authoring server. The SC2 Editor Toolkit is its optional native Editor backend for compilation, diagnostics, rendering and save/reopen checks. For mission stage design, editor-facing model placement, revision reconciliation and external mechanics, see the mission SDK and example.
An MCP client can work with unpacked components, import and export .SC2Map and .SC2Mod archives, and use supported tools on the open Editor document. The browser workbench and Editor toolbar chat are optional interfaces.
Generate a map · Connect an MCP client · Explore all capabilities · Edit the open map
For a procedural mission, ladder or arcade map, describe the zones, connections and style to your MCP client. Use world.plan_intent for a structured brief or world.plan for a detailed specification, then build the plan with world.build and check the packed revision with world.verify. A different seed varies the route, crossing and facility layout. The generator supports up to 64 ground textures across eight regional palettes, blended forests, paneled laboratory floors, measured decoration, walls, automatic gates and water crossings. World specification and working example
Choose a mission purpose, a terrain profile and a seed. Use mission.layout to inspect routes, clearings and reserved areas before mission.build writes a packed map candidate. Layout patterns include a fork around a basin, an expedition with a side objective, a central defense hub and a river valley.
- 70 campaign style choices.
mission.styleslists 24 Wings of Liberty, 17 Heart of the Swarm, 20 Legacy of the Void and 9 Nova Covert Ops campaign–tileset combinations. They cover 69 distinct tilesets. Select a campaign and tileset to use its palette on an original layout. The chosen tileset must resolve through installed dependencies. - Automatic terrain generation. For an existing map,
terrain.generateoffers 10 base recipes covering forest, desert, city, snow, jungle, swamp, volcanic, badlands, coastal and platform terrain. The mission builder can shape continuous heights, fit supported cliff tiers and ramps, blend ground and trail textures, and reserve space for bases and routes. - Water and bridges. The river-valley layout carves a winding channel through a native water strip and checks submerged cross sections and dry banks. An optional bridge spans two dry landings. The bridge is a visual doodad. Unit traversal needs separate pathing and a gameplay test.
- Materials and decoration.
mission.materialsidentifies texture roles such as soil, trail, rock and floor. Campaign decoration uses measured models to place vegetation and props around routes, banks and bases. Usemission.decor_densityto compare density with campaign maps. - Mission revisions. Inspect an existing map, plan and apply supported edits, resume the saved revision across sessions, or restore a named checkpoint. The mission workflow also covers gameplay setup, dependent Data mods and verification of a specific packed revision.
Mission workflow and parameters · Terrain tools · Water materials
Install Node.js 20 or later. From the project directory, run the following in PowerShell.
npm ci
npm run build
$env:SC2_UI_ROOT = "C:\Maps\Arena.components"
$env:SC2_MCP_PROFILE = "workflow"
node dist/index.jsFor optional headless Galaxy and UI diagnostics, plus Trigger, Data, Text and dependency inspection, see Galaxy Toolkit validation.
For offline component edits, point SC2_UI_ROOT at an unpacked map or mod. Use map.import to unpack an existing archive. For packed mission projects, point it at the workspace containing the map. Configure your MCP client with the same entry point and environment variables. The server uses stdout for MCP messages.
Choose a focused profile such as landscape, data, map-builder or editor-live. Use modkit.capabilities to see which modules and runtimes are available in your session. SC2_MCP_MODULES overrides profile selection.
The built server's MCP tools/list reports 584 tools with the all
profile, 34 with workflow, and 215 with editor-live using each
profile's default modules. The editor-live profile includes 57
live.trigger.* tools.
Start the optional browser workbench with npm run gui and open http://127.0.0.1:4312. For a portable Windows package, use npm run windows:portable. Windows setup · Workbench guide
| Area | What you can do |
|---|---|
| Map generation | Create mission, melee ladder and arcade map layouts. Generate biome transitions, variable-width trails, river crossings and functional rooms. Pack and verify the generated .SC2Map. World generation |
| Data Editor | Create or clone units and link weapons, damage effects, abilities and Actors. Configure vitals, armor, costs, cooldowns, hero progression, command cards and supported animation events. Inspect catalog references and review presentation in game. Data guide |
| GUI triggers and Galaxy | Create and edit GUI triggers, folders, variables, conditions and actions. Import a reviewed full GUI graph into map components with its generated Galaxy and localized labels. Original Editor compilation is available through the native toolkit. Triggers · Galaxy |
| Terrain, water and lighting | Shape ground, paint materials, edit visibility and pathing masks, and build native cliff contours and ramps. Paint cliffs on a two-cell grid and create flat water on a four-cell grid from rectangles, circles, polygons or corridors. Configure water materials and lighting. Terrain · Water · Lighting |
| Objects, regions and scenery | Place units and doodads individually or in batches, edit regions, vary models and snap objects to terrain. Compose outposts and woodland scenes with measured groups, exclusions and clear routes. Regenerate owned zones with conflict checks. Placement · Composition |
| Maps, mods and components | Import and export MPQ archives, create supported map or mod foundations, compare reopened entries, edit component manifests, document metadata and ordered dependencies. Archives · Foundations · Component editing |
| Players, lobby and AI | Set supported player properties, slot ranges, lobby variants and game flags. Edit CustomAI metadata and validate its references. Player settings · CustomAI |
| UI and localization | Edit frames, anchors, properties, dialog templates, states and animations. Preview dialogs and manage localized strings, font styles and rich text. UI authoring · Text |
| Catalogs and assets | Search installed Blizzard CASC data and mounted dependencies. Resolve catalog IDs, inspect models, measure decoration and preview supported models, textures and audio. CASC · Authoring catalog |
| Cutscenes and captures | Compose cameras, shots and tracks, preview scenes and render frames. The native toolkit supports Editor screenshots and tested silent MP4 export. Cutscenes · Native Editor |
| Gameplay tests | Launch SC2 with the separately configured GameToolkit, issue orders, exercise abilities, capture observations and run repeatable project tests against a map revision. Native game tools · Project tests |
Use the editor-live profile for the open map. Supported tools operate through the original Editor controls for placement, Data XML, GUI triggers, layouts, localized text, resource imports and same-file Save. The optional AI toolbar button opens a chat connected to your configured MCP server. Current-document tools · AI button setup
- Terrain. Editor 5.0.17.98745 has verified native regional brushes for height, textures, cliffs and ramps, vision, water, painted pathing and ground visibility. Native grouped edits verified three 4×4 water tiles and four painted pathing positions with one Undo or Redo per group. Use component authoring for larger contours. Native terrain tools and evidence
- Live triggers. Use
live.trigger.createto build a complete GUI trigger, reusable definitions, or both in one call. SetgroupHistory: trueto remove or restore a new library with one Ctrl+Z or Ctrl+Y. Uselive.trigger.patchfor batches of edits to the existing graph and individual tools for targeted changes. On Editor 5.0.17.98745, one Ctrl+Z and one Ctrl+Y verified a function return, condition order, a preset and a numeric argument in one patch inside a trigger library. A separate library patch verified the same shortcuts for creatingText Messageand binding a new localized key. Original Save persisted both tests in their open maps. Live Trigger creation · Live Trigger patches · Verified coverage and remaining work - Same-file refresh. Prepare broader component changes and reload the same archive in the same Editor window. Reloading resets native Undo. Component support and refresh procedure
- Linked abilities. On Editor 5.0.17.98745,
live.data.author_groupcan create a targeted Ability, a Damage Effect and an Actor in one operation while the map stays open, including when all three catalog files are absent. SetunitAbilityto attach the new ability to a map-local Unit inUnitData.xml. SetcreateUnitto include native creation of that Unit in the same group. First entries in Behavior, Validator, Upgrade, Button, Weapon, Model, Requirement and Requirement Node are supported too. - Group history. Start
live.data.shortcutson the Data window to routeCtrl+ZandCtrl+Yto MCP groups. One step moves the whole group. The linked Ability, Effect and Actor were verified before and after the first Save. Uselive.history,live.undoandlive.redofor the same grouped history through MCP. - Units and balance.
live.data.create_unitandlive.data.remove_unituse the original Editor commands.live.data.attach_unit_abilityandlive.data.detach_unit_abilityupdate the Unit's ability list in place and preserve link order. Guarded balance changes such as health are supported. Usemode=nativewith the returned Data window ID for native Unit history. The directUnitData.xmlguard prevents the Editor exits reproduced when reloading changes toAbilArray. Live Data instructions and limits · Acceptance results
Review the plan and diff, then save the complete group of related changes. Supported workflows check source revisions and dependencies, preserve unrelated XML, and provide backups or recovery records. Four-height cliff junctions remain outside the authoring profile. Native water body and wave payloads are preserved as opaque data. Review visuals in the Editor and test navigation, combat and triggers in SC2. Authoring protocol · Transactions · Verification matrix
SC2EditorMCP can use the optional native Editor integration for compilation, diagnostics and captures. SC2EditorToolkit
npm run build
npm run architecture:check
npm run docs:check-language
npm run catalog:verify
npm test
npm run lintUse npm run build:release for distribution. Rebuild and reconnect the client after server changes. Repository structure · Publication checklist
Original code: Copyright (c) 2026 VoVanRusLvSC2 (vladimir.lencmanis@gmail.com), under the custom attribution license. Projects using our code or modules must credit VoVanRusLvSC2 and identify SC2Editor-MCP-Codex as their source in README, Credits or About, in addition to retaining copyright and license notices. Surface Toolkit author: vise (attribution provided by the project owner). Third-party components retain their own licenses; see credits and license scope.