moo2-mcp
The server provides read-only access to live game state from a running Master of Orion 2 session in DOSBox-X, enabling an AI to observe the game via MCP tools. Here's what you can do:
get_turn: Get the current turn number (stardate in tenths; divide by 10 for the displayed turn).get_empire_status: Retrieve the player empire's core stats (treasury, income, research, food, etc.), with unresolved fields set tonulland listed inunavailable.list_colonies/get_colony: List or get details for colonies (owner, population, outputs for food, production, research; buildings and production queue currently unavailable).get_home_colony: Get population and labor output for the player's home colony.get_player_empire: Identify the player's empire ID and home system.list_empires: List all empires with ID, name, player flag, and scalar stats like treasury.list_systems: List star systems (name, coordinates, exploration status, planet indices, ownership).list_system_planets: List planets in a system with physical characteristics (type, size, gravity, climate, mineral richness).list_ships: List the player's ships (name, design, location).list_fleets: Not yet implemented; always errors.get_game_state: Get a snapshot combining empire, colony, and fleet info (fleet data currently unresolved).
All tools are read-only and require an active game in DOSBox-X. Fleet grouping and colony buildings/production are currently unresolved.
Click on "Deploy 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., "@moo2-mcp what turn is it?"
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.
moo2-mcp
An experiment to let an AI (via Claude) play Master of Orion 2, the 1996 DOS-era 4X strategy game, while it runs inside the DOSBox-X emulator.
Because the emulator isn't modified, the project works in two directions:
MCP tools
The server (python -m moo2mcp.server, stdio) exposes these read-only tools. Every one
of them reads a live DOSBox-X process and raises a descriptive error — rather than
returning a misleading number — when the target is unavailable or no game is loaded.
Tool | Returns |
| the current turn as an integer: the stardate in tenths (÷10 for the displayed value) |
| the player empire: |
| one entry per colony: |
| a single colony in the same shape, indexed as in |
| the home colony's |
|
|
| per system: |
| per planet: |
| per ship: |
| fleets by |
| a consistent snapshot — |
Related MCP server: local-game-mcp
Reading game state
The game's state is read by peeking directly into the emulator's memory. Locations of interest are reverse-engineered two ways: by changing one thing in-game and observing which memory bytes move, and by searching for structures whose shape is already known — for instance, the planet table was found because each planet must point back at the star that lists it, and only one array in 16 MB reproduced that map.
Those values are exposed through an MCP server, so an AI can ask what turn it is, how much money it has, what its colonies are producing, or which nearby planets are worth settling. What is readable today:
Empire — turn, treasury, income, research, food
Colonies — the planet's name, population, and the food/production/research its workers generate
Galaxy — star systems with their map positions, and every planet's size, gravity, climate and mineral richness
Ships — each ship's name, design and the system it is in
Anything not yet reverse-engineered is reported as unavailable rather than guessed, so a wrong answer never reaches the AI. Buildings, production queues, and how ships group into fleets are the main gaps.
One quirk worth knowing: MOO2 gives no reliable way to tell which of the five empires the player is. So the harness names the player's home star with a fixed marker, and the read path finds that star by name and works backwards to the player's identity.
MCP tools
All read-only, over stdio (python -m moo2mcp.server).
Tool | Returns |
| the live stardate (in tenths; ÷10 for the displayed value) |
| the player empire: |
| every empire: |
| which empire the player is: |
| colonies: |
| the home colony alone, found by verifying the record's owner rather than assuming its index |
| star systems: |
| one system's planets: |
| the player's ships: |
| errors — how ships group into fleets is not reverse-engineered |
| a snapshot of empire + colonies + fleets, with unreadable domains |
Controlling the game
The game is driven by simulating mouse clicks and keystrokes through a virtual screen (Xephyr + xdotool), since the host desktop blocks normal automation. A harness can launch the game and start a new match from cold, and a second mode lets Claude drive the live UI a screenshot at a time — which is how the memory locations get correlated with what the game actually displays.
This UI driving is a reverse-engineering and verification tool, not the plan for playing. Real gameplay actions are meant to go below the UI, because synthetic input is fragile: MOO2's drags are really two separate clicks, and a stray click in the wrong panel silently reassigns a colony's workers.
In short, this is the plumbing that lets an AI observe and eventually drive an old strategy game it otherwise can't talk to.
Setup, the resolved memory map, and how each address was found are in
docs/setup.md.
Available Tools
2 toolsget_empire_statusA
Return the player empire's core stats, read live from DOSBox-X.
Includes the turn and any reverse-engineered empire fields (e.g. treasury). Fields
not yet resolved are null and listed in unavailable — never a guessed value.
Requires DOSBox-X running MOO2 with a game in progress.
Inputs: no named parameters.
get_turnA
Return Master of Orion 2's current turn number, read live from DOSBox-X.
Requires DOSBox-X running MOO2 with a game in progress. Raises a descriptive error if the target is unavailable or no game is loaded.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Each tool targets a distinct aspect of the game state: one returns comprehensive empire stats including turn, treasury, and unavailable fields, while the other returns only the turn number. There is no overlap in purpose.
Both tools follow the consistent 'get_{resource}' pattern with snake_case, making their behavior predictable.
With only 2 tools, the server feels undersized for a game interaction domain. A typical MCP server for a game would include a broader set of actions (e.g., send commands, manage colonies) beyond just reading status.
The tool surface is severely limited: it provides read-only access to turn and empire status, with no ability to influence the game, issue orders, or manage other game mechanics. This leaves major gaps for any agent trying to interact with the game.
Maintenance
Related MCP Connectors
MMO game for AI agents: mine, trade, craft, explore, and battle in a galaxy of ~500 systems
Free browser MMO your AI plays via MCP: mine, trade, fight in 50 sectors. No download.
Savecraft serves real save game data and expert game knowledge to AI assistants.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Related MCP Servers
- AlicenseBqualityBmaintenanceBridges AI agents to a DOSBox emulator, enabling control of DOS programs via MCP tools for typing, screen reading, video capture, Lua scripting, and memory access.4724 PyPI3GPL 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to play local Windows games through low-level keyboard/mouse input, screen capture, OCR, and per-game profiles for semantic actions.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to connect to and control a windowed copy of Romance of the Three Kingdoms IX with Power Up Kit, letting them observe the game UI, gather officer/city intelligence, issue facility/transport commands, and advance turns through exposed MCP tools.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with Hearts of Iron IV by reading live game memory and sending commands through the game's own command queue for real-time gameplay and strategic decisions.26-