Godot MCP

v1.0.4
io.github.jxlee007/godot-mcp Checked 1 day ago Published 2 months ago

Pure-Python FastMCP server for Godot 4 — 28 headless & animation tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_godot_version

Retrieves the installed Godot 4 engine version string by querying the local Godot binary.

launch_editor

Spawns the Godot visual editor GUI as an independent desktop process anchored to the specified project directory.

ParameterTypeDescription
project_path *string

run_project

Executes a Godot project in debug mode as a background process and captures runtime stdout/stderr streams.

ParameterTypeDescription
project_path *string
scenestring

get_debug_output

Reads currently buffered stdout and stderr log lines from the active background Godot debug process.

stop_project

Terminates the actively running Godot debug process and returns its final flushed console output.

list_projects

Discovers and lists Godot project directories containing a valid project.godot file within a target directory.

ParameterTypeDescription
directory *string
recursiveboolean

get_project_info

Inspects project.godot and project tree to return metadata, asset counts, script inventory, and engine compatibility.

ParameterTypeDescription
project_path *string

create_scene

Creates a new Godot scene (.tscn) file with a validated root node type using the headless GDScript bridge.

ParameterTypeDescription
project_path *string
scene_path *string
root_node_typestring

add_node

Instantiates and appends a node of specified Godot class and property dictionary into an existing scene.

ParameterTypeDescription
node_name *string
node_type *string
project_path *string
scene_path *string
parent_node_pathstring
properties

load_sprite

Loads a texture resource and binds it to a 2D or 3D sprite node within a scene file.

ParameterTypeDescription
node_path *string
project_path *string
scene_path *string
texture_path *string

export_mesh_library

Extracts 3D mesh instances from a scene and compiles them into a MeshLibrary (.res) resource for GridMap tiles.

ParameterTypeDescription
output_path *string
project_path *string
scene_path *string
mesh_item_names

save_scene

Persists scene modifications or creates a variant scene copy at a new relative path.

ParameterTypeDescription
project_path *string
scene_path *string
new_pathstring

get_uid

Reads and returns the Godot 4.4+ unique resource identifier (UID) for a specified asset file.

ParameterTypeDescription
file_path *string
project_path *string

update_project_uids

Recursively iterates all project scenes, scripts, and shaders to regenerate and update missing Godot 4.4+ UIDs.

ParameterTypeDescription
project_path *string

quantize_animation_keyframes

Parses raw keyframe times in a .tscn or .tres animation and quantizes them to discrete frame steps (e.g. 12-fps stepped anime look).

ParameterTypeDescription
file_path *string
animation_namestring
target_fpsinteger

set_animation_interpolation_mode

Bulk-edits animation track interpolation modes (nearest/constant, linear, cubic) in a scene or resource file.

ParameterTypeDescription
file_path *string
modestring
track_indexinteger

stitch_animation_library

Compiles external animation clip files into a unified master AnimationLibrary (.tres) resource referencing named animations.

ParameterTypeDescription
clips *array
output_res_path *string

generate_track_filter

Generates an AnimationNodeBlendFilter resource block and configuration code to isolate upper-body bones from locked lower-body bones.

ParameterTypeDescription
locked_bone_paths *array
scene_path *string
blend_node_namestring

generate_state_machine

Injects an AnimationNodeStateMachine sub-resource graph with layout coordinates and state nodes into a target .tscn scene file.

ParameterTypeDescription
node_name *string
scene_path *string
states *array
anim_player_pathstring
start_statestring

compile_state_transitions

Serializes and injects transition logic connections, advance conditions, and crossfade times into an existing AnimationNodeStateMachine block.

ParameterTypeDescription
scene_path *string
state_machine_resource_id *string
transitions *array

calculate_blend_space_2d

Computes and injects an AnimationNodeBlendSpace2D sub-resource for directional movement blending based on 2D controller coordinates.

ParameterTypeDescription
blend_points *array
node_name *string
scene_path *string
anim_player_pathstring
x_labelstring
y_labelstring

generate_bezier_camera_path

Generates a 3D Catmull-Rom bezier camera rail (Path3D, Curve3D, PathFollow3D) with adjustable speed-curve tension multiplier in a .tscn scene.

ParameterTypeDescription
path_node_name *string
scene_path *string
waypoints *array
add_cameraboolean
add_path_followboolean
tensionnumber

inject_lookat_tracking

Generates and attaches a procedural slerp look-at tracking GDScript to a Camera3D node to follow target Node3D transforms.

ParameterTypeDescription
camera_node_path *string
scene_path *string
target_node_path *string
script_output_pathstring

build_camera_switcher_timeline

Synthesizes an Animation resource that toggles Camera3D.current across multiple cameras at defined cut timestamps for cinematic editing.

ParameterTypeDescription
anim_player_node *string
scene_path *string
switches *array
animation_namestring
timeline_lengthnumber

batch_shader_uniforms

Batch scans .tres ShaderMaterial files in a directory and overwrites shader_parameter/* values for global NPR look adjustments.

ParameterTypeDescription
directory *string
uniform_overrides *object
dry_runboolean
recursiveboolean

remap_texture_channels

Rewires texture slot properties and manages ext_resource references in a .tres material file for hand-painted art workflows.

ParameterTypeDescription
channel_map *object
material_path *string

toggle_movie_maker

Configures project.godot to toggle Godot Movie Maker mode, locking render time-steps for deterministic video and frame sequence capture.

ParameterTypeDescription
project_path *string
enableboolean
fpsinteger
output_filestring

run_headless_diagnostics

Executes automated project diagnostics by invoking an external system command (Godot CLI binary) to validate resource imports, check UID integrity, and detect broken shader entry points.

ParameterTypeDescription
project_path *string
checks
timeout_secondsinteger