OpenTTD Directorate MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenTTD Directorate MCPplan a new rail route from coal mine to power plant"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenTTD Directorate MCP
Give an LLM agent a bounded, verifiable control plane for playing OpenTTD.
OpenTTD Directorate connects an MCP-capable agent to an OpenTTD 15.3 server. The agent can inspect the live world, plan transport routes, apply construction programs, commission vehicles, and verify that a route actually works and earns money. It is designed for persistent autonomous play without reducing the game to blind console commands.
This is both:
a TypeScript MCP server that exposes typed tools to an AI agent; and
an OpenTTD GameScript package that performs guarded planning, construction, persistence, and verification inside the game.
It is not an AI model, an OpenTTD server distribution, or a save-game bot. You bring OpenTTD, an MCP client, and the agent you want to operate it.
What an agent can do
The MCP surface exposes:
observe— read map, company, route, plan, and economy state;plan— create and advance bounded route plans;apply— execute a compiled construction program;commission— buy and configure the first vehicle for a route;verify— prove topology, commissioning, and economic operation;execute— issue explicitly allowed GameScript commands;chat— send bounded in-game chat messages; andrcon— perform explicitly authorized server administration.
A successful tool response is not treated as proof by itself. Plans and operations are persisted, operation IDs are replay-safe, and commissioned routes can be read back and checked for topology, vehicle movement, cargo delivery, and revenue.
Related MCP server: godot-mcp-rts
Why this exists
Most generic game-control bridges expose low-level actions and leave the agent to guess whether they worked. OpenTTD Directorate adds the missing operating layer:
typed MCP contracts;
authenticated OpenTTD Admin Network transport;
a GameScript request/response bridge;
bounded station and route planning;
deterministic build programs;
persistent plan and operation journals; and
explicit post-build verification.
That makes it suitable for agents that need to resume after disconnects, avoid duplicating operations, and distinguish “the command returned success” from “the railway actually carries cargo profitably.”
Architecture
LLM agent / MCP client
|
| MCP tools
v
TypeScript MCP server
|
| OpenTTD Admin Network protocol
v
OpenTTD dedicated server
|
| JSON envelopes through Admin <-> GameScript bridge
v
OpenTTD Directorate GameScript
|
+-- planner and site survey
+-- build-program compiler
+-- operation journal
+-- route registry
`-- topology / commissioning / economic verificationMore detail:
Current package
The stable GameScript package lives at game/openttd_directorate and exposes:
class
OpenTTDDirectorateInfo;class
OpenTTDDirectorate;package name
OpenTTD Directorate;short name
DRCT;version
4; andrelease date
2026-07-30.
Internal D4_* and DIRECTORATE_M4_* identifiers are intentionally retained as implementation-level lineage markers.
Requirements
Node.js 20 or newer;
OpenTTD 15.3;
OpenGFX in a standard OpenTTD location, or provided through
OPENTTD_OPENGFX_DIR; andan MCP-capable agent/client.
Install and build
git clone https://github.com/OVER99K/openttd-directorate-mcp.git
cd openttd-directorate-mcp
npm ci --ignore-scripts
npm run buildInstall the GameScript package into OpenTTD's user data directory:
mkdir -p ~/.local/share/openttd/game
cp -a game/openttd_directorate ~/.local/share/openttd/game/Select release version 4 in openttd.cfg:
[game_scripts]
"OpenTTD Directorate" = 4Configure and run the MCP server
cp .env.example .envMinimum configuration:
OPENTTD_ADMIN_HOST=127.0.0.1
OPENTTD_ADMIN_PORT=3977
OPENTTD_ADMIN_PASSWORD=<admin-password>
OPENTTD_ADMIN_NAME=OpenTTD Directorate MCP
OPENTTD_ADMIN_VERSION=0.1.0
MCP_TRANSPORT=stdio
OPENTTD_REQUEST_TIMEOUT_MS=15000
OPENTTD_CONNECT_TIMEOUT_MS=10000
OPENTTD_PING_INTERVAL_MS=30000Start it:
npm run devProduction build:
npm run build
npm startExample MCP client configuration:
{
"mcpServers": {
"openttd-directorate": {
"command": "node",
"args": ["--env-file=.env", "dist/src/index.js"],
"env": {
"MCP_TRANSPORT": "stdio"
}
}
}
}No bearer token is required in stdio mode. The public release intentionally keeps streamable_http disabled; do not expose the Admin port or credentials to untrusted networks.
Components used and borrowed foundations
OpenTTD Directorate is an independent clean-room implementation, but it deliberately builds on established open-source software and public specifications:
OpenTTD — game runtime plus the documented Admin Network and GameScript APIs; GPL-2.0.
Model Context Protocol — tool and transport protocol used between the agent and this server.
Model Context Protocol TypeScript SDK — MCP server and transport implementation; MIT.
Zod — runtime validation for requests and configuration; MIT.
TypeScript — implementation language and compiler; Apache-2.0.
Node.js — JavaScript runtime; MIT.
tsx — development-time TypeScript runner; MIT.
DefinitelyTyped Node types — Node.js type declarations; MIT.
OpenGFX — open graphics set used by disposable OpenTTD fixtures and engine verification; GPL-2.0.
Public OpenTTD Admin Network documentation and GameScript API documentation — interoperability references.
No source or history was copied from prior OpenTTD MCP implementations. The precise clean-room boundary and complete licence/source table are recorded in CLEAN_ROOM.md and THIRD_PARTY.md.
Testing and verification
npm run check
npm audit --audit-level=highOptional exact OpenTTD 15.3 engine gate:
OPENTTD_15_BIN=/path/to/openttd-15.3 \
OPENTTD_OPENGFX_DIR=/path/to/opengfx \
OPENTTD_GATE_EVIDENCE_PATH=/tmp/openttd-directorate-gate.json \
node tests/integration/directorate-real-engine-gate.mjsThe gate uses a disposable fixture and does not write into the tracked GameScript package. Set OPENTTD_GATE_KEEP_FIXTURE=1 only when retaining a failed fixture for diagnosis.
Security boundaries
MCP defaults to stdio transport.
Admin credentials are redacted from logs.
Planning payloads and buffers are bounded.
Path-like untrusted planning inputs are rejected.
Chat and RCON remain narrow, explicit surfaces rather than general gameplay shortcuts.
No credentials or deployment-specific secrets belong in the repository.
Limitations
OpenTTD 15.3 is the validated engine target.
AdminJoinSecureis not yet the default transport handshake.Exact engine verification is optional and resource intensive.
Autonomous play still requires an agent operating policy: company ownership, spending limits, destructive-action gates, and multiplayer etiquette are not choices the protocol should silently invent.
Creator and contributor
OpenTTD Directorate was designed and built by Nicolette, an autonomous AI researcher, writer, and systems operator at nicai.space.
Nicolette is the primary author and maintainer of the MCP server, OpenTTD GameScript integration, planning and verification model, test suite, and documentation. Human direction and operational testing were provided through the nicai.space project environment.
Release provenance
CLEAN_ROOM.mddefines permitted and prohibited implementation inputs.THIRD_PARTY.mdrecords external software, specifications, licences, and source URLs.docs/verification.mddefines exact-SHA evidence and release acceptance policy.
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceDeterministic dependency + CVE context for AI coding tools, over the Model Context Protocol. A ~0.85 MB pure-Rust MCP server.Last updated21MIT
- Alicense-qualityDmaintenanceExtended MCP server for Godot engine with RTS agentic testing, scene/script introspection and mutation, and live game screenshot capture.Last updatedMIT
- Flicense-qualityBmaintenanceA factory for generating Construct 3 games programmatically, exposed as an MCP server.Last updated
- Alicense-qualityBmaintenanceOpen-source, engine-agnostic MCP server shared by Unity-MCP, Godot-MCP, and Unreal-MCP.Last updated9Apache 2.0
Related MCP Connectors
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
MCP server for generating rough-draft project plans from natural-language prompts.
Workflow diagnostics, capability routing, and x402 settlement for MCP-compatible agents.
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/OVER99K/openttd-directorate-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server