sc-bwapi-mcp
sc-bwapi-mcp
MCP (Model Context Protocol) を介して AI アシスタント (Trae/Claude など) が StarCraft 1 の BWAPI ブリッジを操作できるようにします。
アーキテクチャ
星际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
前提条件
コンポーネント | バージョン | 説明 |
StarCraft | 1.16.1 | 通常版 (リマスター版ではない)。Battle.net クライアントから Anthology を無料ダウンロード |
BWAPI | 4.4.0 | |
Visual Studio | 2022 Community | インストール時に「C++ によるデスクトップ開発」にチェックを入れる |
uv | 0.12+ | Python パッケージマネージャー https://astral.sh/uv |
Chaoslauncher | (BWAPI 付属) | BWAPI.dll を StarCraft プロセスに注入する |
インストール手順
1. StarCraft 1 + BWAPI をインストール
Battle.net クライアントから StarCraft Anthology (無料) をダウンロードし、スペースを含まないパス (例:
C:\Games\Starcraft) にインストールするBWAPI 4.4.0 をダウンロードし、スペースを含まないパス (例:
C:\libraries\BWAPI_440) にインストールする環境変数
BWAPI_DIRをC:\libraries\BWAPI_440に設定するBWAPI のインストールディレクトリにある
StarCraft\とWindows\の内容を StarCraft ディレクトリにコピーする
2. BWAPI ライブラリをコンパイルする (初回必須)
BWAPI 4.4.0 の .lib ファイルは 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. bridge をコンパイルする
cd <项目目录>
scripts\build_bridge.bat出力: cpp\build\Release\bwapi_bridge.exe
4. bwapi.ini を設定する
StarCraft ディレクトリの bwapi-data\bwapi.ini で次を確認:
[ai]
ai = bwapi-data/AI/ExampleAIModule.dll
[auto_menu]
auto_menu = OFF使用方法
起動順序 (重要!)
管理者として Chaoslauncher を実行 → 「BWAPI Injector 4.4.0 [RELEASE]」にチェック → Start はまだクリックしない
bridge を起動:
scripts\run_bridge.bat(BWAPI サーバーを待機します)Chaoslauncher で Start をクリック → StarCraft に入る → Single Player → Expansion → Play Custom → マップを選択 → 開始
ゲーム画面に入ると、bridge が自動的に接続し、状態をプッシュします
MCP クライアントを設定する
Trae の MCP 設定に以下を追加:
{
"mcpServers": {
"sc-bwapi": {
"command": "C:\\Users\\<你>\\.local\\bin\\uv.exe",
"args": ["run", "--directory", "<项目路径>", "sc-bwapi-mcp"]
}
}
}Trae を再起動すると、ツールを呼び出せます。
MCP ツール
ツール | パラメータ | 説明 |
| なし | ゲーム状態を読み取る (鉱物/ガス/サプライ/全ユニット) |
|
| ユニットを訓練する (例: |
|
| 建物を建設する (建設可能な位置を自動検索) |
|
| ユニットをピクセル座標へ移動 |
|
| 対象ユニットを攻撃 |
|
| 鉱物/ガスを採集 |
|
| 現在の行動を停止 |
|
| その場で待機 |
|
| ゲーム内でメッセージを送信 |
トラブルシューティング
bridge が「Game table mapping not found」で止まる: StarCraft が起動していないだけ。通常の待機状態です
bridge がパイプに接続できない: ゲームを一度終了して再度入り直す (以前に bridge が強制終了され、BWAPI の connected フラグが固まった状態)
build が失敗する: bridge は
getBuildLocationで位置を自動検索します。creep 範囲内に空きスペースがあることを確認してください0 FPS: PC の性能が足りない。1v1 に変更し、ゲーム内で F5 を押して速度を下げる
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