Skip to main content
Glama

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/에서 두 DLL을 게임의 BepInEx/plugins/ 폴더에 복사하세요:

<game directory>/BepInEx/plugins/CU-MCP-Mod.dll
<game directory>/BepInEx/plugins/Newtonsoft.Json.dll

2. Python 종속성 설치

pip install -r requirements.txt

3. 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. 플레이

  1. 게임을 시작하고 레벨에 진입하세요

  2. Python 서버를 시작하세요: python src/bridge_server/server.py

  3. AI 어시스턴트에게 플레이어를 제어하도록 요청하세요

순서가 중요합니다: 서버는 게임이 실행된 후에 시작해야 합니다.

소스에서 빌드

# 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 dependencies

MCP 도구

도구

설명

get_game_state

플레이어 상태(위치, 체력, 인벤토리) + 환경 스냅샷

get_map_info

플레이어 주변의 지형 및 엔티티 정보

get_nearby_items

플레이어 근처에 떨어진 아이템 목록

query_position

특정 월드 좌표의 엔티티/지형 조회

search_blocks

재질 이름(예: "sand", "rock")으로 지형 검색

move_to

활성 플레이어를 월드 위치로 이동

move_to_player

AI 동료를 인간 플레이어에게 이동

follow

AI 동료가 인간을 따라다니게 함

jump

점프(수평 방향 지원)

use_item

인벤토리 아이템 사용

pick_up_item

근처 아이템 줍기(이름 또는 가장 가까운 것)

drop_item

인벤토리 아이템 버리기

sleep

휴식으로 에너지 회복

heal_ai

AI 동료의 특정 신체 부위 치료

create_ai_player

인간 옆에 AI 동료 복제

destroy_ai_player

AI 동료 제거

set_contingency

조건-행동 규칙 설정(예: "HP < 30%면 치료")

update_contingency

런타임에 조건부 규칙 업데이트

user_interact

최우선순위 인간 개입

알려진 문제

  • 스킨 모드 호환성: 서드파티 스킨 모드(예: "Skin Sync")를 설치하면 AI 동료가 인간 플레이어의 꼬리를 복제한 추가 꼬리를 표시할 수 있습니다. 이는 스킨 모드 호환성 문제이며, 기본 게임에서는 발생하지 않습니다.

라이선스

MIT

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

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