sc-bwapi-mcp
sc-bwapi-mcp
Eine BWAPI-Brücke, die es KI-Assistenten (wie Trae/Claude) über MCP (Model Context Protocol) ermöglicht, StarCraft 1 zu steuern.
Architektur
星际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
Voraussetzungen
Komponente | Version | Beschreibung |
StarCraft | 1.16.1 | Normale Version (nicht Remastered), Anthology über den Battle.net-Client kostenlos herunterladbar |
BWAPI | 4.4.0 | |
Visual Studio | 2022 Community | Bei der Installation „Desktopentwicklung mit C++" anhaken |
uv | 0.12+ | Python-Paketmanager https://astral.sh/uv |
Chaoslauncher | (in BWAPI enthalten) | Injiziert BWAPI.dll in den StarCraft-Prozess |
Installationsschritte
1. StarCraft 1 + BWAPI installieren
StarCraft Anthology über den Battle.net-Client herunterladen (kostenlos), in einen Pfad ohne Leerzeichen installieren, z. B.
C:\Games\StarcraftBWAPI 4.4.0 herunterladen, in einen Pfad ohne Leerzeichen installieren, z. B.
C:\libraries\BWAPI_440Umgebungsvariable
BWAPI_DIR=C:\libraries\BWAPI_440setzenDen Inhalt von
StarCraft\undWindows\aus dem BWAPI-Installationsverzeichnis in das StarCraft-Verzeichnis kopieren
2. BWAPI-Bibliothek kompilieren (beim ersten Mal erforderlich)
Die .lib-Dateien von BWAPI 4.4.0 müssen mit VS2022 kompiliert werden:
$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. Bridge kompilieren
cd <项目目录>
scripts\build_bridge.batAusgabe: cpp\build\Release\bwapi_bridge.exe
4. bwapi.ini konfigurieren
Stelle sicher, dass bwapi-data\bwapi.ini im StarCraft-Verzeichnis Folgendes enthält:
[ai]
ai = bwapi-data/AI/ExampleAIModule.dll
[auto_menu]
auto_menu = OFFVerwendung
Startreihenfolge (wichtig!)
Chaoslauncher als Administrator ausführen → „BWAPI Injector 4.4.0 [RELEASE]" aktivieren → noch nicht auf Start klicken
Bridge starten:
scripts\run_bridge.bat(wartet auf den BWAPI-Server)In Chaoslauncher auf Start klicken → StarCraft öffnen → Single Player → Expansion → Play Custom → Karte wählen → Starten
Sobald das Spiel läuft, verbindet sich die Bridge automatisch und sendet den Status
MCP-Client konfigurieren
In der MCP-Konfiguration von Trae Folgendes hinzufügen:
{
"mcpServers": {
"sc-bwapi": {
"command": "C:\\Users\\<你>\\.local\\bin\\uv.exe",
"args": ["run", "--directory", "<项目路径>", "sc-bwapi-mcp"]
}
}
}Trae neu starten; dann können die Tools aufgerufen werden.
MCP-Tools
Tool | Parameter | Funktion |
| Keine | Liest den Spielstatus (Mineralien/Gas/Versorgung/alle Einheiten) |
|
| Trainiert eine Einheit (z. B. |
|
| Baut ein Gebäude (findet automatisch eine bebaubare Position) |
|
| Bewegt eine Einheit zu Pixelkoordinaten |
|
| Greift eine Zieleinheit an |
|
| Sammelt Mineralien/Gas |
|
| Stoppt die aktuelle Aktion |
|
| Hält die Position |
|
| Sendet eine Nachricht im Spiel |
Fehlerbehebung
Bridge bleibt bei „Game table mapping not found" hängen: StarCraft ist nicht gestartet – das Warten ist normal
Bridge kann keine Verbindung zur Pipe herstellen: Spiel beenden und neu starten (die Bridge wurde zuvor gewaltsam beendet; das connected-Flag von BWAPI hängt fest)
build schlägt fehl: Die Bridge verwendet
getBuildLocation, um automatisch eine Position zu finden. Stelle sicher, dass sich im Creep-Bereich freies Gelände befindet0 FPS: Die Hardware reicht nicht aus; auf 1v1 umstellen und im Spiel F5 drücken, um die Geschwindigkeit zu reduzieren
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