hi-godot/godot-ai
Production-grade MCP server and AI tools for the Godot engine. A Snap to install. Totally free and fun.
9bb1c2fe5936godot-ai4.4.2 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 69 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- 1 of 48 tools, prompts and resources could not be followed through the code
- Supply Chain: the dependency files state no exact versions the scanner could check, so it has no number
- 7 tools, prompts and resources registered only in the repository's tests are not counted on this page
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 21 tools, 20 resources. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
scene_openget_project_settingsNo tool was seen to: start other programs on the machine; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
No tool was seen returning text from outside the server to the model.
Not all three are present in the tools the scanner traced.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (41: 21 tools, 20 resources)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
get_class_inforesource ClassDB metadata for a class in the active Godot editor.
ClassDB metadata for a class in the active Godot editor.
Returns the full documentation set (properties, methods, signals,
enums, constants). The `get_class` tool defaults to properties-only,
but a resource URI cannot carry a `sections` argument, so the resource
pins `sections="all"` to preserve its advertised full-reference
contract.get_current_sceneresource Current scene path and root node info from the active Godot editor.
Current scene path and root node info from the active Godot editor.
get_current_selectionresource Currently selected nodes in the Godot editor.
Currently selected nodes in the Godot editor.
get_custom_toolsresource
No description.
get_editor_stateresource Editor version, project name, current scene, readiness, play state.
Editor version, project name, current scene, readiness, play state.
get_input_mapresource All input map actions and their bound events. Excludes built-in ui_*.
All input map actions and their bound events. Excludes built-in ui_*.
get_materialsresource All Material resources under res:// (every Material subclass + .tres).
All Material resources under res:// (every Material subclass + .tres).
get_node_childrenresource Direct children of the node at scene path ``path`` (name, type, path each).
Direct children of the node at scene path ``path`` (name, type, path each).
get_node_groupsresource Group names the node at scene path ``path`` belongs to.
Group names the node at scene path ``path`` belongs to.
get_node_propertiesresource All properties of the node at scene path ``path`` (e.g. Main/Camera3D).
All properties of the node at scene path ``path`` (e.g. Main/Camera3D).
get_performanceresource Performance singleton snapshot (FPS, memory, draw calls, frame time).
Performance singleton snapshot (FPS, memory, draw calls, frame time).
get_project_inforesource Project name, Godot version, paths, and play state.
Project name, Godot version, paths, and play state.
get_project_settingsresource Common project settings subset (display, physics, rendering).Network
Common project settings subset (display, physics, rendering).
get_recent_logsresource Last 100 log lines from the Godot editor console.
Last 100 log lines from the Godot editor console.
get_scene_hierarchyresource Scene tree hierarchy from the active Godot editor (first 100 nodes).
Scene tree hierarchy from the active Godot editor (first 100 nodes).
A resource URI takes no arguments, so this read is capped; a truncated
result sets `resource_truncated` with a hint. Use the
`scene_get_hierarchy` tool for offset/limit pagination or a scoped depth.get_scriptresource Read a GDScript file at the given res:// path.
Read a GDScript file at the given res:// path.
``path`` is the res:// path with the ``res://`` prefix dropped — e.g.
``godot://script/scripts/player.gd`` reads ``res://scripts/player.gd``.get_sessionsresource All connected Godot editor sessions and their metadata.
All connected Godot editor sessions and their metadata.
get_shaderresource Read a .gdshader/.gdshaderinc file at the given res:// path.
Read a .gdshader/.gdshaderinc file at the given res:// path.
``path`` is the res:// path with the ``res://`` prefix dropped — e.g.
``godot://shader/shaders/pulse.gdshader`` reads
``res://shaders/pulse.gdshader``.get_test_resultsresource Most recent ``test_run`` results without re-executing tests.
Most recent ``test_run`` results without re-executing tests.
get_visual_shaderresource Read a VisualShader graph at the given res:// path.
Read a VisualShader graph at the given res:// path.
``path`` is the res:// path with the ``res://`` prefix dropped — e.g.
``godot://visual_shader/shaders/pulse.tres`` reads
``res://shaders/pulse.tres``.animation_createtool Create a new Animation clip inside an AnimationPlayer's default library.
Create a new Animation clip inside an AnimationPlayer's default library.
After creating the clip, add tracks via ``animation_manage`` ops
``add_property_track`` / ``add_method_track`` / ``create_simple``.
Track node paths are stored relative to the AnimationPlayer's
``root_node`` (default: its parent), not to the scene root — see
``animation_manage`` preset ops for a forgiving target_path that
accepts either form.
If ``player_path`` doesn't resolve, an AnimationPlayer is auto-created
at that path (parent must exist).
Args:
player_path: Scene path to the AnimationPlayer node.
name: Animation clip name (e.g. "idle", "pulse").
length: Duration in seconds.
loop_mode: "none" (default) | "linear" | "pingpong".
overwrite: Replace an existing animation with the same name.
session_id: Optional Godot session to target. Empty = active session.batch_executetool Execute a list of editor sub-commands in order, stopping on first error.
Execute a list of editor sub-commands in order, stopping on first error.
Each item must be `{"command": "<plugin_command>", "params": {...}}`.
Use the underlying plugin command names (e.g. `create_node`, `set_property`,
`delete_node`, `attach_script`), not the MCP tool names. Commands run
sequentially; execution stops at the first error. When `undo` is True
(default), any successful sub-commands are rolled back via the scene's
undo history if a later sub-command fails, producing atomic-on-failure
semantics.
Use this to compose multi-step edits (create node + set property +
attach script) into a single tool call. Rollback works for sub-commands
that modify the currently edited scene. `batch_execute` itself is not
allowed as a sub-command.
Scene paths are relative to the edited scene root (e.g. "/Main/Enemy"),
NOT runtime "/root/..." paths. The example below assumes the scene
root is named "Main" — substitute the actual root name.
Example:
commands=[
{"command": "create_node",
"params": {"type": "Node3D", "name": "Enemy", "parent_path": "/Main"}},
{"command": "set_property",
"params": {"path": "/Main/Enemy", "property": "position",
"value": {"x": 5, "y": 0, "z": 0}}},
]
Args:
commands: List of `{"command": str, "params": dict}` items.
undo: Roll back succeeded sub-commands on failure. Default True.
session_id: Optional Godot session to target. Empty = active session.
Returns a dict with `succeeded` (count), `stopped_at` (failing index
or null), `results` (per-sub-command status/data/error), `rolled_back`
(whether rollback was performed), and `undoable` (whether the batch
can be undone as a whole).editor_reload_plugintool Reload the Godot editor plugin.
Reload the Godot editor plugin.
Disables and re-enables the plugin on the next frame. The response
shape depends on whether this MCP server was spawned by the plugin
or launched externally:
- **Plugin-managed (default install)**: returns a pre-flight ack
``{status: "reload_initiated", transport_will_drop: true,
old_session_id, guidance}`` immediately. The reload kills this
server, so the WebSocket transport drops; reconnect and call
``session_manage(op="list")`` to find the new session_id.
- **Externally launched** (e.g. ``python -m godot_ai --transport
streamable-http --port 8000 --reload``): waits for the new
session to register and returns
``{status: "reloaded", old_session_id, new_session_id}``.
If the old bridge disappears and no replacement registers
within 90 seconds, raises ``PLUGIN_DISCONNECTED`` with
``data.reason == "reload_timeout"`` and recovery diagnostics.
Args:
session_id: Optional Godot session to target. Empty = active session.editor_screenshottool Capture a screenshot of the Godot editor viewport or running game.
Capture a screenshot of the Godot editor viewport or running game.
Picking a source: the default ``"viewport"`` captures the editor's 3D
viewport, which is empty if the edited scene has no Node3D anywhere in
the tree (or no scene is open). Those cases return ``EDITOR_NOT_READY``
with ``error.data = {editor_state: "viewport_not_3d", scene_root_type}``
and an actionable ``error.message`` — switch to ``"cinematic"`` if the
scene has a Camera3D, or open a scene with 3D content.
Sources:
- "viewport" (default): editor 3D viewport. Requires Node3D content in
the edited scene (root or any descendant); see above for the
no-3D-content / no-scene error shape.
- "viewport_2d": editor 2D viewport. Use for 2D scenes.
Not compatible with view_target/coverage/elevation/azimuth/fov.
- "cinematic": render edited scene through its active Camera3D (no
editor gizmos). Prefers a Camera3D marked ``current``; falls back to
the first Camera3D found in a depth-first walk. NODE_NOT_FOUND only
when the scene contains no Camera3D at all.
- "game": running game's framebuffer (only when project is running).
A backgrounded/minimized game window freezes its main loop; the
capture then returns the last rendered frame with
``stale_frame: true`` and a ``note`` in the metadata — focus the
game window and retry for a current frame. ``GAME_HELPER_TIMEOUT``
means the game process never replied at all (nothing rendered yet,
main thread blocked, or helper dead) — focus the window and retry,
or use game_command to confirm liveness.
``include_image=True`` (default) returns an MCP ImageContent block.
``view_target`` (comma-separated Node3D paths) reframes editor camera;
AABB metadata always returned. ``coverage=True`` with view_target
captures perspective + orthographic top-down references.
Args:
source: "viewport" | "viewport_2d" | "cinematic" | "game". Default "viewport".
max_resolution: Maximum longest edge. Default 640. 0 removes the requested
cap. Large PNGs are downscaled further to fit the MCP transport;
metadata reports the actual and original dimensions.
include_image: Return image data. Default True.
view_target: Node3D scene path(s) to frame, comma-separated.
coverage: With view_target, capture two reference shots + AABB.
elevation: Camera elevation in degrees (0=level, 90=overhead).
azimuth: Camera azimuth in degrees (0=front, 90=right).
fov: Camera FOV in degrees. Tight 20-30 = zoom; 60-75 = context.
user_prompt: Optional context from the agent that requested the
capture. With Vision Routing enabled it is sent alongside the
image so the vision model can describe what the agent is
looking for.
width: Cinematic render width, 1..4096 pixels. Supply with height.
Omit both to use the editor viewport size.
height: Cinematic render height, 1..4096 pixels. Supply with width.
save_to: Cinematic only: save the full render to a res:// PNG path.
Parent directories are created. max_resolution and transport
limits affect only the inline preview, not the saved PNG.
With include_image=False, only metadata crosses the transport;
saved_path, saved_width, saved_height and saved_bytes describe
the file. File writes require a writable editor and cannot be undone.
overwrite: Replace an existing save_to PNG. Default False.
session_id: Optional Godot session to target. Empty = active session.editor_statetool Get current Godot editor state: version, readiness, open scene, play state.
Get current Godot editor state: version, readiness, open scene, play state.
Resource form: ``godot://editor/state`` — prefer for active-session reads.
Also reachable as ``editor_manage(op="state")`` (same handler) for clients
that prefer a single rolled-up tool.
Code-mode MCP adapters keep the server and tool names separate:
``call('godot-ai', 'editor_state', {})``. Never pass a server-prefixed
tool name such as ``godot-ai/get_editor_state``; that is neither the
adapter's call signature nor a registered tool. For dedicated current-
scene data, use ``readResource('godot-ai', 'godot://scene/current')``.
Side effect: refreshes the server's session readiness cache from the
live editor reply. Useful as a recovery step after a write call is
rejected as ``EDITOR_NOT_READY (state=playing)`` when you already know
the game has stopped — calling ``editor_state`` once syncs the cache
and the next write proceeds. Issue #262.
Response includes ``game_status`` for authoritative game liveness,
plus ``helper_live`` (status == "live") and ``session_active``
(status not in {"not_live", "stopped"}) mirrored from the same fields
inside ``game_status``. ``is_playing`` remains raw editor play-state;
use ``game_status.status`` for liveness decisions.
``started_by`` identifies MCP versus editor launches; ``elapsed_s``
reports run age. ``last_input_age_s`` is a sampled idle estimate,
with ``input_sample_age_s`` for freshness; null means unknown.
Godot AI injected input is excluded. Other nodes may consume input
before the helper sees it; even fresh samples do not prove device idle.
``game_status.status="break"`` means the game process is parked in a
remote-debugger break (boot-time parse errors do this before the game
helper registers); it will not resume on its own — call
``project_manage(op="stop")``.
Args:
session_id: Optional Godot session to target. Empty = active session.logs_readtool Read recent log lines from the Godot editor, plugin, or running game.
Read recent log lines from the Godot editor, plugin, or running game.
Resource form: ``godot://logs/recent`` — prefer for active-session reads.
Sources:
- "plugin" (default): MCP plugin recv/send/event traffic. Buffer 500.
- "game": stdout/stderr/push_error/push_warning from playing game
via ``_mcp_game_helper`` autoload. Buffer 2000, with
lines retained across runs and tagged by run_id. Default reads return
current-run lines only; pass ``since_run_id`` from an earlier response
to read that prior run. Entries: {source, level, text, run_id};
response carries run_id, current_run_id, game_status, helper_live,
session_active, dropped_count, stale_run_id. helper_live and
session_active mirror the same fields inside game_status; is_running
is retained as a compatibility alias of session_active.
Boot-time parse/load errors fire before the game helper's logger
attaches, so they are NEVER in this buffer; when editor-side errors
were recorded during the current run the response adds
``editor_errors_count`` and ``editor_errors_hint`` pointing at
source="editor" — treat a clean game log carrying that hint as a
run that lost scripts, not a clean launch.
- "editor": editor-process script errors and the Debugger dock's
visible Errors-tab rows — parse errors, GDScript reload warnings,
@tool/EditorPlugin runtime errors, push_error/push_warning.
Logger-backed entries and Errors-tab rows are read from the editor
UI when available. Use when the editor Output or
Debugger Errors panel shows red/yellow rows but other sources turned
up nothing. Buffer 500 for logger-backed entries; Debugger rows are
live UI state. Entries: {source, level, text, path, line, function}.
Filtered to .gd/.cs in the user project for Logger-backed entries;
addons/godot_ai/ dropped. Logger entries fired before plugin enable
are not captured.
- "all": plugin → editor → game lines (with source per entry).
Tail pattern: for game logs, poll the current run with offset=N and
keep the returned run_id. ``current_run_id`` identifies the active run;
``run_id`` identifies the run being read. Passing
``since_run_id=old_run_id`` reads retained lines for that prior run, and
``stale_run_id: true`` means the requested run is not the current run.
For editor logs, read once to capture
``next_cursor`` and pass it back as ``since_cursor`` on later calls.
``since_cursor`` reads Logger-backed editor entries only; live Debugger
Errors-tab rows are included in regular source="editor" reads but do
not have stable cursors. When ``since_cursor`` is set, it supersedes
``offset``. ``truncated: true`` means older entries fell out of the
ring before the poll; continue from the returned ``next_cursor`` and
treat ``oldest_cursor`` as the earliest retained sequence.
Set ``include_details=True`` for Errors-tab style metadata on game/editor
entries: original code/rationale, error type, resolved source, and
stack frames. Default false preserves compact responses.
Args:
count: Max lines to return. Default 50.
offset: Lines to skip. Default 0.
source: "plugin" | "game" | "editor" | "all". Default "plugin".
since_run_id: Game-log run id from a previous response; reads that
retained run instead of the current run.
since_cursor: Editor-log cursor from a previous source="editor" response.
include_details: Include rich error metadata for game/editor entries.
session_id: Optional Godot session to target. Empty = active session.managetool
No description.
node_createtool Create (spawn) a new node in the scene tree.
Create (spawn) a new node in the scene tree.
Creates a node of the given type and adds it to the parent, or
instantiates a PackedScene from ``scene_path``. type and scene_path
are mutually exclusive — when scene_path is given, type is ignored.
Creating below an instance's internal nodes requires Editable Children
to be enabled in Godot. Attaching directly to its root is supported.
Args:
type: Godot node class (e.g. "Node3D", "MeshInstance3D").
name: Optional name; Godot auto-names if empty.
parent_path: Parent path relative to the edited scene root (e.g.
"/Main"), NOT runtime "/root/...". Empty = scene root.
scene_path: Optional res:// path of a PackedScene to instantiate.
scene_file: Optional editor-scene guard (EDITED_SCENE_MISMATCH).
session_id: Optional Godot session to target. Empty = active session.
Returns the created node's full path in ``data.path`` — use it as the
prefix for subsequent commands targeting this node.node_findtool Find nodes in the scene tree by name, type, or group.
Find nodes in the scene tree by name, type, or group.
At least one filter must be provided. Filters AND together. Paginated.
Args:
name: Substring match on node name (case-insensitive).
type: Exact Godot class name (e.g. "MeshInstance3D").
group: Group name the node must belong to.
offset: Number of results to skip. Default 0.
limit: Max number of results. Default 100.
session_id: Optional Godot session to target. Empty = active session.node_get_propertiestool Get properties of a node.
Get properties of a node.
Resource form: ``godot://node/{path}/properties`` — prefer for
active-session reads (returns the full property set).
The default returns every editor-visible property, which can be
50-150 entries. Pass ``fields`` to return only the properties you
need — a large response-size cut on this hot read. The response
always carries ``total_count`` (all editor-visible properties)
alongside ``count`` (returned): an unfiltered call returns the full
set, so ``count == total_count``; only the ``fields`` filter can
make ``count`` smaller. Requested names that match no
editor-visible property are listed in ``unknown_fields``, so a
nonexistent name is distinguishable from a property that exists
with a null value.
Null-valued properties are included: an unset object/resource slot
(``script`` on an unscripted node, an empty ``mesh`` or
``material``, …) returns ``"value": null`` with its declared type.
An attached script serializes to its ``res://`` path; built-in
scripts (no resource path) fall back to their string
representation.
Args:
path: Scene path relative to the edited scene root (e.g.
"/Main/Camera3D"), NOT runtime "/root/..." paths. Derive
from prior tool responses or scene_get_hierarchy.
fields: When non-empty, return only these property names.
session_id: Optional Godot session to target. Empty = active session.node_set_propertytool Set a property on a node.
Set a property on a node.
Overrides on an instance's internal nodes require Editable Children
to be explicitly enabled; otherwise the call fails before mutation.
Verify the property name first — call ``node_get_properties`` (or read
``godot://node/{path}/properties``) to confirm the exact name and type
before writing. Guessing common Godot names often fails with
PROPERTY_NOT_ON_CLASS because Godot's actual properties differ from
intuition (e.g. ``Camera3D`` uses ``fov``/``current``, not ``field_of_view``;
``Sprite2D`` uses ``texture``, not ``image``; ``Node3D`` uses
``position``/``rotation``/``scale``, not ``transform.origin``).
Coerces ``value`` to the property's type:
- Vector2/Vector3: dict with x/y/z keys.
- Color: dict {r,g,b,a} or hex string ("#ff0000").
- NodePath: string ("../Other/Node").
- Node-typed export (``@export var target: Node2D``): node path string,
either a scene path ("/Main/Player") or relative to the node
("../Player"); the node's class is checked against the export's
type, and the response reports the scene path. null/"" clears.
- Typed node array (``@export var targets: Array[Node2D]``): JSON list
of node path strings, each resolved and class-checked the same way;
errors name the element index.
- Resource: res:// path string (loads + assigns); null/"" clears.
``{"__class__": "BoxMesh", ...}`` creates a built-in resource owned
by this property. After scene_save it is serialized in-place as a
``[sub_resource]`` inside the .tscn; it is not a reusable .tres.
For sharing, first call ``resource_manage(op="create",
params={"type": "BoxMesh", "properties": {...},
"resource_path": "res://meshes/box.tres"})``, then pass that res://
path here (or use resource_manage(op="assign")).
- StringName: plain string. Array/Dictionary: JSON list/object.
- PackedByteArray: JSON list of whole numbers 0..255, at most 65,536
bytes per value. [] clears. Strings, booleans, fractions and
out-of-range values are rejected before mutation. Also supported
inside typed containers and resource constructor properties.
Args:
path: Scene path relative to the edited scene root (e.g.
"/Main/Camera3D"), NOT runtime "/root/..." paths.
property: Property name (e.g. "fov", "position", "mesh"). Must match
Godot's exact identifier — introspect with ``node_get_properties``
if unsure rather than guessing.
value: New value. Pass null (or "" for resources) to clear.
scene_file: Optional editor-scene guard.
session_id: Optional Godot session to target. Empty = active session.project_runtool Run (play) the Godot project from the editor.
Run (play) the Godot project from the editor.
Modes:
- "main": Run the project's main scene (default).
- "current": Run the currently open scene.
- "custom": Run a specific scene (requires ``scene``).
Idempotent: if the project is already running, returns success with
``data.was_already_running=true`` (no scene switch). To switch scenes,
call ``project_manage(op="stop")`` first, then ``project_run`` again.
After starting playback, waits briefly for the Godot AI game helper to
check in. The response includes ``game_status``, ``helper_live``
(status == "live"), ``session_active`` (status not in {"not_live",
"stopped"}), and any ``recent_errors`` observed during the run window.
The top-level booleans mirror the same fields inside ``game_status``.
``game_status.status="not_live"`` means playback launched but the game
did not become live before the helper-ready window elapsed;
``"no_helper"`` means the project has no _mcp_game_helper autoload, as
with some headless/custom-main-loop setups (helper_live=false,
session_active=true); ``"stopped"`` means playback stopped or never
became active before liveness could be confirmed (helper_live=false,
session_active=false); ``"break"`` means the game process is parked in
a remote-debugger break — during boot this is a GDScript parse/load
error that froze the game before the helper could register, and the
response names the failing script when captured
(``game_status.break`` = ``{reason, can_debug, pre_live}``). A game at
a break cannot continue on its own: call ``project_manage(op="stop")``,
fix the error, and relaunch. Poll ``editor_state`` to see late
transitions.
Args:
mode: "main" | "current" | "custom". Default "main".
scene: Scene path (e.g. "res://levels/level1.tscn"). Required for "custom".
autosave: When True (default), Godot persists in-memory MCP scene
mutations to disk before running. Pass False for smoke tests
where MCP edits should stay in memory.
session_id: Optional Godot session to target. Empty = active session.scene_get_hierarchytool Get the scene tree hierarchy from the open scene.
Get the scene tree hierarchy from the open scene.
Returns a paginated flat list of nodes with name, type, path, and
child count. Walks up to the specified depth.
Resource form: ``godot://scene/hierarchy`` — prefer for active-session
reads.
Args:
depth: Maximum walk depth. Default 10.
offset: Number of nodes to skip. Default 0.
limit: Max number of nodes to return. Default 100.
session_id: Optional Godot session to target. Empty = active session.scene_opentool Open an existing scene file (.tscn) in the editor.Files
Open an existing scene file (.tscn) in the editor.
If ``path`` is already the currently edited scene this is a no-op
— the in-memory state (including any unsaved MCP mutations) is
preserved. Pass ``force_reload=True`` when the file on disk is the
authority and the editor should discard the open in-memory copy and
re-read the scene from disk.
The reply is sent only after the editor has actually switched to the
requested scene (``switched: true``), so follow-up writes are safe
immediately. ``switched: false`` with ``settle: "timeout"`` means the
switch had not landed within the wait window. In synchronous contexts
(e.g. inside ``batch_execute``) the reply returns immediately with
``switched: false`` and ``settle: "not_waited"``. In both of those
cases, re-check ``editor_state`` before issuing follow-up writes.
Args:
path: File path of the scene to open (e.g. "res://main.tscn").
force_reload: Re-read the scene from disk even when it is already
open. This discards unsaved in-memory edits to that scene.
session_id: Optional Godot session to target. Empty = active session.scene_savetool Save the currently edited scene to disk.
Save the currently edited scene to disk.
Node and property mutation tools change the editor's in-memory scene;
call this explicitly to persist those mutations to the existing path.
Args:
session_id: Optional Godot session to target. Empty = active session.script_attachtool Attach a script to a node in the scene tree.
Attach a script to a node in the scene tree.
Replaces any existing script on the node. Undoable.
Args:
path: Scene path of the node (e.g. "/Main/Player").
script_path: res:// path of the .gd (e.g. "res://scripts/player.gd").
A .cs requires a .NET-enabled editor build; other builds get a
clear error. Build the assembly before expecting executable behavior.
session_id: Optional Godot session to target. Empty = active session.script_createtool Create a script file on disk: GDScript (.gd, validated) or C# (.cs, text only).
Create a script file on disk: GDScript (.gd, validated) or C# (.cs, text only).
Writes content to the path. Overwrites if it exists. Registers the
file with the editor. New files include ``data.cleanup.rm`` listing
the file and, when supported by the editor, its ``.uid`` sidecar;
overwrite omits it.
.gd: source is parse-validated and the response carries
``diagnostics`` (``diagnostics_status="checked"``); an already-loaded
script is refreshed in place. .cs: written as text only — Godot AI
does not compile .NET, so ``diagnostics_status="not_checked"`` and
``validation_hint`` says to build the project (editor Build button
or ``dotnet build``) to see compiler errors. ``dotnet_editor``
reports whether the connected editor build has .NET at all. Any
other extension is rejected; use filesystem_manage op="write_text".
Args:
path: res:// path ending in .gd or .cs (e.g. "res://scripts/player.gd").
content: GDScript or C# source. Empty creates a blank file.
session_id: Optional Godot session to target. Empty = active session.script_patchtool Anchor-based string-replace edit on a .gd or .cs file.
Anchor-based string-replace edit on a .gd or .cs file.
Finds an exact ``old_text`` and replaces with ``new_text``. Fails
on multiple matches unless ``replace_all=True``; fails on zero matches.
Exact byte match (whitespace significant). Triggers filesystem scan.
.gd: parse-validated (``diagnostics``) and an already-loaded GDScript
is refreshed in place so the next call runs the new code (response
reloaded=true; otherwise reload_reason says why). .cs: text only —
``diagnostics_status="not_checked"``, ``reload_reason=
"csharp_requires_build"``; rebuild the .NET assembly to run it.
Not undoable via Ctrl+Z.
Args:
path: res:// path ending in .gd or .cs.
old_text: Exact substring to find. Must be unique unless replace_all.
new_text: Replacement (empty deletes).
replace_all: Replace every occurrence. Default False.
session_id: Optional Godot session to target. Empty = active session.session_activatetool Set the active Godot editor session for subsequent tool calls.
Set the active Godot editor session for subsequent tool calls.
Accepts either an exact session_id or a substring hint matched
against the session's short name (project folder basename),
project_path, or session_id. An exact id match always wins; a
substring must resolve to exactly one session or the tool returns
an error listing the candidates.
Args:
session_id: An exact session id (``<project-slug>@<16hex>``, e.g.
``my_game@7f9c3a10d8e426b1``, from ``session_manage`` with op="list")
OR a substring hint like a project folder name
("test_project", "my_game").test_runtool Run GDScript test suites inside the connected Godot editor.
Run GDScript test suites inside the connected Godot editor.
Discovers test_*.gd in res://tests/, instantiates them, and runs
all test_* methods. Returns a compact summary by default (counts,
suite names, duration) plus failures only. verbose=True includes
every individual test result (each with per-test ``duration_ms``).
Preloaded GDScript dependencies may remain stale after source edits;
the response includes cache_warning. Restart the editor before using
a rerun to validate dependency edits. ResourceLoader cache modes alone
do not refresh the GDScript preload cache.
The whole run has a 300s budget; the plugin aborts between tests
shortly before it expires and returns TEST_RUN_TIMEOUT with the
partial summary (full partials via test_manage(op="results_get")).
Long suites are safe — the editor services the MCP transport
between tests — but one single test blocking the main thread for
20s+ can still drop the session. Not allowed inside batch_execute.
The response includes ``edited_scene`` (the scene currently open in
the editor). Many suites assume the project's main scene is open; if
it is not and there are failures, the response also carries a
``scene_warning`` — open the main scene (``scene_open``) and re-run
before treating those failures as real.
Args:
suite: Run only the named suite (e.g. "scene", "node", "editor").
Empty runs all suites.
test_name: Run only tests whose name contains this substring.
exclude_test_name: Skip tests whose name contains this substring.
verbose: Include every individual test result. Default False.
session_id: Optional Godot session to target. Empty = active session.tooltool
No description.
Text the model reads (41)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
tool tool
manage tool
animation_create tool
Create a new Animation clip inside an AnimationPlayer's default library.
After creating the clip, add tracks via ``animation_manage`` ops
``add_property_track`` / ``add_method_track`` / ``create_simple``.
Track node paths are stored relative to the AnimationPlayer's
``root_node`` (default: its parent), not to the scene root — see
``animation_manage`` preset ops for a forgiving target_path that
accepts either form.
If ``player_path`` doesn't resolve, an AnimationPlayer is auto-created
at that path (parent must exist).
Args:
player_path: Scene path to the AnimationPlayer node.
name: Animation clip name (e.g. "idle", "pulse").
length: Duration in seconds.
loop_mode: "none" (default) | "linear" | "pingpong".
overwrite: Replace an existing animation with the same name.
session_id: Optional Godot session to target. Empty = active session.batch_execute tool
Execute a list of editor sub-commands in order, stopping on first error.
Each item must be `{"command": "<plugin_command>", "params": {...}}`.
Use the underlying plugin command names (e.g. `create_node`, `set_property`,
`delete_node`, `attach_script`), not the MCP tool names. Commands run
sequentially; execution stops at the first error. When `undo` is True
(default), any successful sub-commands are rolled back via the scene's
undo history if a later sub-command fails, producing atomic-on-failure
semantics.
Use this to compose multi-step edits (create node + set property +
attach script) into a single tool call. Rollback works for sub-commands
that modify the currently edited scene. `batch_execute` itself is not
allowed as a sub-command.
Scene paths are relative to the edited scene root (e.g. "/Main/Enemy"),
NOT runtime "/root/..." paths. The example below assumes the scene
root is named "Main" — substitute the actual root name.
Example:
commands=[
{"command": "create_node",
"params": {"type": "Node3D", "name": "Enemy", "parent_path": "/Main"}},
{"command": "set_property",
"params": {"path": "/Main/Enemy", "property": "position",
"value": {"x": 5, "y": 0, "z": 0}}},
]
Args:
commands: List of `{"command": str, "params": dict}` items.
undo: Roll back succeeded sub-commands on failure. Default True.
session_id: Optional Godot session to target. Empty = active session.
Returns a dict with `succeeded` (count), `stopped_at` (failing index
or null), `results` (per-sub-command status/data/error), `rolled_back`
(whether rollback was performed), and `undoable` (whether the batch
can be undone as a whole).editor_state tool
Get current Godot editor state: version, readiness, open scene, play state.
Resource form: ``godot://editor/state`` — prefer for active-session reads.
Also reachable as ``editor_manage(op="state")`` (same handler) for clients
that prefer a single rolled-up tool.
Code-mode MCP adapters keep the server and tool names separate:
``call('godot-ai', 'editor_state', {})``. Never pass a server-prefixed
tool name such as ``godot-ai/get_editor_state``; that is neither the
adapter's call signature nor a registered tool. For dedicated current-
scene data, use ``readResource('godot-ai', 'godot://scene/current')``.
Side effect: refreshes the server's session readiness cache from the
live editor reply. Useful as a recovery step after a write call is
rejected as ``EDITOR_NOT_READY (state=playing)`` when you already know
the game has stopped — calling ``editor_state`` once syncs the cache
and the next write proceeds. Issue #262.
Response includes ``game_status`` for authoritative game liveness,
plus ``helper_live`` (status == "live") and ``session_active``
(status not in {"not_live", "stopped"}) mirrored from the same fields
inside ``game_status``. ``is_playing`` remains raw editor play-state;
use ``game_status.status`` for liveness decisions.
``started_by`` identifies MCP versus editor launches; ``elapsed_s``
reports run age. ``last_input_age_s`` is a sampled idle estimate,
with ``input_sample_age_s`` for freshness; null means unknown.
Godot AI injected input is excluded. Other nodes may consume input
before the helper sees it; even fresh samples do not prove device idle.
``game_status.status="break"`` means the game process is parked in a
remote-debugger break (boot-time parse errors do this before the game
helper registers); it will not resume on its own — call
``project_manage(op="stop")``.
Args:
session_id: Optional Godot session to target. Empty = active session.logs_read tool
Read recent log lines from the Godot editor, plugin, or running game.
Resource form: ``godot://logs/recent`` — prefer for active-session reads.
Sources:
- "plugin" (default): MCP plugin recv/send/event traffic. Buffer 500.
- "game": stdout/stderr/push_error/push_warning from playing game
via ``_mcp_game_helper`` autoload. Buffer 2000, with
lines retained across runs and tagged by run_id. Default reads return
current-run lines only; pass ``since_run_id`` from an earlier response
to read that prior run. Entries: {source, level, text, run_id};
response carries run_id, current_run_id, game_status, helper_live,
session_active, dropped_count, stale_run_id. helper_live and
session_active mirror the same fields inside game_status; is_running
is retained as a compatibility alias of session_active.
Boot-time parse/load errors fire before the game helper's logger
attaches, so they are NEVER in this buffer; when editor-side errors
were recorded during the current run the response adds
``editor_errors_count`` and ``editor_errors_hint`` pointing at
source="editor" — treat a clean game log carrying that hint as a
run that lost scripts, not a clean launch.
- "editor": editor-process script errors and the Debugger dock's
visible Errors-tab rows — parse errors, GDScript reload warnings,
@tool/EditorPlugin runtime errors, push_error/push_warning.
Logger-backed entries and Errors-tab rows are read from the editor
UI when available. Use when the editor Output or
Debugger Errors panel shows red/yellow rows but other sources turned
up nothing. Buffer 500 for logger-backed entries; Debugger rows are
live UI state. Entries: {source, level, text, path, line, function}.
Filtered to .gd/.cs in the user project for Logger-backed entries;
addons/godot_ai/ dropped. Logger entries fired before plugin enable
are not captured.
- "all": plugin → editor → game lines (with source per entry).
Tail pattern: for game logs, poll the current run with offset=N and
keep the returned run_id. ``current_run_id`` identifies the active run;
``run_id`` identifies the run being read. Passing
``since_run_id=old_run_id`` reads retained lines for that prior run, and
``stale_run_id: true`` means the requested run is not the current run.
For editor logs, read once to capture
``next_cursor`` and pass it back as ``since_cursor`` on later calls.
``since_cursor`` reads Logger-backed editor entries only; live Debugger
Errors-tab rows are included in regular source="editor" reads but do
not have stable cursors. When ``since_cursor`` is set, it supersedes
``offset``. ``truncated: true`` means older entries fell out of the
ring before the poll; continue from the returned ``next_cursor`` and
treat ``oldest_cursor`` as the earliest retained sequence.
Set ``include_details=True`` for Errors-tab style metadata on game/editor
entries: original code/rationale, error type, resolved source, and
stack frames. Default false preserves compact responses.
Args:
count: Max lines to return. Default 50.
offset: Lines to skip. Default 0.
source: "plugin" | "game" | "editor" | "all". Default "plugin".
since_run_id: Game-log run id from a previous response; reads that
retained run instead of the current run.
since_cursor: Editor-log cursor from a previous source="editor" response.
include_details: Include rich error metadata for game/editor entries.
session_id: Optional Godot session to target. Empty = active session.editor_screenshot tool
Capture a screenshot of the Godot editor viewport or running game.
Picking a source: the default ``"viewport"`` captures the editor's 3D
viewport, which is empty if the edited scene has no Node3D anywhere in
the tree (or no scene is open). Those cases return ``EDITOR_NOT_READY``
with ``error.data = {editor_state: "viewport_not_3d", scene_root_type}``
and an actionable ``error.message`` — switch to ``"cinematic"`` if the
scene has a Camera3D, or open a scene with 3D content.
Sources:
- "viewport" (default): editor 3D viewport. Requires Node3D content in
the edited scene (root or any descendant); see above for the
no-3D-content / no-scene error shape.
- "viewport_2d": editor 2D viewport. Use for 2D scenes.
Not compatible with view_target/coverage/elevation/azimuth/fov.
- "cinematic": render edited scene through its active Camera3D (no
editor gizmos). Prefers a Camera3D marked ``current``; falls back to
the first Camera3D found in a depth-first walk. NODE_NOT_FOUND only
when the scene contains no Camera3D at all.
- "game": running game's framebuffer (only when project is running).
A backgrounded/minimized game window freezes its main loop; the
capture then returns the last rendered frame with
``stale_frame: true`` and a ``note`` in the metadata — focus the
game window and retry for a current frame. ``GAME_HELPER_TIMEOUT``
means the game process never replied at all (nothing rendered yet,
main thread blocked, or helper dead) — focus the window and retry,
or use game_command to confirm liveness.
``include_image=True`` (default) returns an MCP ImageContent block.
``view_target`` (comma-separated Node3D paths) reframes editor camera;
AABB metadata always returned. ``coverage=True`` with view_target
captures perspective + orthographic top-down references.
Args:
source: "viewport" | "viewport_2d" | "cinematic" | "game". Default "viewport".
max_resolution: Maximum longest edge. Default 640. 0 removes the requested
cap. Large PNGs are downscaled further to fit the MCP transport;
metadata reports the actual and original dimensions.
include_image: Return image data. Default True.
view_target: Node3D scene path(s) to frame, comma-separated.
coverage: With view_target, capture two reference shots + AABB.
elevation: Camera elevation in degrees (0=level, 90=overhead).
azimuth: Camera azimuth in degrees (0=front, 90=right).
fov: Camera FOV in degrees. Tight 20-30 = zoom; 60-75 = context.
user_prompt: Optional context from the agent that requested the
capture. With Vision Routing enabled it is sent alongside the
image so the vision model can describe what the agent is
looking for.
width: Cinematic render width, 1..4096 pixels. Supply with height.
Omit both to use the editor viewport size.
height: Cinematic render height, 1..4096 pixels. Supply with width.
save_to: Cinematic only: save the full render to a res:// PNG path.
Parent directories are created. max_resolution and transport
limits affect only the inline preview, not the saved PNG.
With include_image=False, only metadata crosses the transport;
saved_path, saved_width, saved_height and saved_bytes describe
the file. File writes require a writable editor and cannot be undone.
overwrite: Replace an existing save_to PNG. Default False.
session_id: Optional Godot session to target. Empty = active session.editor_reload_plugin tool
Reload the Godot editor plugin.
Disables and re-enables the plugin on the next frame. The response
shape depends on whether this MCP server was spawned by the plugin
or launched externally:
- **Plugin-managed (default install)**: returns a pre-flight ack
``{status: "reload_initiated", transport_will_drop: true,
old_session_id, guidance}`` immediately. The reload kills this
server, so the WebSocket transport drops; reconnect and call
``session_manage(op="list")`` to find the new session_id.
- **Externally launched** (e.g. ``python -m godot_ai --transport
streamable-http --port 8000 --reload``): waits for the new
session to register and returns
``{status: "reloaded", old_session_id, new_session_id}``.
If the old bridge disappears and no replacement registers
within 90 seconds, raises ``PLUGIN_DISCONNECTED`` with
``data.reason == "reload_timeout"`` and recovery diagnostics.
Args:
session_id: Optional Godot session to target. Empty = active session.node_get_properties tool
Get properties of a node.
Resource form: ``godot://node/{path}/properties`` — prefer for
active-session reads (returns the full property set).
The default returns every editor-visible property, which can be
50-150 entries. Pass ``fields`` to return only the properties you
need — a large response-size cut on this hot read. The response
always carries ``total_count`` (all editor-visible properties)
alongside ``count`` (returned): an unfiltered call returns the full
set, so ``count == total_count``; only the ``fields`` filter can
make ``count`` smaller. Requested names that match no
editor-visible property are listed in ``unknown_fields``, so a
nonexistent name is distinguishable from a property that exists
with a null value.
Null-valued properties are included: an unset object/resource slot
(``script`` on an unscripted node, an empty ``mesh`` or
``material``, …) returns ``"value": null`` with its declared type.
An attached script serializes to its ``res://`` path; built-in
scripts (no resource path) fall back to their string
representation.
Args:
path: Scene path relative to the edited scene root (e.g.
"/Main/Camera3D"), NOT runtime "/root/..." paths. Derive
from prior tool responses or scene_get_hierarchy.
fields: When non-empty, return only these property names.
session_id: Optional Godot session to target. Empty = active session.node_create tool
Create (spawn) a new node in the scene tree.
Creates a node of the given type and adds it to the parent, or
instantiates a PackedScene from ``scene_path``. type and scene_path
are mutually exclusive — when scene_path is given, type is ignored.
Creating below an instance's internal nodes requires Editable Children
to be enabled in Godot. Attaching directly to its root is supported.
Args:
type: Godot node class (e.g. "Node3D", "MeshInstance3D").
name: Optional name; Godot auto-names if empty.
parent_path: Parent path relative to the edited scene root (e.g.
"/Main"), NOT runtime "/root/...". Empty = scene root.
scene_path: Optional res:// path of a PackedScene to instantiate.
scene_file: Optional editor-scene guard (EDITED_SCENE_MISMATCH).
session_id: Optional Godot session to target. Empty = active session.
Returns the created node's full path in ``data.path`` — use it as the
prefix for subsequent commands targeting this node.node_set_property tool
Set a property on a node.
Overrides on an instance's internal nodes require Editable Children
to be explicitly enabled; otherwise the call fails before mutation.
Verify the property name first — call ``node_get_properties`` (or read
``godot://node/{path}/properties``) to confirm the exact name and type
before writing. Guessing common Godot names often fails with
PROPERTY_NOT_ON_CLASS because Godot's actual properties differ from
intuition (e.g. ``Camera3D`` uses ``fov``/``current``, not ``field_of_view``;
``Sprite2D`` uses ``texture``, not ``image``; ``Node3D`` uses
``position``/``rotation``/``scale``, not ``transform.origin``).
Coerces ``value`` to the property's type:
- Vector2/Vector3: dict with x/y/z keys.
- Color: dict {r,g,b,a} or hex string ("#ff0000").
- NodePath: string ("../Other/Node").
- Node-typed export (``@export var target: Node2D``): node path string,
either a scene path ("/Main/Player") or relative to the node
("../Player"); the node's class is checked against the export's
type, and the response reports the scene path. null/"" clears.
- Typed node array (``@export var targets: Array[Node2D]``): JSON list
of node path strings, each resolved and class-checked the same way;
errors name the element index.
- Resource: res:// path string (loads + assigns); null/"" clears.
``{"__class__": "BoxMesh", ...}`` creates a built-in resource owned
by this property. After scene_save it is serialized in-place as a
``[sub_resource]`` inside the .tscn; it is not a reusable .tres.
For sharing, first call ``resource_manage(op="create",
params={"type": "BoxMesh", "properties": {...},
"resource_path": "res://meshes/box.tres"})``, then pass that res://
path here (or use resource_manage(op="assign")).
- StringName: plain string. Array/Dictionary: JSON list/object.
- PackedByteArray: JSON list of whole numbers 0..255, at most 65,536
bytes per value. [] clears. Strings, booleans, fractions and
out-of-range values are rejected before mutation. Also supported
inside typed containers and resource constructor properties.
Args:
path: Scene path relative to the edited scene root (e.g.
"/Main/Camera3D"), NOT runtime "/root/..." paths.
property: Property name (e.g. "fov", "position", "mesh"). Must match
Godot's exact identifier — introspect with ``node_get_properties``
if unsure rather than guessing.
value: New value. Pass null (or "" for resources) to clear.
scene_file: Optional editor-scene guard.
session_id: Optional Godot session to target. Empty = active session.node_find tool
Find nodes in the scene tree by name, type, or group.
At least one filter must be provided. Filters AND together. Paginated.
Args:
name: Substring match on node name (case-insensitive).
type: Exact Godot class name (e.g. "MeshInstance3D").
group: Group name the node must belong to.
offset: Number of results to skip. Default 0.
limit: Max number of results. Default 100.
session_id: Optional Godot session to target. Empty = active session.project_run tool
Run (play) the Godot project from the editor.
Modes:
- "main": Run the project's main scene (default).
- "current": Run the currently open scene.
- "custom": Run a specific scene (requires ``scene``).
Idempotent: if the project is already running, returns success with
``data.was_already_running=true`` (no scene switch). To switch scenes,
call ``project_manage(op="stop")`` first, then ``project_run`` again.
After starting playback, waits briefly for the Godot AI game helper to
check in. The response includes ``game_status``, ``helper_live``
(status == "live"), ``session_active`` (status not in {"not_live",
"stopped"}), and any ``recent_errors`` observed during the run window.
The top-level booleans mirror the same fields inside ``game_status``.
``game_status.status="not_live"`` means playback launched but the game
did not become live before the helper-ready window elapsed;
``"no_helper"`` means the project has no _mcp_game_helper autoload, as
with some headless/custom-main-loop setups (helper_live=false,
session_active=true); ``"stopped"`` means playback stopped or never
became active before liveness could be confirmed (helper_live=false,
session_active=false); ``"break"`` means the game process is parked in
a remote-debugger break — during boot this is a GDScript parse/load
error that froze the game before the helper could register, and the
response names the failing script when captured
(``game_status.break`` = ``{reason, can_debug, pre_live}``). A game at
a break cannot continue on its own: call ``project_manage(op="stop")``,
fix the error, and relaunch. Poll ``editor_state`` to see late
transitions.
Args:
mode: "main" | "current" | "custom". Default "main".
scene: Scene path (e.g. "res://levels/level1.tscn"). Required for "custom".
autosave: When True (default), Godot persists in-memory MCP scene
mutations to disk before running. Pass False for smoke tests
where MCP edits should stay in memory.
session_id: Optional Godot session to target. Empty = active session.scene_get_hierarchy tool
Get the scene tree hierarchy from the open scene.
Returns a paginated flat list of nodes with name, type, path, and
child count. Walks up to the specified depth.
Resource form: ``godot://scene/hierarchy`` — prefer for active-session
reads.
Args:
depth: Maximum walk depth. Default 10.
offset: Number of nodes to skip. Default 0.
limit: Max number of nodes to return. Default 100.
session_id: Optional Godot session to target. Empty = active session.scene_open tool
Open an existing scene file (.tscn) in the editor.
If ``path`` is already the currently edited scene this is a no-op
— the in-memory state (including any unsaved MCP mutations) is
preserved. Pass ``force_reload=True`` when the file on disk is the
authority and the editor should discard the open in-memory copy and
re-read the scene from disk.
The reply is sent only after the editor has actually switched to the
requested scene (``switched: true``), so follow-up writes are safe
immediately. ``switched: false`` with ``settle: "timeout"`` means the
switch had not landed within the wait window. In synchronous contexts
(e.g. inside ``batch_execute``) the reply returns immediately with
``switched: false`` and ``settle: "not_waited"``. In both of those
cases, re-check ``editor_state`` before issuing follow-up writes.
Args:
path: File path of the scene to open (e.g. "res://main.tscn").
force_reload: Re-read the scene from disk even when it is already
open. This discards unsaved in-memory edits to that scene.
session_id: Optional Godot session to target. Empty = active session.scene_save tool
Save the currently edited scene to disk.
Node and property mutation tools change the editor's in-memory scene;
call this explicitly to persist those mutations to the existing path.
Args:
session_id: Optional Godot session to target. Empty = active session.script_create tool
Create a script file on disk: GDScript (.gd, validated) or C# (.cs, text only).
Writes content to the path. Overwrites if it exists. Registers the
file with the editor. New files include ``data.cleanup.rm`` listing
the file and, when supported by the editor, its ``.uid`` sidecar;
overwrite omits it.
.gd: source is parse-validated and the response carries
``diagnostics`` (``diagnostics_status="checked"``); an already-loaded
script is refreshed in place. .cs: written as text only — Godot AI
does not compile .NET, so ``diagnostics_status="not_checked"`` and
``validation_hint`` says to build the project (editor Build button
or ``dotnet build``) to see compiler errors. ``dotnet_editor``
reports whether the connected editor build has .NET at all. Any
other extension is rejected; use filesystem_manage op="write_text".
Args:
path: res:// path ending in .gd or .cs (e.g. "res://scripts/player.gd").
content: GDScript or C# source. Empty creates a blank file.
session_id: Optional Godot session to target. Empty = active session.script_patch tool
Anchor-based string-replace edit on a .gd or .cs file.
Finds an exact ``old_text`` and replaces with ``new_text``. Fails
on multiple matches unless ``replace_all=True``; fails on zero matches.
Exact byte match (whitespace significant). Triggers filesystem scan.
.gd: parse-validated (``diagnostics``) and an already-loaded GDScript
is refreshed in place so the next call runs the new code (response
reloaded=true; otherwise reload_reason says why). .cs: text only —
``diagnostics_status="not_checked"``, ``reload_reason=
"csharp_requires_build"``; rebuild the .NET assembly to run it.
Not undoable via Ctrl+Z.
Args:
path: res:// path ending in .gd or .cs.
old_text: Exact substring to find. Must be unique unless replace_all.
new_text: Replacement (empty deletes).
replace_all: Replace every occurrence. Default False.
session_id: Optional Godot session to target. Empty = active session.script_attach tool
Attach a script to a node in the scene tree.
Replaces any existing script on the node. Undoable.
Args:
path: Scene path of the node (e.g. "/Main/Player").
script_path: res:// path of the .gd (e.g. "res://scripts/player.gd").
A .cs requires a .NET-enabled editor build; other builds get a
clear error. Build the assembly before expecting executable behavior.
session_id: Optional Godot session to target. Empty = active session.session_activate tool
Set the active Godot editor session for subsequent tool calls.
Accepts either an exact session_id or a substring hint matched
against the session's short name (project folder basename),
project_path, or session_id. An exact id match always wins; a
substring must resolve to exactly one session or the tool returns
an error listing the candidates.
Args:
session_id: An exact session id (``<project-slug>@<16hex>``, e.g.
``my_game@7f9c3a10d8e426b1``, from ``session_manage`` with op="list")
OR a substring hint like a project folder name
("test_project", "my_game").test_run tool
Run GDScript test suites inside the connected Godot editor.
Discovers test_*.gd in res://tests/, instantiates them, and runs
all test_* methods. Returns a compact summary by default (counts,
suite names, duration) plus failures only. verbose=True includes
every individual test result (each with per-test ``duration_ms``).
Preloaded GDScript dependencies may remain stale after source edits;
the response includes cache_warning. Restart the editor before using
a rerun to validate dependency edits. ResourceLoader cache modes alone
do not refresh the GDScript preload cache.
The whole run has a 300s budget; the plugin aborts between tests
shortly before it expires and returns TEST_RUN_TIMEOUT with the
partial summary (full partials via test_manage(op="results_get")).
Long suites are safe — the editor services the MCP transport
between tests — but one single test blocking the main thread for
20s+ can still drop the session. Not allowed inside batch_execute.
The response includes ``edited_scene`` (the scene currently open in
the editor). Many suites assume the project's main scene is open; if
it is not and there are failures, the response also carries a
``scene_warning`` — open the main scene (``scene_open``) and re-run
before treating those failures as real.
Args:
suite: Run only the named suite (e.g. "scene", "node", "editor").
Empty runs all suites.
test_name: Run only tests whose name contains this substring.
exclude_test_name: Skip tests whose name contains this substring.
verbose: Include every individual test result. Default False.
session_id: Optional Godot session to target. Empty = active session.get_class_info resource
ClassDB metadata for a class in the active Godot editor.
Returns the full documentation set (properties, methods, signals,
enums, constants). The `get_class` tool defaults to properties-only,
but a resource URI cannot carry a `sections` argument, so the resource
pins `sections="all"` to preserve its advertised full-reference
contract.get_custom_tools resource
get_current_selection resource
Currently selected nodes in the Godot editor.
get_recent_logs resource
Last 100 log lines from the Godot editor console.
get_editor_state resource
Editor version, project name, current scene, readiness, play state.
get_materials resource
All Material resources under res:// (every Material subclass + .tres).
get_input_map resource
All input map actions and their bound events. Excludes built-in ui_*.
get_performance resource
Performance singleton snapshot (FPS, memory, draw calls, frame time).
get_test_results resource
Most recent ``test_run`` results without re-executing tests.
get_node_properties resource
All properties of the node at scene path ``path`` (e.g. Main/Camera3D).
get_node_children resource
Direct children of the node at scene path ``path`` (name, type, path each).
get_node_groups resource
Group names the node at scene path ``path`` belongs to.
get_project_info resource
Project name, Godot version, paths, and play state.
get_project_settings resource
Common project settings subset (display, physics, rendering).
get_current_scene resource
Current scene path and root node info from the active Godot editor.
get_scene_hierarchy resource
Scene tree hierarchy from the active Godot editor (first 100 nodes).
A resource URI takes no arguments, so this read is capped; a truncated
result sets `resource_truncated` with a hint. Use the
`scene_get_hierarchy` tool for offset/limit pagination or a scoped depth.get_script resource
Read a GDScript file at the given res:// path.
``path`` is the res:// path with the ``res://`` prefix dropped — e.g.
``godot://script/scripts/player.gd`` reads ``res://scripts/player.gd``.get_sessions resource
All connected Godot editor sessions and their metadata.
get_shader resource
Read a .gdshader/.gdshaderinc file at the given res:// path.
``path`` is the res:// path with the ``res://`` prefix dropped — e.g.
``godot://shader/shaders/pulse.gdshader`` reads
``res://shaders/pulse.gdshader``.get_visual_shader resource
Read a VisualShader graph at the given res:// path.
``path`` is the res:// path with the ``res://`` prefix dropped — e.g.
``godot://visual_shader/shaders/pulse.tres`` reads
``res://shaders/pulse.tres``.What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 41 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 41 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 41 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 41 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 41 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 41 capabilities; 40 more call code the scanner could not follow, where it may happen
- Tools that touch files1 of 41 capabilities touch files; 39 more call code the scanner could not follow, where it may happen
- Tools that call the network1 of 41 capabilities call the network; 39 more call code the scanner could not follow, where it may happen
Where the code is: 41 handlers in 22 files at commit 9bb1c2fe5936
src/godot_ai/resources/classes.pyget_class_infosrc/godot_ai/resources/custom.pyget_custom_toolssrc/godot_ai/resources/editor.pyget_current_selection, get_recent_logssrc/godot_ai/resources/library.pyget_editor_state, get_materials, get_input_map, get_performance, get_test_resultssrc/godot_ai/resources/nodes.pyget_node_properties, get_node_children, get_node_groupssrc/godot_ai/resources/project.pyget_project_info, get_project_settingssrc/godot_ai/resources/scenes.pyget_current_scene, get_scene_hierarchysrc/godot_ai/resources/scripts.pyget_scriptsrc/godot_ai/resources/sessions.pyget_sessionssrc/godot_ai/resources/shaders.pyget_shadersrc/godot_ai/resources/visual_shaders.pyget_visual_shadertests/unit/test_ci_game_capture_smoke.pytoolsrc/godot_ai/tools/_meta_tool.pymanagesrc/godot_ai/tools/animation.pyanimation_createsrc/godot_ai/tools/batch.pybatch_executesrc/godot_ai/tools/editor.pyeditor_state, logs_read, editor_screenshot, editor_reload_pluginsrc/godot_ai/tools/node.pynode_get_properties, node_create, node_set_property, node_findsrc/godot_ai/tools/project.pyproject_runsrc/godot_ai/tools/scene.pyscene_get_hierarchy, scene_open, scene_savesrc/godot_ai/tools/script.pyscript_create, script_patch, script_attachsrc/godot_ai/tools/session.pysession_activatesrc/godot_ai/tools/testing.pytest_run
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSVNothing could be resolved to exact versions; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- MCP SDK versionfastmcp ==4.1.6, mcp ==2.3.0
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 41 capabilities; 40 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read (2 only in code no tool reaches)
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | Streamable HTTP |
| Sign-in | not checked needs the live server |
| MCP SDK | fastmcp ==4.1.6, mcp ==2.3.0 |
| Servers in the code | 14 (Godot AI attach, test) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-15 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 3 catalogs (github_search, glama, mcp_toplist) |
|---|---|
| License | MIT |
| Created | 2026-04-12 |
| Topics | ai game-development godot godot-plugin mcp |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.