Godot MCP

io.github.satelliteoflove由 GitHub 帳號 satelliteoflove 發布v4.1.11更新於 Oct 25, 2026

Agent-driven Godot playtesting: editor control, input injection, game-time stepping, live state.

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 AI 助理控制 Godot 編輯器與執行中的遊戲,用於自動化試玩與驗證。

可以做什麼
在編輯器中開啟、儲存與檢視場景、節點、資源、動畫、TileMap 與 GridMap 儲存格以及 3D 變換,並在支援範圍內修改屬性、軌道與儲存格。讀取編輯器狀態、選取項目、截圖與錯誤記錄,並執行、停止或重新啟動遊戲、控制 2D 視埠。對執行中的遊戲注入輸入:具類比強度的具名動作、手把按鍵與搖桿、原始按鍵、滑鼠視角與文字輸入。凍結、步進遊戲時鐘或步進到條件成立,並以 JSON 讀取即時實體狀態、監看視窗與訊號時間軸。在執行中的遊戲裡執行 GDScript 以建立測試情境,取得效能快照與逐格時間序列,驗證程序化網格,並取得與編輯器版本相符的 Godot 文件。
適用情境
適合希望助理自行測試 Godot 4.5+ 專案的情境:重現缺陷、像玩家一樣操作遊戲、確認變更確實生效,或分析畫面卡頓,而不必來回傳送截圖與記錄。
執行需求
透過 npx 在本機執行,需要 Node.js 20+,以及 Godot 4.5+ 並在專案中安裝並啟用隨附外掛。伺服器透過本機 WebSocket(預設埠 6550,綁定 127.0.0.1)連線編輯器外掛;GODOT_HOST 可為 WSL2 或遠端環境覆寫主機位址。任何支援 stdio 的 MCP 用戶端皆可使用。
安裝前請注意
伺服器會修改專案資料:場景與節點屬性、重新掛載父節點、動畫軌道與關鍵影格、TileMap 與 GridMap 儲存格,還能執行、停止、重新啟動遊戲並注入輸入。godot_exec 會在執行中的遊戲裡執行任意 GDScript。可設定 GODOT_MCP_READ_ONLY 或 --read-only 參數只開放觀察類工具。一個 Godot 編輯器同一時間只能服務一個用戶端。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Godot MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

godot-mcp

[npm version] [CI] [Godot 4.5+] [Node 20+] [License: MIT]

Give your AI assistant eyes and hands in the Godot editor — and a running game it can actually playtest.

Why this one?

There are a few Godot MCP servers out there, and most can open a scene and poke at nodes. This one is built around a harder problem: letting an agent verify its own work. Run the game, drive it like a player, observe what actually happened, and prove the change did what it claimed — without you ferrying screenshots and error logs back and forth.

The pieces that make that possible, and that you won't find elsewhere:

  • Deterministic playtesting. Freeze the game clock, step exact slices of game time (or step until a condition holds), with inputs riding inside the window. Observation never races the game.
  • Cheap observation. Live entity state — positions, velocities, animation state, your own custom data — as structured JSON. Most "what's happening on screen?" questions get answered without spending vision tokens on a screenshot.
  • Real input. Named actions with analog strength, joypad buttons and stick vectors, raw keys with modifier combos, relative mouse-look, text typing. Sequences run with precise timing and can prove they changed game state.
  • Scenario setup. Run GDScript inside the running game: grant the weapon, skip to wave 3, spawn a test bot — no debug hooks baked into your game code.

Here's what that looks like when an agent tests a boss fight:

text
godot_editor_edit   run frozen=true           # boot with game time frozen at frame 0godot_exec          GameState.wave = 3        # set up the scenario worth testinggodot_game_time     step_until "tree.get_nodes_in_group('boss').size() >= 1"godot_runtime_state digest                    # exact positions and state — no pixels, no guessinggodot_game_time     step 500ms + dodge input  # play the moment that mattersgodot_editor_read   screenshot_game           # and a screenshot when it's actually worth the tokens

Less copy-paste, more creating.

Quick Start

1. Configure your AI assistant

Add godot-mcp to your MCP client. See the Installation Guide for config examples (Claude Desktop, Claude Code, VSCode/Copilot, and more). The short version:

json
{  "mcpServers": {    "godot-mcp": {      "command": "npx",      "args": ["-y", "@satelliteoflove/godot-mcp"]    }  }}

2. Install the Godot addon

bash
npx @satelliteoflove/godot-mcp --install-addon /path/to/your/godot/project

Enable it in Godot: Project > Project Settings > Plugins > Godot MCP

3. Start building

Open your Godot project, restart your AI assistant, and start building. If anything refuses to connect, the Troubleshooting Guide has you covered.

What's in the box

21 tools, 86 actions. Full API docs in the Tools Reference.

ToolWhat it does
godot_sceneOpen and save scenes (create new scenes by writing the .tscn directly, then open)
godot_node_read / godot_node_editInspect effective properties, the full scene tree (including instanced sub-scenes), and find nodes; update properties and reparent
godot_editor_read / godot_editor_editEditor state, selection, screenshots, editor error log; run/stop/restart and 2D viewport control
godot_projectProject info, settings, addon version skew, and stale-settings detection
godot_animation_read / godot_animation_editQuery animations down to keyframes; author tracks and keyframes with instant editor preview
godot_tilemap_read / godot_tilemap_editRead and edit TileMapLayer cells (base64-encoded in .tscn — the bridge is the only way)
godot_gridmap_read / godot_gridmap_editRead and edit GridMap cells, same story
godot_resourceInspect resources with type-aware output: SpriteFrames, TileSet, Materials, Textures
godot_scene3dEngine-computed 3D transforms, bounding boxes, and visibility for spatial reasoning
godot_docsFetch Godot documentation as clean markdown, version-matched to your editor
godot_inputInject input into the running game: actions, joypad, raw keys, mouse-look, text
godot_profilerMetric snapshots and per-frame time series with spike detection
godot_runtime_stateLive game state as JSON: one-shot digests, watch windows, signal timelines
godot_game_timeFreeze, step, and step-until on the game clock — deterministic observation
godot_execRun GDScript inside the running game for test scenario setup
godot_validate_meshesDetect silently corrupt procedural mesh data that masquerades as lighting bugs

A note on shape: tools split along the read/write boundary, so every godot_*_read tool (and the other read-only tools) can be safely auto-allowed in your client's permission settings while writes stay gated. Related operations still live as actions inside one tool, so your agent's context isn't flooded with definitions it won't use. Anything an agent can do by editing project files directly — creating scenes and nodes, attaching scripts, connecting signals — is deliberately not duplicated as a tool; the bridge covers what files can't: editor state, verification, binary-encoded cell data, and the running game. A --read-only flag serves the look-but-don't-touch use case.

Things to ask for

A feel for what an agent can do with this, in plain prompts:

  • "Run the game and screenshot the title screen. Does the layout survive 1280x720?"
  • "The player can clip through the east wall. Reproduce it, then check the collision shapes and tell me why."
  • "Step the game until the second wave spawns and give me every enemy's position and velocity."
  • "Hold the left stick at half deflection for two seconds — does the walk animation blend correctly?"
  • "Profile ten seconds of gameplay and find what's causing the frame spikes."
  • "Add a hit-flash animation to the Player: modulate to red and back over 0.2 seconds."

For richer runtime observation, add key nodes to the mcp_watch group or give them a _mcp_state() method — see the Runtime State Guide.

How it works

text
┌─────────────────┐   stdio    ┌─────────────────┐  WebSocket   ┌──────────────────┐  debugger   ┌──────────────┐│   MCP client    │ ◄────────► │  godot-mcp      │ ◄──────────► │  Bridge addon    │ ◄─────────► │ Running game ││ (Claude, etc.)  │            │  server (Node)  │   :6550      │  (Godot editor)  │    wire     │  (autoload)  │└─────────────────┘            └─────────────────┘              └──────────────────┘             └──────────────┘

The server talks to an editor addon over a local WebSocket; the addon reaches into the running game over Godot's own debugger protocol, so the game process needs no extra ports or setup. The addon binds to 127.0.0.1 by default. WSL2 is fully supported (auto-detection, host IP discovery, configurable bind modes) — see the Installation Guide.

Curious about connection lifecycles, the single-client policy, or how frozen-time stepping works under the hood? The Architecture Guide goes deep.

Works well with minimal-godot-mcp

minimal-godot-mcp by @ryanmazzolini covers exactly what this server doesn't: LSP diagnostics for fast static GDScript checking, and the running game's console output over DAP. This server covers everything that needs an editor bridge. No overlap, no conflict — run both, and your agent gets static analysis and the game console alongside full editor and runtime control.

One caveat: a Godot editor serves a single godot-mcp client at a time. Extra clients (a subagent inheriting your MCP config, say) wait their turn rather than hijacking your session — details in Troubleshooting.

Documentation

Requirements

  • Godot 4.5+ (the addon uses the Logger class introduced in 4.5)
  • Node.js 20+
  • Any MCP client that speaks stdio

Development

bash
cd servernpm install && npm run buildnpm test                # unit + schema-snapshot testsnpm run test:protocol   # wire-level smoke of the built servernpm run generate-docs

There is also an agentic eval harness (npm run eval) that runs realistic tasks through headless Claude Code against a real project — see server/evals/README.md. It never starts Godot; you bring the open editor.

Contributions welcome — this project favors tools that solve real, time-wasting problems. Read CONTRIBUTING.md before building something big, or open an issue and we'll figure out the right shape together.

License

MIT

來源:README.md,提交 c732865

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v4.1.11最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分