CU-MCP-Bridge
CU-MCP-Bridge
BepInEx モッド + Python MCP サーバー。AI アシスタントが名前付きパイプを介して Casualties Unknown のゲームプレイをリアルタイムに操作できるようにします。
要件
Windows 10/11
Casualties Unknown (Steam)
Python 3.10+
.NET SDK(モッドのビルド用)
BepInEx がゲームにインストールされていること
Related MCP server: Unity-MCP
クイックスタート
1. モッドのインストール
mod/ から 2 つの DLL をゲームの BepInEx/plugins/ フォルダーにコピーします:
<game directory>/BepInEx/plugins/CU-MCP-Mod.dll
<game directory>/BepInEx/plugins/Newtonsoft.Json.dll2. Python の依存関係のインストール
pip install -r requirements.txt3. AI クライアントの設定
MCP 設定(例: opencode.json)に追加します:
{
"mcp": {
"servers": {
"cu-mcp-bridge": {
"type": "stdio",
"command": "python",
"args": ["src/bridge_server/server.py"],
"cwd": "/path/to/CU-MCP-Bridge"
}
}
}
}4. プレイ
ゲームを起動してレベルに入る
Python サーバーを起動する:
python src/bridge_server/server.pyAI アシスタントにプレイヤーの操作を依頼する
順序が重要です: サーバーはゲームの実行後に起動する必要があります。
ソースからのビルド
# Build the C# mod
dotnet build BepInEx/CU-MCP-Mod.csproj -c Release
# Deploy to game (kills the game process, rebuilds, copies DLL)
.\deploy.ps1 -Action deploy出力: BepInEx/bin/Release/net472/CU-MCP-Mod.dll
アーキテクチャ
AI Client (opencode)
|
stdio (JSON-RPC)
|
Python FastMCP Server (src/bridge_server/)
|
Named Pipe (win32pipe, newline-delimited JSON)
|
C# BepInEx Mod (BepInEx/, inside Unity game)
|
Unity Game (Casualties Unknown)通信
AI -> Game: 注文は名前付きパイプを介して送信され、Unity のメインスレッドで実行されます。
Game -> AI: プレイヤーの状態とクエリ結果は同じパイプを介して返送されます。
ブロッキング: 各コマンドは、モッドが完了(成功/失敗/タイムアウト)を報告するまでブロックされます。
プロジェクト構造
CU-MCP-Bridge/
├── BepInEx/ # C# mod source (BepInEx plugin)
│ ├── Executor/ # Order execution, pathfinding, movement
│ ├── Collector/ # Game state collection (player, environment)
│ ├── Contingency/ # Local condition-action rules
│ ├── Pipe/ # Named pipe client + protocol
│ ├── AIPlayerManager.cs # AI companion creation/destruction
│ ├── BridgePlugin.cs # Entry point, tick loop
│ └── DebugGUI.cs # F6 debug panel
├── src/bridge_server/ # Python MCP server
│ ├── server.py # MCP tool definitions
│ ├── state_manager.py # Pipe reader, state cache
│ ├── order_manager.py # Order queue
│ ├── pipe_server.py # Named pipe server (win32pipe)
│ └── contingency.py # Contingency rule manager
├── tests/ # Unit & integration tests
├── deploy.ps1 # Build + deploy script
└── requirements.txt # Python dependenciesMCP ツール
ツール | 説明 |
| プレイヤーの状態(位置、体力、インベントリ)+ 環境スナップショット |
| プレイヤー周辺の地形とエンティティ情報 |
| プレイヤー近くのドロップアイテムの一覧 |
| 特定のワールド座標にあるエンティティ/地形を照会 |
| マテリアル名で地形を検索(例: "sand", "rock") |
| アクティブなプレイヤーをワールド座標へ移動 |
| AI コンパニオンを人間のプレイヤーの場所へ移動 |
| AI コンパニオンに人間を追従させる |
| ジャンプ(水平方向に対応) |
| インベントリのアイテムを使用 |
| 近くのアイテムを拾う(名前指定または最寄り) |
| インベントリのアイテムを落とす |
| 休息してエネルギーを回復 |
| AI コンパニオンの特定の部位を治療 |
| 人間の隣に AI コンパニオンを複製 |
| AI コンパニオンを削除 |
| 条件アクションルールを設定(例: "heal if HP < 30%") |
| 実行時にコンティンジェンシールールを更新 |
| 最優先の人間による介入 |
既知の問題
スキンモッドの互換性: サードパーティ製のスキンモッド(例: "Skin Sync")をインストールすると、AI コンパニオンに人間のプレイヤーの尻尾を映した重複した尻尾が表示される場合があります。これはスキンモッドの互換性の問題であり、バニラゲームでは発生しません。
ライセンス
MIT
This server cannot be installed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
MCP server for AI dialogue using various LLM models via AceDataCloud
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for Hailuo (MiniMax) AI video generation
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP Unity Server to integrate Unity Editor game engine with different AI Model clients (e.g. Claude Desktop, Windsurf, Cursor)5101,880MIT
- AlicenseNot gradedqualityAmaintenanceSeamless automation and intelligent control over your Unity projects. By integrating with the MCP server and client, it allows AI agents or external tools to interact with your Unity environment—creating, modifying, and managing GameObjects, Components, Assets, Scenes, and more.4,016Apache 2.0
- AlicenseAqualityBmaintenanceMCP server to dynamically load Claude Code skills into AI agents56215MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that bridges Unity with AI agents, enabling scene inspection, C# code execution, and screenshot capture via WebSocket communication.MIT
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/mouse114514/CU-MCP-Bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server