LC

lancercomet/cities-skylines-2-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

53 stars 19 forks 품질 80 트렌드 9Apache-2.0

도시 스카이라인 2 MCP

개요

실행 도시에 Claude (또는 MCP 클라이언트) 제공: Skylines II 게임: 읽기 도시 데이터, 카메라를 구동하고 스크린 샷을 구축, 도로 및 건물, 페인트 영역, 금융 및 정책을 관리, 시뮬레이션 시간을 제어. - (C#): 게임 프로세스 내부 127.0.0.1에 TcpListener 바인딩에 최소 HTTP 서버를 실행합니다. 요청은 Listener 스레드에 의해 할당되며 SystemUpdatePhase에 등록된 ECS 시스템에 의해 시뮬레이션 메인 스레드에서 실행됩니다. UIUpdate (사용중인 동안의 작품). 건설은 게임의 네이티브 정의 / 유효성 / 승인 파이프 라인을 사용하여 사용자 정의 ToolBaseSystem을 통해 이동; 철거는 불도저 파이프를 통해 간다 - 게임 검증을 우회하는 엔티티티 mutations. - (TypeScript): MCP 도구는 교량 모드에 대한 HTTP 요청으로 호출, stdio 수송. - Windows + 도시 : Skylines II (Steam) - .NET SDK 8.0 + (모드를 구축하려면) - 노드.

개요(AI 번역)

English | 한국어

Claude (또는 MCP 클라이언트) ** 전체 제어 ** 실행 도시에: Skylines II 게임: 읽기 도시 데이터, 카메라를 구동하고 스크린 샷을 구축, 도로 및 건물을 구축, 페인트 영역, 금융 및 정책을 관리, 시뮬레이션 시간을 제어.

건축

-In-game mod (C#): 게임 프로세스 내에서 최소한의 HTTP 서버를 실행합니다. 요청은 Listener 스레드에 의해 할당되며, SystemUpdatePhase.UIUpdate]에 등록된 ECS 시스템에 의해 시뮬레이션 메인 스레드에 실행됩니다 (사용중인 동안 작품). 건설은 게임의 네이티브 정의 / 유효성 / 승인 / 승인 파이프를 사용하여 사용자 정의 ToolBaseSystem를 통해 간다; 철거는 불도저 파이프라인을 통해 간다 - 게임 검증을 우회하는 엔티티티티 mutations.

  • MCP 서버 (TypeScript): MCP 도구는 교량 모드에 대한 HTTP 요청으로 호출하여 stdio 수송을 진행합니다.

요구 사항

  • Windows + 도시 : 스카이 라인 II (팀)
  • .NET SDK 8.0+ (모드 구축)
  • Node.js 18+ (MCP 서버를 실행하려면)

빌드 및 설치

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

CS2MCP — An MCP Server for Cities: Skylines II

English | 简体中文

Give Claude (or any MCP client) full control over a running Cities: Skylines II game: read city data, drive the camera and take screenshots, build roads and buildings, paint zones, manage finances and policies, and control simulation time.

Architecture

Claude Code / Claude Desktop (any MCP client)
      │  MCP (stdio)
      ▼
cs2-mcp  (mcp-server/, Node.js process)
      │  HTTP, localhost-only 127.0.0.1:8642
      ▼
CS2MCP bridge mod  (CS2MCP.Bridge/, inside the game process)
      │  all ECS reads/writes run on the simulation main thread
      ▼
Cities: Skylines II
  • In-game mod (C#): runs a minimal HTTP server on a TcpListener bound to 127.0.0.1 inside the game process. Requests are queued by listener threads and executed on the simulation main thread by an ECS system registered at SystemUpdatePhase.UIUpdate (works while paused). Construction goes through a custom ToolBaseSystem using the game’s native definition/validation/apply pipeline; demolition goes through the bulldozer pipeline — no entity mutations that bypass game validation.
  • MCP server (TypeScript): translates MCP tool calls into HTTP requests against the bridge mod, over stdio transport.

Requirements

  • Windows + Cities: Skylines II (Steam)
  • .NET SDK 8.0+ (to build the mod)
  • Node.js 18+ (to run the MCP server)

Build & Install

# 1. Build the in-game mod (auto-deploys to the game's local Mods folder)
dotnet build CS2MCP.Bridge\CS2MCP.Bridge.csproj

# 2. Build the MCP server
cd mcp-server
npm install
npm run build

The mod deploys to %USERPROFILE%\AppData\LocalLow\Colossal Order\Cities Skylines II\Mods\CS2MCP\ and loads automatically on game start — no Paradox Mods publishing required. To disable it temporarily, rename the folder to .CS2MCP.

Game path configuration

Building the mod references assemblies from the game folder. Resolution order (first match wins):

  1. Command line: dotnet build -p:GamePath="X:\...\Cities Skylines II"
  2. CS2_PATH environment variable
  3. CSII_INSTALLATIONPATH environment variable (set by the official modding toolchain)
  4. Auto-probing of common Steam library locations (C:\Program Files (x86)\Steam, Steam / SteamLibrary on common drive letters)

If the game cannot be found the build fails with a clear error. Example:

setx CS2_PATH "D:\Steam\steamapps\common\Cities Skylines II"

Runtime environment variables (.env supported)

The MCP server loads mcp-server/.env via dotenv (see .env.example):

Variable Scope Default Description
CS2_BRIDGE_URL MCP server http://127.0.0.1:8642 Address of the bridge mod
CS2MCP_PORT game process 8642 Bridge listen port (change both together)
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "cs2": { "command": "node", "args": ["<repo-path>\\mcp-server\\dist\\index.js"] } } }