將 AI 連接到 Godot 4
5 分鐘內設定好 MCP Pro,讓 Claude 或 Cursor 直接控制你的 Godot 編輯器。安裝外掛、建構伺服器、設定 AI 客戶端——即刻開始。
get_project_info get_scene_treeGodot MCP Pro 是一個擁有 175 個工具的 MCP 伺服器,透過 WebSocket 將 Claude、Cursor 等 AI 助手直接連接到 Godot 4 編輯器。AI 可以建立場景、撰寫 GDScript、模擬玩家輸入、檢查執行中的遊戲、建構 3D 環境、設定物理、管理粒子與音訊——全部在一次對話中完成。$15 一次性購買,支援 Windows、macOS 與 Linux。
$15 一次性購買 · 終身更新AI Assistant <--stdio/MCP--> Node.js Server <--WebSocket--> Godot Editor
即時雙向通訊。無檔案輪詢。無 CLI 子程序。即時回饋。
AI 驅動的 Godot 4 實用指南。沒有過時的 Godot 3 資訊——所有內容均在 Godot 4.4+ 上測試通過。
5 分鐘內設定好 MCP Pro,讓 Claude 或 Cursor 直接控制你的 Godot 編輯器。安裝外掛、建構伺服器、設定 AI 客戶端——即刻開始。
get_project_info get_scene_tree讓 AI 建立一個完整的 2D 遊戲——場景、腳本、訊號、UI。本指南示範在一次 AI 對話中建構一個黑白棋遊戲,從空專案到可玩遊戲。
create_scene add_node create_script connect_signal play_scene建構帶 Mixamo 動畫、AnimationTree 狀態機、SpringArm3D 攝影機與地形的第三人稱角色控制器——全部由 AI 建立。涵蓋 Godot 4 中的 CharacterBody3D、物理層與動畫混合。
add_mesh_instance setup_lighting create_animation_tree setup_physics_body setup_camera_3dGodot 4 徹底改造了訊號系統。不再使用 connect("signal", obj, "method")——改用 signal.connect(callable)。讓 AI 審查你的訊號架構、找出未連接的訊號,並將整個專案的訊號流視覺化。
analyze_signal_flow find_signal_connections get_signals connect_signal讓 AI 測試你的遊戲。啟動遊戲、模擬鍵盤/滑鼠輸入、擷取螢幕截圖、驗證遊戲狀態,並執行隨機輸入的壓力測試。無需測試框架——MCP Pro 在編輯器層面完成一切。
play_scene simulate_key capture_frames assert_node_state run_stress_testGodot 4 的 AnimationTree 功能強大但複雜。讓 AI 建立帶轉場與條件的狀態機、設定混合樹、設定參數——Godot 初學者最常遇到的難題,幾分鐘內解決。
create_animation_tree add_state_machine_state add_state_machine_transition set_tree_parameterGodot 4 將 PhysicsBody 重新命名為 CharacterBody/RigidBody,並變更了碰撞層 API。讓 AI 設定碰撞形狀、正確設定物理層、新增射線偵測,並審查碰撞設定——避免最常見的物理 Bug。
setup_collision set_physics_layers setup_physics_body get_collision_infoGodot 4 將預設粒子從 CPUParticles 替換為 GPUParticles2D/3D。使用內建預設建立火焰、煙霧、雨、雪與火花,或精細調整發射形狀、速度曲線與顏色漸層——全部透過自然語言提示完成。
create_particles apply_particle_preset set_particle_color_gradient set_particle_material5 分鐘內將 AI 助手連接到 Godot。
將 addons/godot_mcp/ 複製到你的 Godot 專案中。在 Project > Project Settings > Plugins 中啟用它。外掛會在編輯器內自動啟動 WebSocket 伺服器。
在 server/ 目錄下執行 npm install && npm run build。這會編譯 TypeScript MCP 伺服器,作為 AI 客戶端與 Godot 外掛之間的橋樑。
將伺服器加入 AI 客戶端的 MCP 設定中。開啟 Godot,你的 AI 助手現在可以即時存取 175 個工具——建立場景、編輯腳本、模擬輸入,以及分析執行中的遊戲。
AI 在 2D 與 3D 中建構、檢查、測試與修改 Godot 專案所需的一切。
get_project_info metadata & autoloadsget_filesystem_tree recursive file treesearch_files fuzzy/glob searchget/set_project_settings read & writeuid_to_project_path UID conversionproject_path_to_uid path conversionget_scene_tree live hierarchyget_scene_file_content raw .tscncreate_scene new scenesopen_scene delete_scene save_sceneadd_scene_instance prefab-like instancingplay_scene stop_sceneadd_node delete_node rename_nodeduplicate_node deep copymove_node reparentupdate_property smart type parsingget_node_properties inspect all propsadd_resource shapes, materialsset_anchor_preset UI anchorsconnect_signal disconnect_signallist_scripts project-wide overviewread_script create_scriptedit_script search/replace & insertattach_script attach to nodesget_open_scripts editor awarenessget_editor_errors errors & stack tracesget_editor_screenshot editor viewportget_game_screenshot running gamecompare_screenshots visual diff NEWexecute_editor_script run GDScriptget_signals inspect signal connectionsreload_plugin reload_projectclear_outputsimulate_key keyboard with modifierssimulate_mouse_click positioned clickssimulate_mouse_move absolute/relativesimulate_action Godot InputActionssimulate_sequence multi-event combosget_game_scene_tree live game hierarchyget/set_game_node_properties runtime inspection & tweakingexecute_game_script run code in live gamecapture_frames multi-frame screenshotsmonitor_properties property timelinestart/stop/replay_recording input recording & replay NEWfind_nodes_by_script get_autoloadfind_ui_elements click_button_by_text NEWwait_for_node batch_get_properties NEWlist_animations create_animationadd_animation_track value/position/bezierset_animation_keyframe insert keysget_animation_info tracks & keyframesremove_animationcreate_animation_tree with state machine rootget_animation_tree_structure full tree inspectionadd/remove_state_machine_state manage statesadd/remove_state_machine_transition with conditionsset_blend_tree_node Add2, Blend2, TimeScaleset_tree_parameter conditions & blendstilemap_set_cell place tilestilemap_fill_rect fill regionstilemap_get_cell read tile datatilemap_clear clear alltilemap_get_info tile set sourcestilemap_get_used_cells query used cellsadd_mesh_instance primitives & .glb/.gltf importsetup_lighting sun/indoor/dramatic presetsset_material_3d full PBR material setupsetup_environment sky, fog, glow, SSAO, SSRsetup_camera_3d projection, FOV, cull maskadd_gridmap GridMap with MeshLibrarysetup_collision auto-detect 2D/3D shapesset/get_physics_layers layer & mask managementadd_raycast RayCast2D/3Dsetup_physics_body CharacterBody & RigidBody configget_collision_info full collision auditcreate_particles GPUParticles 2D/3Dset_particle_material direction, velocity, emission shapeset_particle_color_gradient color ramp stopsapply_particle_preset fire, smoke, rain, snow, sparksget_particle_info full config inspectionsetup_navigation_region auto-detect 2D/3Dbake_navigation_mesh mesh baking & polygon gensetup_navigation_agent pathfinding & avoidanceset_navigation_layers layer managementget_navigation_info full nav auditget_audio_bus_layout full bus overviewadd_audio_bus set_audio_bus create & configureadd_audio_bus_effect reverb, delay, compressor, EQadd_audio_player 2D/3D audio playersget_audio_info subtree audio auditcreate_theme new Theme resourceset_theme_color color overridesset_theme_constant constant overridesset_theme_font_size font sizesset_theme_stylebox StyleBoxFlatget_theme_info inspect overridescreate_shader with templatesread_shader edit_shaderassign_shader_material to nodesset_shader_param set uniformsget_shader_params read all paramsread_resource inspect .tres propertiesedit_resource modify & savecreate_resource new .tres of any typefind_nodes_by_type search by classfind_signal_connections audit signalsbatch_set_property bulk changesfind_node_references cross-file searchget_scene_dependencies dependency graphcross_scene_set_property project-wide changes NEWrun_test_scenario automated test sequencesassert_node_state property assertionsassert_screen_text UI text verificationrun_stress_test random input fuzzingget_test_report pass/fail summaryfind_unused_resources dead asset detectionanalyze_signal_flow signal graph mappinganalyze_scene_complexity node count & depthfind_script_references cross-project searchdetect_circular_dependencies cycle detectionget_project_statistics full project overviewget_performance_monitors FPS, memory, physicsget_editor_performance quick summarylist_export_presets configured presetsexport_project build commandsget_export_info paths & templates免費替代品所沒有的功能。
連接、斷開與檢查節點間的訊號。競品均不支援此功能。對 Godot 的事件驅動架構至關重要。
所有異動都透過 Godot 的 UndoRedo 系統進行。Ctrl+Z 可復原 AI 的一切操作。免費替代品直接修改場景,無法復原。
Vector2(100,200)、#ff0000、Color(1,0,0)——AI 送出字串,我們自動將其解析為正確的 Godot 型別。
WebSocket 連線,帶心跳偵測、自動重新連線(指數退避)與連接埠自動掃描。不會斷線,無需手動重新啟動。
錯誤訊息包含結構化代碼與可操作建議。AI 可以自行修正,而不是被晦澀的錯誤訊息卡住。
11 個節點工具:新增、刪除、重新命名、複製、移動/重新掛載、更新屬性、新增資源、設定錨點。競品均無法涵蓋所有這些。
讓 AI 玩你的遊戲。模擬鍵盤、滑鼠與 InputActions。錄製輸入工作階段並回放,用於精確到影格的迴歸測試。
15 個工具用於即時遊戲檢查。在執行階段讀取與修改屬性、擷取影格、監控屬性變化、尋找 UI 元素、按文字點擊按鈕,以及等待節點出現。
建立動畫、新增軌道、插入關鍵影格。建構帶轉場與條件的狀態機。設定包含 Add2、Blend2 與 TimeScale 節點的混合樹。
新增網格(基本體或 .glb/.gltf)、使用預設設定燈光、設定 PBR 材質、建立含天空/霧/SSAO/SSR 的環境、放置攝影機,以及建構 GridMap。
設定碰撞形狀、設定物理體、管理碰撞層、新增射線偵測。建立導航區域、烘焙導航網格、設定尋路代理。
使用預設(火焰、煙霧、雨、雪)建立 GPU 粒子系統。管理音訊匯流排、新增效果(殘響、延遲、壓縮器),放置 2D/3D 音訊播放器。
從範本建立著色器、編輯 GLSL 程式碼、指派 ShaderMaterial,並在執行階段調整 uniform 變數。無需離開 AI 聊天即可完成完整的著色器工作流程。
執行帶輸入模擬與斷言的自動化測試情境。驗證螢幕上的 UI 文字。使用隨機輸入進行壓力測試。產生通過/失敗測試報告。
尋找未使用的資源、對應訊號流、分析場景複雜度、偵測循環相依、搜尋腳本參照,以及取得完整的專案統計資訊。
按類型尋找節點、審查訊號連接、跨場景批次設定屬性、搜尋所有專案檔案,以及分析相依性。大規模重構。
真實範例——你可以讓 AI 助手執行這些操作,而且它能直接完成。
AI 建立場景、撰寫腳本、連接訊號、設定 UI 並執行遊戲——全部在一次對話中完成。觀看示範影片。
AI 新增網格、設定燈光預設、設定 PBR 材質並調整環境參數——全部透過編輯器 API 完成,支援完整的復原/重做。
AI 啟動遊戲、模擬鍵盤輸入、擷取螢幕截圖、檢查執行階段節點屬性並驗證遊戲狀態——實現自動化 QA 工作流程。
AI 讀取編輯器的錯誤輸出與腳本編譯錯誤,定位問題,編輯腳本進行修復並驗證——緊密的回饋循環,無需複製貼上錯誤訊息。
AI 建立 GPU 粒子、設定發射形狀與速度、套用顏色漸層,或使用內建預設(火焰、煙霧、雨、雪、火花)即時呈現效果。
AI 搜尋所有場景、找出相符的節點並批次修改屬性——手動點擊需要幾分鐘的任務,幾秒鐘就完成了。
Godot MCP Pro 與替代方案的比較。
| 功能 | Godot MCP Pro | GDAI MCP ($19) | godot-mcp (free) |
|---|---|---|---|
| 工具總數 | 175 | ~30 | 13 |
| 分類 | 23 | ~8 | 4 |
| 連線方式 | WebSocket + heartbeat | stdio (Python) | Headless CLI |
| Undo/Redo | Yes | Yes | No |
| 訊號管理 | Yes | No | No |
| 節點重新命名/複製/移動 | Yes | No | No |
| 智慧型別解析 | Yes | Limited | No |
| 輸入模擬 | Key / Mouse / Action / Sequence | Yes (basic) | No |
| 執行階段分析 | 15 個工具(場景樹、屬性、影格、UI、錄製) | No | No |
| 3D 場景工具 | Mesh, Lighting, PBR, Environment, Camera | No | No |
| 物理設定 | Collision, Layers, Raycasts, Bodies | No | No |
| 粒子 | GPU 2D/3D with presets | No | No |
| 導航 | Region, Mesh baking, Agent | No | No |
| 音訊 | Buses, Effects, Players | No | No |
| AnimationTree | State machine, Blend tree | No | No |
| 自動化測試 | 情境測試、斷言、壓力測試 | No | No |
| 程式碼分析 | 未使用資源、訊號流、複雜度 | No | No |
| 螢幕截圖 | 編輯器 + 遊戲 + 視覺差異比對 | Yes | No |
關於 Godot MCP Pro 的常見問題。
Godot MCP Pro 是一個進階 MCP(Model Context Protocol)伺服器,透過 WebSocket 將 Claude、Cursor 與 Cline 等 AI 助手直接連接到 Godot 4 編輯器。它提供 23 個分類共 175 個工具,用於場景操作、動畫、3D 建模、物理設定、粒子效果、音訊管理、著色器編輯、輸入模擬、執行階段分析與自動化測試。
在專案中安裝 Godot MCP Pro 外掛,在 Project Settings > Plugins 中啟用,使用 npm install && npm run build 建構 MCP 伺服器,然後加入 .mcp.json 中。Claude(Code 或 Desktop)將自動透過 WebSocket 連接到 Godot 編輯器並取得所有 175 個工具的存取權限。
任何相容 MCP 的 AI 客戶端都可以使用,包括 Claude Code、Claude Desktop、Cursor、VS Code 搭配 Cline 擴充功能、Windsurf,以及其他支援 Model Context Protocol 標準的工具。MCP 協定是開放標準,新客戶端持續增加中。
可以。Godot MCP Pro 包含專用的 3D 工具,可以新增基本體網格或匯入 .glb/.gltf 模型、使用預設設定燈光、設定 PBR 材質、建立含天空/霧/SSAO/SSR 的環境、放置攝影機,以及建構 GridMap。結合物理、導航與粒子工具,AI 可以建構完整的 3D 遊戲場景。
可以。執行階段分析套件包含 15 個工具,讓 AI 可以啟動遊戲、模擬鍵盤/滑鼠/動作輸入、擷取螢幕截圖、檢查即時場景樹、讀取與修改執行階段屬性、錄製與回放輸入工作階段、尋找 UI 元素、按文字點擊按鈕,以及執行帶斷言的自動化測試情境。
支援。Godot MCP Pro 可與 Cursor、VS Code + Cline、Windsurf、Claude Code CLI、Claude Desktop 以及任何其他相容 MCP 的客戶端搭配使用。在編輯器設定中設定 MCP 伺服器即可透過 WebSocket 連線。
Godot 4.4 或更新版本(已在 Godot 4.6 上測試)以及 Node.js 18+。支援 Windows、macOS 與 Linux。
Godot MCP Pro 提供 175 個工具,而免費替代品僅有 13-32 個。獨有功能包括:完整的復原/重做、訊號管理、帶錄製/回放的輸入模擬、15 個工具的執行階段分析套件、3D 場景建構、物理設定、粒子系統、音訊匯流排管理、導航網格工具、AnimationTree 狀態機、自動化測試與程式碼分析。
是的。GDScript 編輯器外掛(addons/godot_mcp/)完全開放原始碼,可在 GitHub 上查看。你可以在購買前查看外掛如何與編輯器通訊。MCP 伺服器(TypeScript)包含在付費下載中。
不需要。Godot MCP Pro 是 $15 一次性購買,包含終身更新、不限專案數、不限機器數,以及 Discord 支援。沒有經常性費用,沒有席次限制。
5 分鐘內完成設定。
將下載包中的 addons/godot_mcp/ 資料夾複製到 Godot 專案的根目錄。然後啟用外掛:
Project > Project Settings > Plugins > Godot MCP Pro > Enable
在 server/ 目錄下開啟終端機:
cd server npm install npm run build
將伺服器加入 AI 客戶端的 MCP 設定檔中(例如 Claude Code 的 .mcp.json):
{
"mcpServers": {
"godot-mcp-pro": {
"command": "node",
"args": ["/path/to/server/build/index.js"]
}
}
}
開啟已啟用外掛的 Godot 專案。編輯器面板中的狀態面板會顯示連線狀態。啟動 AI 助手並開始建構——它現在可以直接存取 Godot 編輯器中的 175 個工具。
一次付費,永久使用。包含終身更新。