RPG Maker MV Ultimate MCP

io.github.DiegoLopez0208由 GitHub 账号 DiegoLopez0208 发布v5.21.0更新于 Nov 3, 2026

RPG Maker MV Ultimate: AI copilot to generate, edit and understand RPG Maker MV projects (MCP)

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

本地 MCP 服务器,让 AI 助手检查、生成并编辑磁盘上真实的 RPG Maker MV 项目,还能运行试玩并回读遥测数据。

可以做什么
  • 读取并分析项目:总览、校验、开关与变量使用情况、地图连接图、事件语法树、插件列表、指标、数值平衡异常与文本搜索
  • 查询与修改数据库:列出、按 ID 获取、搜索、创建、更新和删除角色、技能、物品、敌人、敌群等条目
  • 构建并插入事件指令(带预览),用 NPC、宝箱、门、商店、Boss 等预设管理地图事件
  • 生成地图(内置模板、语义任务图或程序化地形),并编辑图块、遇敌设置与地图树
  • 运行试玩与实时桥接:异常、日志、玩家位置、截图、录像与地图热重载
  • 可选通过兼容 OpenAI 的视觉端点分析图片,或离线测量图块集网格
适用场景
适合让助手调试或扩展已有的 RPG Maker MV 游戏:查明事件为何不触发、修复失效引用、生成地图与事件,或在运行中的试玩里验证改动,而不必手工编辑 JSON。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node.js 20.19.0 或更高版本。需设置 RPGMAKER_PROJECT_PATH 指向项目文件夹(或运行时调用 set_project_path)。试玩、打开编辑器和脚手架功能需要 MV 引擎安装路径(RPGMAKER_MV_INSTALL);无头渲染与脚本化试玩需要 Chromium 和可选的 playwright-core 依赖。视觉分析需要 VISION_API_URL,可选 VISION_API_KEY 与 VISION_MODEL。
安装前请注意
它会写入项目文件:请先备份项目并关闭 RPG Maker 编辑器,因为编辑器保存时会覆盖改动。修改类工具支持 dryRun,并在 .mcp-backups 保留带时间戳的备份。桥接插件会安装进项目,并开启带会话令牌的本地回环 WebSocket。若配置了视觉功能,项目图片会发送到 VISION_API_URL 指定的端点,并以 VISION_API_KEY 作为 Bearer 令牌;未设置时不会发送任何内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 RPG Maker MV Ultimate MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

🎮 RPG Maker MV Copilot MCP

Find why an MV event never fires — then verify the fix in the real engine

[npm] [downloads] [CI] [MCP Registry] [node] [license]

[Find an unset door switch, preview the fix, and verify the event page in RPG Maker MV 1.6.1]

30-second silent workflow: a visual replay of verified MCP calls and a real MV 1.6.1 playtest. Inspect the evidence.

Quick start · First useful result · Map generation · Live bridge · Intelligence · Tools


A Model Context Protocol server that lets an AI agent inspect and edit a real RPG Maker MV project on disk through 18 consolidated tools. Find broken references and switch conditions, build events with MV-compatible commands, and run repeatable playtests. Generated data still needs validation in your game's tilesets and plugins.

It does three things that are usually missing:

🏗️ BuildsGenerates maps that look hand-made, wires events from presets, and edits every database with real IDs instead of invented ones.
🧠 UnderstandsReads the whole project and answers why the door never opens, which map nobody can reach, which skill breaks the game.
👀 WatchesRuns the game and reports back: exceptions, player position, screenshots — and reloads a map you just edited without losing the save.

⚡ Quick start

Install Node.js 20.19.0 or newer, and close the MV editor before asking the agent to edit project files. Start with a copy of your project.

For containers and directory hosting, see Docker and Glama build configuration.

Windows x64 MCPB bundle: download v5.21.0 for a compatible MCPB client. See bundle requirements and verification. The npm setup below works across supported operating systems.

Find the project on itch.io and Smithery.

Check the environment before adding the server (PowerShell on Windows):

powershell
npx.cmd -y rpgmaker-mv-mcp --doctor "C:/path/to/your/RPGMakerMV/project"

coreReady: true means Node and System data checks pass. headlessReady: true additionally means Playwright and Chromium are available. The check does not start a browser or certify assets/plugins. Bridge warnings do not block offline queries. Missing Chromium: run npx.cmd playwright install chromium-headless-shell, or set RPGMAKER_MCP_CHROMIUM to your Chrome executable.

1 — Add it to your MCP client. No clone needed; the package ships an executable.

Configuration

json
{  "mcpServers": {    "rpgmaker-mv": {      "command": "npx",      "args": ["-y", "rpgmaker-mv-mcp"],      "env": {        "RPGMAKER_PROJECT_PATH": "C:/path/to/your/RPGMakerMV/project"      }    }  }}
Claude Code one-liner, and running from source
bash
# Claude Code, user scopeclaude mcp add rpgmaker --scope user \  --env RPGMAKER_PROJECT_PATH="C:/path/to/project" \  -- npx -y rpgmaker-mv-mcp
bash
# From sourcegit clone https://github.com/DiegoLopez0208/RpgMakerMVUltimate-MCPcd RpgMakerMVUltimate-MCPnpm install && npm run buildRPGMAKER_PROJECT_PATH=/path/to/your/project npm start

MCP clients load tool definitions once at startup, so restart the client after adding or upgrading the server.

2 — Point it at a project. RPGMAKER_PROJECT_PATH is the folder containing data/, js/ and index.html. The server starts without it; call set_project_path at runtime instead if you prefer.

3 — Let the agent look around first.

get_project_context { detail: "full" }        → what exists, with real IDsanalyze_project     { view: "overview" }      → health, counts, unreachable maps

Works with Claude Desktop, Claude Code, opencode, and any MCP-compatible client.

For Codex CLI, use codex mcp add rpgmaker --env RPGMAKER_PROJECT_PATH=C:/path/to/project -- npx -y rpgmaker-mv-mcp. In Windows clients that cannot launch npx, use the command cmd with arguments ["/c", "npx", "-y", "rpgmaker-mv-mcp"]. Restart the client, then try the three first-result recipes.


🧭 What it does

mermaid
flowchart LR    A["🤖 Agent"] -->|"generate_map · manage_map_event"| B["📁 Project on disk"]    B -->|"validate · balance · metrics"| A    B -->|"playtest"| C["🎮 Running game"]    C -->|"exceptions · position · screenshots"| A    A -->|"reload_map"| C

The bottom half of that loop is what the bridge adds. Before it, the agent wrote files and hoped.


🗺️ Map generation

Two paths, both behind generate_map. Pick by whether your project uses RTP art.

mode: "procedural" (default)mode: "semantic"
HowClones a hand-authored map from the 106 bundled RTP templates, closest size firstLays out a mission graph, then paints it through a tileset profile
Looks likeReal multi-tile buildings, walls, furnitureRooms and corridors shaped by what the space is for
TilesetsRTP, or close to itAny — DLC, itch.io, custom
GuaranteesSame seed → same mapSame seed → same map, and the key is always reachable before the door it opens

The knowledge-driven path

json
{ "mode": "procedural", "theme": "town", "name": "Riverbend", "width": 40, "height": 30 }

Themes with a matching template — town, village, dungeon, interior, castle, world and more — clone a real map instead of painting tile noise. Themes without one (beach, swamp, desert…) fall back to Perlin terrain, BSP dungeons and cellular caves. Combat themes auto-wire random encounters from your existing troops; town and village auto-create enterable house interiors with two-way warps.

Themes · forest town village castle dungeon cave beach desert swamp ruins interior snow harbor volcano sewer fortress magic_forest magic_interior space_interior space_exterior world

Other modes: blank (empty canvas), themed (simple layout), template (one specific bundled map), batch (many at once), duplicate (copy an existing map).

The tileset-independent path

The bundled templates are raw MV map JSON, so their tile IDs only mean anything on RTP sheets. Change the tileset and the map turns to noise. semantic keeps the layout abstract until the last moment:

manage_system { action: "mine_templates" }               # learn from THIS projectgenerate_map  { mode: "semantic", tilesetId: 5, rooms: 6, seed: 42 }
  • Mining reads every map you already made and derives semantic layouts (ground / wall / water / prop / door, multi-tile props kept whole), a tileset profile naming the concrete tile your project uses for each role, and token adjacency counts. Nothing in the project is modified — everything lands in .mcp-cache/.
  • Generating builds the mission first — entrance → key → locked door → treasure → boss → exit, plus side rooms — as a graph whose edges are the only ways through, then paints it. Because the lock is an edge and the key sits on the entrance side of it, the map is solvable by construction. Autotile shapes are recomputed at the end from the finished neighbourhood, never guessed cell by cell.
  • The result includes markers naming the cell of every mission role, which is where to put events with manage_map_event.
  • Pass a mined templateId (e.g. "mined-3") to re-materialise one of your own maps onto a different tileset.

🔌 The live bridge

playtest on its own is fire-and-forget: the game opens and nothing comes back. The bridge closes the loop.

manage_system { action: "install_bridge_plugin" }   # once per projectmanage_system { action: "bridge_start" }            # opens ws://127.0.0.1:32123manage_system { action: "playtest" }                # the game connects on its ownmanage_system { action: "bridge_telemetry", types: ["exception", "log"] }
mermaid
sequenceDiagram    participant A as 🤖 Agent    participant S as 🖥️ MCP server    participant G as 🎮 Game (nwjs)    A->>S: edit_map    S->>S: atomic write to Map002.json    A->>S: bridge_command reload_map    S->>G: reload_map    G->>G: reserveTransfer + _needsMapReload    G-->>S: reload_complete    A->>S: take_screenshot    S->>G: capture_screenshot    G-->>S: PNG in base64    S-->>A: path for analyze_image    A->>S: record_video start / stop    S->>G: MediaRecorder on the game canvas    G-->>S: WebM in base64    S-->>A: path for video evidence
  • 📡 Telemetry — exceptions with stack traces, console.error/warn, scene changes, player position, which event command is executing (so a hung event can be pinpointed), FPS and heap. Frames are consumed as you read them unless you pass peek.
  • ♻️ Hot reload — reload_map re-reads the current MapXXX.json and rebuilds the scene without losing party state: it reserves a transfer to the player's own position with _needsMapReload, the engine's own reload seam, rather than rebuilding Spriteset_Map by hand. reload_database re-reads one data file; System.json and Tilesets.json need a fresh playtest and are refused with an explanation.
  • 📸 Screenshots — take_screenshot { name: "collision-proof" } captures the live playtest through the MCP plugin, saves a timestamped PNG under .mcp-cache/screenshots/, and returns its path for inspection or QA evidence. No shell screenshot command is involved. manage_system { action: "bridge_screenshot" } remains as a compatibility alias.
  • 🎥 Video evidence — record_video { action: "start", name: "npc-dialogue" } begins a silent WebM capture of the live game canvas; record_video { action: "stop" } saves it under .mcp-cache/recordings/ and returns its path. Agents can stage repeatable scenes with the allowlisted interact command and fixed-button press_button input—there is still no arbitrary script or eval command.

🔒 Security

The plugin returns before anything else runs unless the game is under NW.js and was launched with a test argument. A deployed build a player double-clicks never reaches the socket code, or even require('fs').

It checks every argument rather than only argv[0] the way Utils.isOptionValid does, because playtest passes the project path first. So a deployed build deliberately launched with a literal test argument would get past the guard — and then find no handshake file, and never connect.

The server binds 127.0.0.1 only, refuses any upgrade carrying a browser Origin (cross-site WebSocket hijacking), and requires the session token from .mcp-bridge.json — compared in constant time — within 5 seconds or the connection is dropped.

The command surface is a fixed allowlist with no eval primitive.


🔍 Project intelligence

analyze_project is read-only and fully offline. It models the whole project once, so an agent can reason about a game it did not build.

ViewAnswers
overviewCall this first. Counts, health summary, maps unreachable from the start
validateEvery consistency problem at once — see below
explainWhy does this never happen? e.g. "Switch 12 is gated in 3 places but never set ON"
usageEvery event, common event and troop that touches a switch/variable/item, with read-write roles
graphThe map transfer network and what is reachable
astOne event's logic as a readable tree
pluginsWhat plugins the project uses, their parameters and commands
critiqueA designer's opinion on one map: dead space, clutter, event spread, monotony
metricsThe same map measured — see below
balanceDatabase entries that are out of line with their peers — see below
refactorCommand sequences copy-pasted across events, worth extracting into a Common Event
searchOffline Unicode text matching across names, dialogue, descriptions and notes; no synonym or translation expansion
indexThe structured digest the other views are built on
validate — the problems the editor never warns about

Broken transfers, missing map files, dangling common-event/item/troop references, duplicate IDs, named-but-unused switches and variables, a bad starting position, unreachable maps — and actor names written into dialogue as \N[id] that do not resolve.

That last one is worth its own sentence: the engine resolves \N[id] at draw time, not from any structural parameter, so a bad id passes every other check and the editor shows nothing wrong. The line just renders in-game with a hole where the name should be, and a player finds it before you do.

metrics — measured, not judged
  • Reachability — flood fill from the real entry point. Walkable tiles the player can never get to, and events with no reachable tile beside them, are softlocks rather than style notes.
  • Dead space — the unreachable share of the rectangle, against a band for expected (interior / dungeon / exterior).
  • Shape — the walkable area thinned to a one-cell skeleton and read as a graph: endpoints, junctions, cycles, critical path, linearity. Linearity near 1 is a corridor with no choice to make.
  • Variety — Shannon entropy over 5×5 tile windows: the monotonous-floor problem, measured.
  • Tension — for maps with random encounters, how many steps the player is from a shop, inn or save point.
balance — outliers relative to their peers, not to invented thresholds

A skill dealing 400 damage is fine in a game where everything does, and broken in one where nothing else breaks 60. So each entry is scored on a power metric and compared against the others in its category: damage per MP for skills, gold per point of ATK+MAT for weapons, gold per DEF+MDF for armors, HP per EXP for enemies.

The comparison is leave-one-out — an entry is judged against statistics it had no hand in creating. Included in its own numbers, a badly broken entry drags the mean toward itself until it stops looking unusual at all.

Damage formulas are parsed, never executed (tokenise → shunting-yard → evaluate). One that cannot be read statically is listed under unreadableFormulas rather than scored as zero damage, which would pull every average down and hide the very outliers you were looking for.

Narrow with category, loosen or tighten with thresholdSd (default 2).

When a search returns nothing

Search returns searchMode: "lexical", complete, indexedFiles, skippedFiles and warnings. complete: false means some data could not be read; it does not mean the game contains no matching content. An empty result includes noResultsReason. Use a name or phrase actually present in the project: herrero does not translate into Blacksmith. Unicode names, including Japanese, are supported. A database query for an absent ID can return null; inspect it before using that ID.

Index, overview, validation, graph, usage, explain and refactor also report incomplete input. Unreadable files appear as validation errors.

Offline map inspection

  • query_map { view: "ascii", mapId } — render a map as a character grid with event markers. The cheapest way to see a layout and pick coordinates.
  • query_map { view: "validate", mapId } — lint one map for invalid tile IDs, broken transfers and missing event terminators.

Tools

The server exposes 18 consolidated tools. The legacy aliases are optional.

Click to expand the full surface
ToolPurpose
build_event_commandsRead-only MV dialogue, choices, conditions, switches, variables, transfers, common-event, flow, and plugin-command builders
insert_event_commandsValidated insertion into map/common/troop event lists, with before/after previews and safe nested boundaries
query_databaseList / get by ID / search any database (actors, classes, skills, items, weapons, armors, enemies, states, troops, tilesets, common events, animations)
create_database_entryCreate entries, with presets: damage_skill, healing_skill, buff_skill, state_skill, boss_enemy, encounter_troop
update_database_entryPartial updates (incl. troops & animations); append commands to common events; add enemies to troops
delete_database_entryDelete entries with reference-breakage warnings
query_mapMap tree, full map data, events, single event, lint, offline ASCII render
generate_mapKnowledge-driven, semantic, procedural, blank, themed, template, batch or duplicate
edit_mapFill tile layers, set display names, organize the map tree, connect two maps, set encounters
manage_map_eventCreate (presets: npc, chest, teleport, door, shop, inn, boss, puzzle_switch), update, convert an NPC into a merchant/inn/sign in place, delete, add commands, bulk-populate
manage_systemTitle, switch/variable names, starting position, author a plugin, scaffold an editor-openable project, playtest, open/repair in editor, mine templates, and the live bridge
take_screenshotCapture and name a live playtest PNG through the authenticated MCP bridge, or with mapId render a map headless as the engine draws it, no game running
run_playtestPlay a script of steps headless (load, start an event, read its text, choose, walk, battle, screenshot) and report what happened
record_videoStart or stop a named live playtest WebM recording through the authenticated MCP bridge
analyze_projectThe read-only intelligence layer above
get_project_contextProject digest, asset index, per-tileset tile IDs, bundled-template catalog
set_project_pathSwitch projects at runtime
analyze_imageOptional Vision-AI image analysis, plus offline tileset grid measurement and quadrant colors

The 101 fine-grained v4 tool names still work as call aliases. Set RPGMV_LEGACY_TOOLS=1 to advertise them too.


🛡️ Write safety

For composed event logic, use build_event_commands followed by insert_event_commands with dryRun:true. The preview includes the exact old and proposed command lists. See Event command authoring for the supported kinds, nesting rules, MV-specific differences, and verification.

  • Atomic. Every write goes to a temp file and is renamed over the target, so an interrupted call can never leave half-written JSON.
  • Backed up. Rotated timestamped copies under .mcp-backups/ (last N, RPGMV_BACKUP_KEEP, default 10). A backup failure aborts replacement. Writes use unique temporary files and exclusive per-file locks; changes detected since a data read are refused. Close the editor: it does not honor MCP locks, and multi-file operations are not transactions.
  • Previewable. Pass dryRun: true to any mutating tool to see exactly what it would write, without touching disk.

⚠️ Close the RPG Maker editor while an agent is working. The editor holds the project in memory and will overwrite changes when it saves.


⚙️ Configuration

VariableRequiredDescription
RPGMAKER_PROJECT_PATHrecommendedThe project folder (the one with data/ and js/). Optional — set_project_path works at runtime
RPGMAKER_MV_INSTALLfor playtestEngine install root, for playtest / open_editor / scaffold_project. Defaults to the standard Steam path
RPGMV_BRIDGE_PORToptionalLoopback port for the live bridge (default 32123)
RPGMV_BACKUP_KEEPoptionalBackups kept per file (default 10)
RPGMV_LEGACY_TOOLSoptional1 also advertises the 101 legacy tool names
RPGMAKER_MCP_CHROMIUMoptionalChromium executable for headless renders and run_playtest. Without it the newest browser in the Playwright cache is used (npx playwright install chromium-headless-shell). Headless tools also need the optional playwright-core dependency.
RPGMV_TOOLSEToptionalAdvertise only some tool groups, e.g. events,media. core (project, database, maps, events, system, analysis) is always on; the others are events (build/insert event commands), mapgen (generate_map) and media (screenshot, video, image analysis, headless playtest). Unset or all lists everything. core alone is about 11k tokens instead of 18k.
VISION_API_URLto enable visionBase URL of an OpenAI-compatible vision endpoint. Unset = vision disabled
VISION_API_KEYoptionalBearer token; only sent when set
VISION_MODELoptionalModel name (default meta/llama-3.2-90b-vision-instruct)
VISION_API_PATHoptionalEndpoint path (default /v1/chat/completions)
Vision AI is opt-in

analyze_image { mode: "ai" } sends a project image (tileset, sprite, screenshot, battler) to any OpenAI-compatible endpoint. Nothing is sent anywhere unless you configure it; the grid and colors modes and every other tool work fully offline.

bash
# OpenAIVISION_API_URL=https://api.openai.com VISION_API_KEY=sk-... VISION_MODEL=gpt-4o npm start# Ollama (local, no key)VISION_API_URL=http://localhost:11434 VISION_MODEL=llava npm start

Works with OpenAI, Ollama, LocalAI, NVIDIA NIM, vLLM, LiteLLM, or any OpenAI-compatible proxy.


🎓 Agent Skill

A portable Agent Skill teaches any model the crash-free workflow — build maps with generate_map, add content with manage_map_event presets, never hand-paint tiles or guess IDs. It lives at skill/rpgmaker-mv-mcp/SKILL.md.

bash
# Claude Code / Claude.ainpx degit DiegoLopez0208/RpgMakerMVUltimate-MCP/skill/rpgmaker-mv-mcp ~/.claude/skills/rpgmaker-mv-mcp# opencodenpx degit DiegoLopez0208/RpgMakerMVUltimate-MCP/skill/rpgmaker-mv-mcp ~/.opencode/skills/rpgmaker-mv-mcp

Also listed in awesome-claude-skills.


📚 Knowledge base

Static reference data extracted from the MV corescript
FileContent
tile-ids.jsonTile ID ranges, autotile formula, sheet descriptions, layer meanings
passage-flags.jsonFlag bits, common flags, passage check logic
event-commands.json~140 event command codes with parameter schemas
enums.jsonScope, occasion, hitType, damageType, restriction, and the rest
trait-effect-codes.jsonTrait codes 11-64, effect codes 11-45
database-schemas.jsonFull schemas for every MV data type
image-paths.jsonimg/ directories, tileset slots, naming conventions
map-templates.jsonIndex of the 106 bundled reference maps
stamps.jsonMined multi-tile object stamps (trees, props) per tileset
maps/The 106 RTP reference map JSONs used for template cloning

🚧 Known limitations & roadmap

  • Decoration semantics are best-effort in the RTP-template path; rare multi-tile objects may land as single tiles. The mined path keeps multi-tile props whole.
  • Town and dungeon layouts keep improving — planned: a central plaza or well as a landmark, houses in rows facing roads, fences and yards, richer road networks, more room variety.
  • mode: "semantic" currently generates dungeon-shaped missions. Town and open-world mission grammars are next, as is using the mined adjacency counts to decorate rather than only to describe.
  • balance compares like with like inside a category, so a boss will legitimately look like an outlier next to random encounters. Read the flag, not the verdict.
  • The bridge is Windows/nwjs playtest only and needs its plugin installed in the project.
  • Vision AI requires your own endpoint.

🛠️ Development

bash
npm installnpm run build      # tsc compile (+ copies knowledge/ into dist/)npm test           # vitestnpm run typechecknpm run dev        # tsx watch mode
WhereWhat
src/server.tsTool handlers and MCP transport
src/toolDefinitions.ts + src/router.tsThe 13-tool surface and its routing
src/tools/*Per-domain CRUD
src/utils/mapGenerator.tsTemplate cloning and procedural generation
src/utils/graphGenerator.ts + src/utils/materialize.tsMission graphs and the semantic compiler
src/bridge/*The loopback WebSocket and the in-game plugin
src/intel/*The read-only layer behind analyze_project
knowledge/Static reference data and bundled maps

💬 Feedback

Actively developed, and feedback is very welcome — bug reports, weird maps, missing tools, ideas. Open a GitHub Issue with what you asked the agent to do and what you got; an exported map JSON or a screenshot helps a lot.

来源:README.md,提交 d25f832

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v5.21.0最新Oct 12, 2026
  2. v5.20.0Oct 7, 2026
  3. v5.19.0Oct 5, 2026
  4. v5.16.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分