rct2-agent
rct2-agent
MCP サーバーと OpenRCT2 プラグインの組み合わせで、プレイ中にエージェントがパークをサイドカー管理できるようにします。パークの状態を読み取り、ビジネス面(価格、スタッフ、マーケティング、ローン)を操作し、パークを視覚的に確認(スクリーンショット)し、時間を制御できます。あくまで管理のみ — エージェントはビジネスを調整し、建設を 推奨 できますが、実際に建設することはありません。
連携の仕組み
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サーバーは Windows の node.exe で実行されます(WSL には node がないため)。そのため、サーバーとプラグインはどちらも同じ Windows の localhost 上に置かれ、WSL↔Windows 間のネットーワークは発生しません。プラグインは接続を待ち受けます(常駐するので、パークのロードをまたいでも生存し続けます)。サーバーはダイヤルインで接続し、必要に応じて再接続します。
Related MCP server: Roblox Executor MCP
要件
OpenRCT2 0.5.4+ (QuickJS エンジン — Promises/ES2023 に必要)。
Windows 版 Node.js(この環境では
C:\Program Files\nodejs\node.exeにあります)。
ビルドとインストール
WSL から、Windows のツールチェーンを使用します:
# 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 folderinstall:plugin のコピー先は
C:\Users\casey\OneDrive\Documents\OpenRCT2\plugin\rct2-agent.plugin.js
(RCT2_PLUGIN_DIR で上書きできます)。
MCP サーバーの設定
すぐ使えるプロジェクト設定が .mcp.json にあります。Claude Code では、プロジェクトディレクトリから起動するだけで自動的に認識されます(プロンプトが表示されたら承認してください)。または、明示的に追加することもできます:
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"実行
OpenRCT2 を起動し、シナリオを読み込みます。プラグインが読み込まれたことを確認してください — ゲーム内コンソールに
[rct2-agent] listening on 127.0.0.1:7860が表示されます。このフォルダで Claude Code を起動します。MCP サーバーは最初のツール呼び出し時に接続します。
エージェントにパークの管理を依頼します。コアループは 計測→操作→待機→再計測 です: ベースラインを読み、変更を加え、
advance_days(7)を実行し、再計測します。
ツール(一覧)
読み取り(目): get_park_summary, get_finance_report, list_rides, get_ride, list_shops, get_guest_overview, sample_guest_thoughts, list_staff, get_scenario
操作(手): 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
表示(視覚): capture_view, capture_ride, find_location
時間: get_clock, set_game_speed, pause, resume, advance_days
保存: snapshot, list_snapshots
動作上の注意
お金はツールの境界では通常のドル単位で扱われます。内部的には OpenRCT2 が十分の一単位で保存しており、
src/shared/protocol.ts(MONEY_FACTOR) で変換されます。値が 10 倍ずれているように見えたら、それが唯一の調整箇所です。capture_view/set_staff_patrol/find_locationの座標はタイル単位です(内部でマップ単位の値に変換されます)。advance_daysは、一時停止を解除して最大速度で実行し、目標の日付に到達すると自動で一時停止します。その後、新しい時刻を返します。処理が完了するまでブロックします。スナップショット は
save/agent/<play>/<label>.parkに保存されます。復元はゲーム内の手動ロードが必要です — プラグイン API ではパークの保存はできますが、ロードはできません。書き込みはゲームアクション経由なので、ゲーム自身の制限が適用されます(例: ライドの価格上限)。拒否されたアクションはツールエラーとして返されます。
開発
npm run typecheck— tsc による型チェック、出力なし。node scripts/smoke.mjs— ビルドしたプラグインをスタブのゲームに読み込み、実際のソケット経由でハンドラをテストします。node scripts/mcp-smoke.mjs— ビルドした MCP サーバーを起動し、本当の MCP JSON-RPC でフェイクプラグインに対しドライブします。
構成
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 testsThis 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
- AlicenseNot gradedqualityBmaintenanceBridges a running OpenRCT2 game to AI agents, enabling them to read park state, optimize parks, and build roller coasters.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to interact with a running Roblox game client to execute Lua code, inspect scripts, spy on remotes, and more.143216MIT
- AlicenseAqualityBmaintenanceEnables AI agents to execute Lua code, inspect scripts, spy on remotes, and interact with a running Roblox game client through an MCP interface.8221431MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to validate and run Minecraft commands, read chat and tellraw messages, control player movement and GUI, and capture screenshots from within the game, aiding datapack debugging.1MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Machine-readable utilities and datasets for AI 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/caseyjohnsonwv/rct2-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server