将 AI 连接到 Godot 4
5 分钟内设置好 MCP Pro,让 Claude 或 Cursor 直接控制你的 Godot 编辑器。安装插件、构建服务器、配置 AI 客户端——即刻开始。
get_project_info get_scene_treeGodot MCP Pro 是一个拥有 163 个工具的 MCP 服务器,通过 WebSocket 将 Claude、Cursor 等 AI 助手直接连接到 Godot 4 编辑器。AI 可以创建场景、编写 GDScript、模拟玩家输入、检查运行中的游戏、构建 3D 环境、设置物理、管理粒子和音频——全部在一次对话中完成。$5 一次性购买,支持 Windows、macOS 和 Linux。
$5 一次性购买 · 终身更新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 助手现在可以实时访问 163 个工具——创建场景、编辑脚本、模拟输入,以及分析运行中的游戏。
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) |
|---|---|---|---|
| 工具总数 | 163 | ~30 | 13 |
| 分类 | 23 | ~8 | 4 |
| 连接方式 | WebSocket + heartbeat | WebSocket | Headless CLI |
| Undo/Redo | Yes | Yes | No |
| 信号管理 | Yes | No | No |
| 节点重命名/复制/移动 | Yes | No | No |
| 智能类型解析 | Yes | Limited | No |
| 输入模拟 | Key / Mouse / Action / Sequence | No | 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 个分类共 163 个工具,用于场景管理、动画、3D 建模、物理设置、粒子效果、音频管理、着色器编辑、输入模拟、运行时分析和自动化测试。
在项目中安装 Godot MCP Pro 插件,在 Project Settings > Plugins 中启用,使用 npm install && npm run build 构建 MCP 服务器,然后添加到 .mcp.json 中。Claude(Code 或 Desktop)将自动通过 WebSocket 连接到 Godot 编辑器并获得所有 163 个工具的访问权限。
任何兼容 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 提供 163 个工具,而免费替代品仅有 13-32 个。独有功能包括:完整的撤销/重做、信号管理、带录制/回放的输入模拟、15 个工具的运行时分析套件、3D 场景构建、物理设置、粒子系统、音频总线管理、导航网格工具、AnimationTree 状态机、自动化测试和代码分析。
是的。GDScript 编辑器插件(addons/godot_mcp/)完全开源,可在 GitHub 上查看。你可以在购买前查看插件如何与编辑器通信。MCP 服务器(TypeScript)包含在付费下载中。
不需要。Godot MCP Pro 是 $5 一次性购买,包含 v1.x 终身更新、不限项目数、不限设备数,以及 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 编辑器中的 163 个工具。
一次付费,永久使用。包含 v1.x 终身更新。