sc-bwapi-mcp
sc-bwapi-mcp
Puente de BWAPI que permite a asistentes de IA (como Trae/Claude) operar StarCraft 1 mediante MCP (Model Context Protocol).
Arquitectura
星际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
Requisitos previos
Componente | Versión | Descripción |
StarCraft | 1.16.1 | Versión normal (no remasterizada), descargar Anthology gratis desde el cliente de Battle.net |
BWAPI | 4.4.0 | |
Visual Studio | 2022 Community | Al instalarlo, marcar "Desarrollo de escritorio con C++" |
uv | 0.12+ | Gestor de paquetes de Python https://astral.sh/uv |
Chaoslauncher | (BWAPI 自带) | Inyecta BWAPI.dll en el proceso de StarCraft |
Pasos de instalación
1. Instalar StarCraft 1 + BWAPI
Descargar StarCraft Anthology desde el cliente de Battle.net (gratis) e instalarlo en una ruta sin espacios, como
C:\Games\StarcraftDescargar BWAPI 4.4.0 e instalarlo en una ruta sin espacios, como
C:\libraries\BWAPI_440Configurar la variable de entorno
BWAPI_DIR=C:\libraries\BWAPI_440Copiar el contenido de
StarCraft\yWindows\del directorio de instalación de BWAPI al directorio de StarCraft
2. Compilar la biblioteca de BWAPI (obligatorio la primera vez)
Los archivos .lib de BWAPI 4.4.0 deben generarse compilando con 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. Compilar el bridge
cd <项目目录>
scripts\build_bridge.batSalida: cpp\build\Release\bwapi_bridge.exe
4. Configurar bwapi.ini
En el directorio de StarCraft, asegurar que bwapi-data\bwapi.ini contenga:
[ai]
ai = bwapi-data/AI/ExampleAIModule.dll
[auto_menu]
auto_menu = OFFInstrucciones de uso
Orden de inicio (¡importante!)
Ejecutar Chaoslauncher como administrador → marcar "BWAPI Injector 4.4.0 [RELEASE]" → no hacer clic en Start todavía
Iniciar el bridge:
scripts\run_bridge.bat(espera al servidor de BWAPI)Hacer clic en Start en Chaoslauncher → entrar en StarCraft → Single Player → Expansion → Play Custom → elegir mapa → comenzar
Una vez en la pantalla del juego, el bridge se conecta automáticamente y envía el estado
Configurar el cliente MCP
Añadir en la configuración MCP de Trae:
{
"mcpServers": {
"sc-bwapi": {
"command": "C:\\Users\\<你>\\.local\\bin\\uv.exe",
"args": ["run", "--directory", "<项目路径>", "sc-bwapi-mcp"]
}
}
}Reinicia Trae y podrás usar las herramientas.
Herramientas MCP
Herramienta | Parámetros | Descripción |
| Ninguno | Leer el estado del juego (minerales/gas/suministro/todas las unidades) |
|
| Entrenar una unidad (p. ej. |
|
| Construir un edificio (busca automáticamente una posición válida) |
|
| Mover una unidad a coordenadas de píxel |
|
| Atacar a la unidad objetivo |
|
| Recolectar minerales/gas |
|
| Detener la acción actual |
|
| Mantener la posición |
|
| Enviar un mensaje en el juego |
Solución de problemas
El bridge se queda en "Game table mapping not found": StarCraft no se ha iniciado; es normal que espere
El bridge no conecta con el pipe: sal del juego y vuelve a entrar (si el bridge fue terminado forzosamente, el indicador connected de BWAPI se queda bloqueado)
build falla: el bridge usa
getBuildLocationpara buscar automáticamente una posición; asegúrate de que haya espacio libre dentro del alcance del creep0 FPS: la computadora no es lo bastante potente; cambia a 1v1 y pulsa F5 en el juego para reducir la velocidad
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