
Godot MCP
io.github.tugcantopaloglu由 GitHub 帳號 tugcantopaloglu 發布v1.0.0更新於 Oct 28, 2026
MCP server for full Godot 4.x engine control with 165 tools for AI-driven game development
概覽
本機 MCP 伺服器,讓 AI 助理全面控制 Godot 4.x 遊戲專案:場景、腳本、專案設定以及執行中的遊戲。
- 可以做什麼
- 建立、執行、停止與匯出 Godot 專案,讀取或修改專案設定、autoload、輸入對應與匯出預設集
- 不需執行遊戲即可建立與編輯場景和資源:讀取場景樹、修改或移除節點、掛載腳本、管理訊號與著色器
- 寫入、重新命名與刪除專案檔案,建立 GDScript 或 C# 腳本,並檢查腳本的語法與型別錯誤
- 檢視並操作執行中的遊戲:讀寫節點屬性、呼叫方法、執行 GDScript、產生或移動節點、切換場景
- 驅動執行期輸入與除錯:截圖、點擊、按鍵、手把與觸控,以及日誌、錯誤、效能指標與射線偵測
- 在執行期設定算繪、2D/3D 幾何、動畫、音訊、UI 控制項與網路
- 適用情境
- 適合讓助理從頭到尾建立、編輯、除錯與測試 Godot 4.4 以上版本的遊戲專案,包括檢視並操作執行中的遊戲,而不只是改檔案。
- 執行需求
- 以 Node.js 套件在本機透過 stdio 執行,需要 Node.js 18 或更新版本;需安裝 Godot Engine 4.4 或更新版本,可用 GODOT_PATH 指定路徑。執行期遊戲工具需將提供的互動伺服器腳本註冊為 autoload,該腳本會監聽 127.0.0.1:9090。C# 相關功能另需 .NET SDK 8.0+ 與 Godot .NET 版本。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Godot MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Godot MCP - Full Control
[圖片] [Made with Godot] [圖片] [圖片]
A comprehensive Model Context Protocol (MCP) server that gives AI assistants full control over the Godot game engine. 157 tools spanning networking, 3D/2D rendering, UI controls, audio effects, animation trees, file I/O, runtime code execution, property inspection, scene manipulation, signal management, physics, project creation, and more.
Acknowledgments
This project is built upon and extends godot-mcp by Solomon Elias (Coding-Solo). The original project provided the foundational architecture including the TypeScript MCP server, headless GDScript operations system, and TCP-based runtime interaction server. Thank you for making this possible with your excellent open-source work!
What's New (Improvements Over Original)
The original godot-mcp provided 20 tools for basic project management and scene creation. This fork extends it to 157 tools with the following major additions:
New in 3.1
validate_scriptautoload resolution - Script validation now compiles the target through aSceneTreeat_initialize()(after project autoloads are registered) instead of--check-onlyat_init(). References to autoload singletons no longer produce falseIdentifier not founderrors, while real syntax/type errors are still caught. Verified building a full game whose scripts reference several autoloads.manage_input_mapevent merging - Adding a second key to an existing input action now merges it into that action'seventsarray (withphysical_keycodede-duplication) instead of writing a duplicateactionname=line, which previously leftproject.godotmalformed and silently dropped earlier bindings.
New in 3.0
- .NET / C# support - Scaffold C# projects and generate C# scripts (
create_projectwithdotnet: true,create_csharp_script); the.csprojSDK version is matched to your installed Godot. - GDScript diagnostics - Validate scripts for syntax and type errors without running the game (
validate_script, andvalidate_scriptsfor all git-changed or project-wide files). - Correctness and robustness fixes across the headless scene operations and the runtime interaction server (resource-typed properties now persist, reparenting works, runtime commands are correlated by request id, and the tools survive projects with warnings-as-errors). Requires Godot 4.4 or later; tested and working with the latest Godot 4.7.
Runtime Code Execution
game_eval- Execute arbitrary GDScript code in the running game with return values- Full
awaitsupport for async GDScript code - Works even when the game is paused (
PROCESS_MODE_ALWAYS)
Runtime Node Inspection & Manipulation
game_get_property/game_set_property- Read/write any property on any node by pathgame_call_method- Call any method on any node with argumentsgame_get_node_info- Full node introspection: properties, signals, methods, childrengame_instantiate_scene- Dynamically add scenes to the running gamegame_remove_node- Remove nodes at runtimegame_change_scene- Switch scenes at runtimegame_reparent_node- Move nodes between parents
Signal System
game_connect_signal- Wire up signal connections at runtimegame_disconnect_signal- Remove signal connectionsgame_emit_signal- Emit signals with arguments
Animation & Tweening
game_play_animation- Control AnimationPlayer (play, stop, pause, list)game_tween_property- Smooth property animation with configurable easing
Game Control & Debugging
game_pause- Pause/unpause the gamegame_performance- FPS, frame time, memory, object counts, draw callsgame_wait- Wait N frames (timing-sensitive operations)game_get_nodes_in_group- Query nodes by groupgame_find_nodes_by_class- Find all nodes of a specific class
Headless Scene Operations (No Running Game Needed)
read_scene- Parse any .tscn file and get full node tree with properties as JSONmodify_scene_node- Change node properties in scene filesremove_scene_node- Remove nodes from scene filesattach_script- Attach GDScript files to nodes in scenescreate_resource- Create .tres resource files (materials, themes, etc.)
Project Management
read_project_settings- Parse project.godot as structured JSONmodify_project_settings- Change project settings programmaticallylist_project_files- List and filter project files by extension
File I/O
read_file/write_file/delete_file- Full file system access within Godot projectscreate_directory- Create directory structures for scripts, scenes, assets
Error & Log Capture
game_get_errors- Get new push_error/push_warning messages since last callgame_get_logs- Get new print output from the running game since last call
Enhanced Input
game_key_hold/game_key_release- Hold keys down for movement testing (WASD etc.)game_scroll- Mouse scroll wheel eventsgame_mouse_drag- Drag between two points over multiple framesgame_gamepad- Gamepad button and axis input events
Project Creation & Configuration
create_project- Create a new Godot project from scratch (passdotnet: trueto scaffold a .NET/C# project)create_csharp_script- Create a C# script in a Godot .NET projectmanage_autoloads- Add, remove, or list autoloadsmanage_input_map- Add, remove, or list input actions and key bindingsmanage_export_presets- Create or modify export preset configuration
.NET / C# Support
create_projectwithdotnet: true- Scaffold a Godot .NET project (.csprojwithGodot.NET.Sdkmatched to your Godot version, plus the"C#"feature flag)create_csharp_script- Generate an idiomatic C# script (partial class, correct_Ready/_Processoverride signatures); the class name is kept in sync with the file name so Godot can attach itget_project_inforeports anisDotnetfield
GDScript Diagnostics
validate_script- Check a single GDScript file for syntax and type errors headlessly, returning{ valid, errors: [{ message, file, line }] }validate_scripts- Batch-validate all git-changed.gdfiles (or the whole project), so an agent can verify its edits before running the game
Camera, Physics & Audio
game_get_camera/game_set_camera- Query and control 2D/3D camerasgame_raycast- Cast physics rays (auto-detects 2D vs 3D)game_get_audio- Get audio bus layout and playing streamsgame_spawn_node- Create any node type at runtime with propertiesgame_set_shader_param- Set shader parameters on materialsgame_audio_play/game_audio_bus- Full audio playback and bus controlgame_navigate_path- Query navigation paths (2D/3D)game_tilemap- Get/set TileMapLayer cellsgame_add_collision- Add collision shapes to physics bodiesgame_environment- Configure post-processing (fog, glow, SSAO, tonemap, etc.)game_manage_group- Add/remove nodes from groupsgame_create_timer- Create timer nodes programmaticallygame_set_particles- Configure GPUParticles2D/3D properties and process materialsgame_create_animation- Create animations with value/method/bezier/audio tracks and keyframesexport_project- Trigger headless project export builds (CI/CD ready)game_serialize_state- Save/load entire node tree state as JSONgame_physics_body- Configure mass, velocity, damping, friction, bouncegame_create_joint- Create physics joints (pin, spring, hinge, cone, slider)game_bone_pose- Get/set skeleton bone poses for character animationgame_ui_theme- Apply color, constant, and font size theme overridesgame_viewport- Create/configure SubViewport nodesgame_debug_draw- Draw debug geometry (lines, spheres, boxes)
Networking
game_http_request- HTTP GET/POST/PUT/DELETE with headers and bodygame_websocket- WebSocket client connect/disconnect/send messagesgame_multiplayer- ENet multiplayer create server/client/disconnectgame_rpc- Call or configure RPC methods on nodes
System & Window Control
game_script- Attach, detach, or get source of node scripts at runtimegame_window- Get/set window size, fullscreen, title, positiongame_os_info- Get platform, locale, screen, adapter, memory infogame_time_scale- Get/set Engine.time_scale and timing infogame_process_mode- Set node process mode (pausable/always/disabled)game_world_settings- Get/set gravity, physics FPS, and world settings
Advanced Signals & Input
game_list_signals- List all signals on a node with connectionsgame_await_signal- Await a signal with timeout and return argsgame_touch- Simulate touch press/release/drag and gesturesgame_input_state- Query pressed keys, mouse position, connected padsgame_input_action- Manage runtime InputMap actions and strength
3D Rendering & Geometry
game_csg- Create/configure CSG nodes with boolean operationsgame_multimesh- Create/configure MultiMeshInstance3D for instancinggame_procedural_mesh- Generate meshes via ArrayMesh from vertex datagame_light_3d- Create/configure 3D lights (directional/omni/spot)game_mesh_instance- Create MeshInstance3D with primitive meshesgame_gridmap- GridMap set/get/clear cells and query used cellsgame_3d_effects- Create ReflectionProbe, Decal, or FogVolumegame_gi- Create/configure VoxelGI or LightmapGIgame_path_3d- Create Path3D/Curve3D and manage curve pointsgame_sky- Create/configure Sky with procedural/physical skygame_camera_attributes- Configure DOF, exposure, auto-exposure on cameragame_navigation_3d- Create/configure NavigationRegion3D and bakegame_physics_3d- Area3D queries and point/shape intersection tests
2D Systems
game_canvas- Create/configure CanvasLayer and CanvasModulategame_canvas_draw- 2D drawing: line/rect/circle/polygon/text/cleargame_light_2d- Create/configure 2D lights and light occludersgame_parallax- Create/configure ParallaxBackground and layersgame_shape_2d- Line2D/Polygon2D point manipulationgame_path_2d- Path2D/Curve2D management and AnimatedSprite2Dgame_physics_2d- Area2D queries and 2D point/shape intersections
Advanced Animation
game_animation_tree- AnimationTree state machine travel and paramsgame_animation_control- AnimationPlayer seek/queue/speed/info controlgame_skeleton_ik- SkeletonIK3D start/stop/set target position
Advanced Audio
game_audio_effect- Add/remove/configure audio bus effectsgame_audio_bus_layout- Create/remove/reorder audio buses and routinggame_audio_spatial- Configure AudioStreamPlayer3D spatial properties
Editor & Project Tools
rename_file- Rename or move a file within the projectmanage_resource- Read or modify .tres/.res resource filescreate_script- Create a GDScript file from a templatevalidate_script- Check a GDScript file for syntax/type errors headlessly (no run needed)validate_scripts- Batch-check GDScript files: git-changed ones by default, or allmanage_scene_signals- List/add/remove signal connections in .tscn filesmanage_layers- List/set named layer definitions in projectmanage_plugins- List/enable/disable editor pluginsmanage_shader- Create or read .gdshader filesmanage_theme_resource- Create/read/modify Theme .tres resourcesset_main_scene- Set the main scene in project.godotmanage_scene_structure- Rename/duplicate/move nodes within .tscn scenesmanage_translations- List/add/remove translation files in projectgame_locale- Set/get locale and translate strings at runtime
UI Controls
game_ui_control- Set focus, anchors, tooltip, mouse filter on Controlgame_ui_text- LineEdit/TextEdit/RichTextLabel text operationsgame_ui_popup- Show/hide/popup for Popup/Dialog/Window nodesgame_ui_tree- Tree control: get/select/collapse/add/remove itemsgame_ui_item_list- ItemList/OptionButton: get/select/add/remove itemsgame_ui_tabs- TabContainer/TabBar: get/set current tabgame_ui_menu- PopupMenu/MenuBar: add/remove/get menu itemsgame_ui_range- ProgressBar/Slider/SpinBox/ColorPicker get/set
Rendering & Resources
game_render_settings- Get/set MSAA, FXAA, TAA, scaling mode/scalegame_resource- Runtime resource load, save, or preload
Robustness Improvements
- Reentrancy guard - Prevents concurrent command processing during async operations
- Full type conversion - Supports Vector2/3, Color, Quaternion, Basis, Transform2D/3D, AABB, Rect2, and all packed array types
- Smart property type detection - Uses node's
get_property_list()for automatic type conversion - PackedArray serialization - Proper JSON arrays instead of string fallback
- Graceful error handling - Scene read fallback to raw .tscn text on missing dependencies
All 157 Tools
Project Management (7 tools)
Scene Management (7 tools)
Headless Scene Operations (5 tools)
Project Settings (3 tools)
Runtime Input (4 tools)
Runtime Inspection (3 tools)
Runtime Code Execution (1 tool)
Runtime Node Manipulation (7 tools)
Runtime Signals (5 tools)
Runtime Animation (2 tools)
Runtime Utilities (5 tools)
File I/O (4 tools)
Error & Log Capture (2 tools)
Enhanced Input (8 tools)
Project Creation (5 tools)
Advanced Runtime (24 tools)
Build & Export (1 tool)
Networking (4 tools)
System & Window (6 tools)
3D Rendering & Geometry (13 tools)
2D Systems (7 tools)
Advanced Animation (3 tools)
Advanced Audio (3 tools)
Editor & Project Tools (14 tools)
UI Controls (8 tools)
Rendering & Resources (2 tools)
Requirements
- Godot Engine 4.4 or later (the headless operations script and UID features require 4.4+); tested and working with the latest Godot 4.7
- (Optional) .NET SDK 8.0+ and the Godot .NET (C#) build, only if you use
create_project'sdotnet: trueflag orcreate_csharp_script - Node.js >= 18.0.0
- An AI assistant that supports MCP (Claude Code, Cline, Cursor, etc.)
Installation
Configuration
Claude Code
Add to your Claude Code MCP settings:
Cline (VS Code)
Add to your Cline MCP settings (cline_mcp_settings.json):
Cursor
Create .cursor/mcp.json in your project:
Runtime Tools Setup
To use the game_* runtime tools, your Godot project needs the MCP interaction server autoload. Copy build/scripts/mcp_interaction_server.gd to your project and register it as an autoload:
- Copy
build/scripts/mcp_interaction_server.gdto your project's scripts folder - In Godot: Project > Project Settings > Autoload
- Add the script with the name
McpInteractionServer
The server listens on 127.0.0.1:9090 and accepts JSON commands over TCP when the game is running.
Environment Variables
File and scene paths must stay within their project directory, including paths under symbolic links. These checks cover MCP tool arguments. Runtime evaluation and generated scripts run with the Godot process account's permissions, so use a separate account or container when executing untrusted code.
Runtime log retention
game_get_logs and game_get_errors accept optional cursor and limit
arguments. The default page size is 200 lines, with a maximum of 500. Responses
include nextCursor, hasMore and dropped. Pass nextCursor back to continue
from the same position. Calls without a cursor continue from the previous call.
Each stream retains the newest 2,000 lines, with at most 4,096 characters per line.
If a cursor predates retained output, dropped is true. get_debug_output returns
the retained streams and their starting offsets.
Contributor validation
Development and CI require Node.js 22.12 or later. The server runtime requirement
remains the version specified in package.json.
CI runs on Node.js 22 and 24 without publishing packages or deploying services.
npm test builds the server first so executable-entry tests use current code.
Tests include real MCP requests over the SDK's in-memory transport, filesystem
boundary checks, symbolic link escapes, project scaffolding, schema validation
and cursor pagination. Running an actual Godot project remains an integration
check that requires an installed engine. Set GODOT_SMOKE_PATH to the full path
of its console executable to enable the temporary-project headless smoke test.
It creates a project, creates and edits a scene, reads it through MCP, and saves
a second scene. The test removes its temporary files afterward.
Architecture
The server uses two communication channels:
-
Headless CLI - For operations that don't need a running game (scene reading, modification, resource creation). Runs Godot with
--headless --script godot_operations.gd <operation> <json_params>. -
TCP Socket - For runtime interaction with a running game. The
mcp_interaction_server.gdautoload listens on port 9090 and processes JSON commands sent by the TypeScript MCP server.
Source layout
Testing
The project uses Vitest with 446 tests across 5 files:
Example Prompts
License
This project is licensed under the MIT License - see the LICENSE file for details.
Credits
- Original project: godot-mcp by Solomon Elias (Coding-Solo) - provided the foundational MCP server architecture, headless operations system, and TCP interaction framework
- Extended by: Tugcan Topaloglu - extended to 157 tools covering networking, 3D/2D rendering, UI controls, audio effects, animation trees, file I/O, runtime code execution, node manipulation, signals, project creation, camera control, physics, and comprehensive type conversion
來源:README.md,提交 88f0fbc
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分