rct2-agent

rct2-agent

Enables an agent to sidecar-manage an OpenRCT2 park while you play: reading park state, adjusting prices, staff, marketing, loans, taking screenshots, and controlling game time, with management-only actions that never build.

Category
访问服务器

README

rct2-agent

An MCP server + OpenRCT2 plugin that lets an agent sidecar-manage your park while you play: read the state, act on the business (prices, staff, marketing, loans), see the park (screenshots), and control time. Management only — the agent tunes the business and can recommend building, but never builds.

How it fits together

Claude Code (WSL)
      │ stdio (MCP)
      ▼
MCP server  ── dist/server.mjs, run by Windows node.exe
      │ TCP 127.0.0.1:7860  (newline-delimited JSON)
      ▼
Plugin (intransient) ── loaded inside OpenRCT2, LISTENS on the port
      │
      ▼
   OpenRCT2 game

The server runs under Windows node.exe (there is no node in WSL), so both the server and the plugin sit on the same Windows localhost — no WSL↔Windows networking involved. The plugin listens (it's intransient, so it stays alive across park loads); the server dials in and reconnects as needed.

Requirements

  • OpenRCT2 0.5.4+ (QuickJS engine — needed for Promises/ES2023).
  • Windows Node.js (found here at C:\Program Files\nodejs\node.exe).

Build & install

From WSL, using the Windows toolchain:

# helper wrappers (or just call node.exe / npm-cli.js directly)
NODE="/mnt/c/Program Files/nodejs/node.exe"
NPM=("$NODE" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js")

"${NPM[@]}" install
"${NPM[@]}" run build          # builds dist/rct2-agent.plugin.js + dist/server.mjs
"${NPM[@]}" run install:plugin # copies the plugin into your OpenRCT2 plugin folder

install:plugin copies to C:\Users\casey\OneDrive\Documents\OpenRCT2\plugin\rct2-agent.plugin.js (override with RCT2_PLUGIN_DIR).

Wire up the MCP server

A ready-to-use project config is in .mcp.json. In Claude Code, from the project directory, it will be picked up automatically (approve it when prompted), or add it explicitly:

claude mcp add rct2-agent --scope project \
  -- "/mnt/c/Program Files/nodejs/node.exe" \
     "C:\\Users\\casey\\OneDrive\\Desktop\\dead code projects\\rct2-agent\\dist\\server.mjs"

Run

  1. Launch OpenRCT2 and load a scenario. Confirm the plugin loaded — the in-game console shows [rct2-agent] listening on 127.0.0.1:7860.
  2. Start Claude Code in this folder. The MCP server connects on first tool call.
  3. Ask the agent to manage the park. The core loop is measure → act → wait → measure: read baselines, make changes, advance_days(7), re-measure.

Tools

Read (eyes): get_park_summary, get_finance_report, list_rides, get_ride, list_shops, get_guest_overview, sample_guest_thoughts, list_staff, get_scenario

Act (hands): set_ride_price, set_shop_price, set_park_entry_fee, open_ride, close_ride, set_inspection_interval, start_marketing_campaign, set_research_funding, hire_staff, fire_staff, set_staff_patrol, set_loan

See (vision): capture_view, capture_ride, find_location

Time: get_clock, set_game_speed, pause, resume, advance_days

Save: snapshot, list_snapshots

Notes on behavior

  • Money is in plain dollars at the tool boundary; internally OpenRCT2 stores tenths, converted in src/shared/protocol.ts (MONEY_FACTOR). If a value looks off by 10×, that's the one knob to check.
  • Coordinates in capture_view / set_staff_patrol / find_location are in tiles (converted to map units internally).
  • advance_days unpauses, runs at max speed, and auto-pauses when the target date is reached — then returns the new clock. It blocks until done.
  • Snapshots save to save/agent__<play>__<label>.park, flat in the save root so they appear in the in-game Load Game menu — context.saveGame silently refuses any filename with a path separator, so subfolders are not possible. Restoring is a manual Load in-game — the plugin API can save but not load a park.
  • Writes go through game actions, so the game's own limits apply (e.g. the ride price cap). A rejected action comes back as a tool error.

Dev

  • npm run typecheck — tsc, no emit.
  • node scripts/smoke.mjs — loads the built plugin into a stubbed game and exercises the handlers over a real socket.
  • node scripts/mcp-smoke.mjs — spawns the built MCP server and drives it with real MCP JSON-RPC against a fake plugin.

Layout

src/shared/protocol.ts   wire protocol + money conversion + method names
src/plugin/main.ts       the intransient in-game plugin (TCP listener + handlers)
src/server/rct-client.ts reconnecting TCP client to the plugin
src/server/index.ts      MCP server: tool definitions -> plugin methods
esbuild.mjs              builds both bundles
scripts/                 install + smoke tests

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选