sc-bwapi-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., "@sc-bwapi-mcpTrain a Zerg Drone and gather minerals with it."
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.
sc-bwapi-mcp
Enable AI assistants (e.g., Trae/Claude) to control StarCraft 1 through the BWAPI bridge via MCP (Model Context Protocol).
Architecture
星际1 (1.16.1) ← BWAPI 4.4.0 注入 (Chaoslauncher)
↕ 共享内存 + 命名管道
bwapi_bridge.exe (C++, TCP 12345)
↕ JSON over TCP
sc-bwapi-mcp (Python MCP server)
↕ MCP stdio
Trae / Claude / 任意 MCP 客户端Related MCP server: defcon-mcp-server
Prerequisites
Component | Version | Description |
StarCraft | 1.16.1 | Standard edition (not Remastered); free download of Anthology from the Battle.net client |
BWAPI | 4.4.0 | |
Visual Studio | 2022 Community | Check "Desktop development with C++" during installation |
uv | 0.12+ | Python package manager https://astral.sh/uv |
Chaoslauncher | (bundled with BWAPI) | Injects BWAPI.dll into the StarCraft process |
Installation
1. Install StarCraft 1 + BWAPI
Download StarCraft Anthology (free) from the Battle.net client and install it to a path without spaces, e.g.,
C:\Games\StarcraftDownload BWAPI 4.4.0 and install it to a path without spaces, e.g.,
C:\libraries\BWAPI_440Set the environment variable
BWAPI_DIR=C:\libraries\BWAPI_440Copy the contents of
StarCraft\andWindows\from the BWAPI installation directory into the StarCraft directory
2. Build the BWAPI library (required on first run)
The .lib files for BWAPI 4.4.0 need to be built with VS2022:
$msbuild = "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
$env:BWAPI_DIR = "C:\libraries\BWAPI_440"
# 编译 BWAPILIB + BWAPIClient (Release x86)
& $msbuild "$env:BWAPI_DIR\BWAPILIB\BWAPILIB.vcxproj" /p:Configuration=Release /p:Platform=Win32 /m
& $msbuild "$env:BWAPI_DIR\BWAPIClient\BWAPIClient.vcxproj" /p:Configuration=Release /p:Platform=Win32 /m
# 编译 ExampleAIModule.dll (BWAPI 4.4.0 需要一个 AI 模块才能触发 onStart)
& $msbuild "$env:BWAPI_DIR\ExampleAIModule\ExampleAIModule.vcxproj" /p:Configuration=Release /p:Platform=Win32 /p:OutDir="<星际目录>\bwapi-data\AI\" /m3. Build the bridge
cd <项目目录>
scripts\build_bridge.batOutput: cpp\build\Release\bwapi_bridge.exe
4. Configure bwapi.ini
In the StarCraft directory, ensure bwapi-data\bwapi.ini has:
[ai]
ai = bwapi-data/AI/ExampleAIModule.dll
[auto_menu]
auto_menu = OFFUsage
Startup order (important!)
Run Chaoslauncher as administrator → Check "BWAPI Injector 4.4.0 [RELEASE]" → Don't click Start yet
Start the bridge:
scripts\run_bridge.bat(it waits for the BWAPI server)Click Start in Chaoslauncher → Enter StarCraft → Single Player → Expansion → Play Custom → Choose a map → Start
After entering the game screen, the bridge automatically connects and pushes status
Configure MCP client
Add the following to Trae's MCP configuration:
{
"mcpServers": {
"sc-bwapi": {
"command": "C:\\Users\\<你>\\.local\\bin\\uv.exe",
"args": ["run", "--directory", "<项目路径>", "sc-bwapi-mcp"]
}
}
}Restart Trae, and you can call the tools.
MCP tools
Tool | Parameters | Description |
| None | Reads game state (minerals/gas/supply/all units) |
|
| Train a unit (e.g., |
|
| Build a building (automatically finds a buildable location) |
|
| Move a unit to pixel coordinates |
|
| Attack a target unit |
|
| Gather minerals/gas |
|
| Stop the current action |
|
| Hold position |
|
| Send a message in game |
Troubleshooting
Bridge stuck at "Game table mapping not found": StarCraft is not launched; it is waiting normally.
Bridge cannot connect to the pipe: Exit the game and re-enter (the previous bridge was force-killed, and BWAPI's connected flag is stuck).
build failed: The bridge uses
getBuildLocationto find a location automatically; make sure there is empty space within the creep range.0 FPS: The computer configuration is insufficient; switch to 1v1 and press F5 in game to reduce speed.
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 Servers
- AlicenseCqualityDmaintenanceAllows AI assistants to connect to and control Minecraft players on remote servers, enabling navigation, building, mining, inventory management, entity interaction, and chat communication through natural language commands.271113MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI tools to play the game DEFCON by providing tools to communicate with the game, analyze game state, and issue commands such as placing structures, moving fleets, and launching nukes.3
- AlicenseNot gradedqualityDmaintenanceBridges AI assistants to running game instances for testing, debugging, and verification. Works with any game engine via a simple TCP protocol.18MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to remotely control a Minecraft player, including navigation, mining, building, and interaction with the world and other players.MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
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/ainaxiya/sc-bwapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server