CU-MCP-Bridge
CU-MCP-Bridge
BepInEx-Mod + Python-MCP-Server, der KI-Assistenten ermöglicht, das Gameplay von Casualties Unknown in Echtzeit über eine Named Pipe zu steuern.
Voraussetzungen
Windows 10/11
Casualties Unknown (Steam)
Python 3.10+
.NET SDK (zum Erstellen des Mods)
BepInEx im Spiel installiert
Related MCP server: Unity-MCP
Schnellstart
1. Mod installieren
Kopiere die beiden DLLs aus mod/ in den Ordner BepInEx/plugins/ deines Spiels:
<game directory>/BepInEx/plugins/CU-MCP-Mod.dll
<game directory>/BepInEx/plugins/Newtonsoft.Json.dll2. Python-Abhängigkeiten installieren
pip install -r requirements.txt3. KI-Client konfigurieren
Füge zu deiner MCP-Konfiguration hinzu (z. B. opencode.json):
{
"mcp": {
"servers": {
"cu-mcp-bridge": {
"type": "stdio",
"command": "python",
"args": ["src/bridge_server/server.py"],
"cwd": "/path/to/CU-MCP-Bridge"
}
}
}
}4. Spielen
Starte das Spiel und betrete ein Level
Starte den Python-Server:
python src/bridge_server/server.pyBitte deinen KI-Assistenten, den Spieler zu steuern
Die Reihenfolge ist wichtig: Der Server muss nach dem Start des Spiels gestartet werden.
Aus dem Quellcode erstellen
# 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 deployAusgabe: BepInEx/bin/Release/net472/CU-MCP-Mod.dll
Architektur
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)Kommunikation
KI -> Spiel: Befehle werden über die Named Pipe gesendet und im Hauptthread von Unity ausgeführt.
Spiel -> KI: Spielerzustand und Abfrageergebnisse fließen über dieselbe Pipe zurück.
Blockierung: Jeder Befehl blockiert, bis der Mod den Abschluss meldet (Erfolg/Fehler/Timeout).
Projektstruktur
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-Tools
Tool | Beschreibung |
| Spielerzustand (Position, Gesundheit, Inventar) + Umgebungs-Snapshot |
| Gelände- und Entitätsinformationen um den Spieler |
| Liste der in der Nähe des Spielers abgelegten Gegenstände |
| Entitäten/Gelände an einer bestimmten Weltkoordinate abfragen |
| Gelände nach Materialname durchsuchen (z. B. „Sand“, „Fels“) |
| Bewege den aktiven Spieler zu einer Weltposition |
| Bewege den KI-Begleiter zum menschlichen Spieler |
| Lass den KI-Begleiter dem Menschen folgen |
| Springen (unterstützt horizontale Richtung) |
| Verwende einen Inventargegenstand |
| Hebe einen nahen Gegenstand auf (anhand des Namens oder den nächstgelegenen) |
| Wirf einen Inventargegenstand ab |
| Ruhe dich aus, um Energie wiederherzustellen |
| Heile eine bestimmte Gliedmaße des KI-Begleiters |
| Kioniere einen KI-Begleiter neben dem Menschen |
| Entferne den KI-Begleiter |
| Lege Bedingungs-Aktions-Regeln fest (z. B. „heilen, wenn HP < 30 %“) |
| Aktualisiere Kontingenzregeln zur Laufzeit |
| Menschlicher Eingriff mit höchster Priorität |
Bekannte Probleme
Kompatibilität mit Skin-Mods: Die Installation von Skin-Mods von Drittanbietern (z. B. „Skin Sync“) kann dazu führen, dass der KI-Begleiter einen doppelten Schwanz anzeigt, der den Schwanz des menschlichen Spielers spiegelt. Dies ist ein Kompatibilitätsproblem mit Skin-Mods und tritt im Vanilla-Spiel nicht auf.
Lizenz
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