cities-skylines-mayor
MCP server + in-game bridge that lets an AI agent play Cities: Skylines (2015) through the game's own tool code — no cursor, no screenshots.
Let an AI agent play Cities: Skylines (the 2015 original) as the city's mayor. An MCP server gives the agent 52 tools to read the city, pull every lever and build. Building goes through the game's own tool code, so the agent needs no cursor and no screenshots. You need Windows, Cities: Skylines 1.21+, the .NET 10 runtime and an MCP client (Claude Code, opencode, …). 1. Install the mod. Download cs1-mayor-mod-*.zip from the latest release and copy SkylinesAgentBridge.dll to %LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\SkylinesAgentBridge\.
Summary extracted from the README.
CS1 Mayor
Let an AI agent play Cities: Skylines (the 2015 original) as the city's mayor. An MCP server gives the agent 52 tools to read the city, pull every lever and build. Building goes through the game's own tool code, so the agent needs no cursor and no screenshots.
AI agent ──MCP (stdio)──▶ MCP server (.NET 10) ──HTTP, localhost──▶ bridge mod (inside the game)
- See:
city_overviewreturns the whole pulse in one call.city_mapdraws a top-down map from game data, with world coordinates on it. - Build: roads, pipes, power lines, buildings, zoning and bulldozing use the same rules as the player's tools. A refused build returns the game's own error and a hint.
- Run the city: time, taxes, budgets, policies, transit lines, districts, map tiles, scenario goals and saves.
- Safe for the save file: every game read and write happens on the game's simulation
thread, and
city_threadsproves it.
Quick start
You need Windows, Cities: Skylines 1.21+, the .NET 10 runtime and an MCP client (Claude Code, opencode, …).
-
Install the mod. Download
cs1-mayor-mod-*.zipfrom the latest release and copySkylinesAgentBridge.dllto%LOCALAPPDATA%\Colossal Order\Cities_Skylines\Addons\Mods\SkylinesAgentBridge\. Then enable it in Content Manager → Mods. -
Unpack the MCP server (
cs1-mayor-mcp-*.zip) anywhere, e.g.C:\tools\cs1-mayor-mcp. -
Connect your agent. For Claude Code:
claude mcp add cs1-mayor -- dotnet C:\tools\cs1-mayor-mcp\Cs1Mayor.Mcp.dll -
Load a city and check the bridge:
Invoke-RestMethod http://127.0.0.1:32123/debug/threadsmust report"runsOnSimulationThread": true. -
Ask the agent: "You are the mayor. Start with
city_overviewandcity_map, and tell me what this city needs."
To set up opencode, build from source, or troubleshoot, see docs/getting-started.md.
Documentation
| Getting started | Install, connect Claude Code or opencode, build from source, troubleshooting |
| Tools | All 52 tools, grouped by job, and how building works |
| AGENTS.md | The operating manual the AI mayor follows |
| Game mechanics | Demand, taxes, coverage, level-up and happiness, from the game's code |
| Architecture | How the pieces fit, and the threading rule |
| Bridge API | The HTTP endpoints behind the tools |
| Development | Code map, build, test, and the issue-first workflow |
The full index is in docs/README.md.
Contributing
Every change starts as an issue. Read CONTRIBUTING before opening a PR. The release history is in CHANGELOG.md, and security reports go through SECURITY.md.
Credits and license
MIT (LICENSE). This project is forked from Sunwood-ai-labs/cities-skylines1-agent-skill (MIT, LICENSE.upstream). The HTTP server and the first state and command code come from there; the threading model, the MCP server and validated building are new. Cities: Skylines is © Colossal Order / Paradox Interactive. This project is not affiliated with or endorsed by them.