YG

yanhuifair/godot-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

52 stars 6 forks 质量 89 趋势 9AGPL-3.0

是一个模型上下文协议服务器,可以直接连接任何AI助手。你的AI停止对你的项目进行猜测,开始操作它。

概览

是一个模型上下文协议服务器,可以直接连接任何AI助手。你的AI停止对你的项目进行猜测,开始操作它。 - 📂 — .tscn 场景、.tres 资源、GDScript、C#、.gdshader、project.godot。自定义解析器,无需 Godot 进程,即时响应。- 🎛️ — 选择节点、连接信号、创作可视化着色器、烘焙光照贴图、设置断点、步进调试器、运行和停止游戏。- ↩️ — 添加、删除、重命名、移动、复育、复制和实例化所有寄存器,均在 Godot 原生撤销栈中。如果 AI 错误,则将其放回原位。- 🎮 — 检查实时场景树,调用方法,注入输入,其他公共 Godot MCP 都不做这些操作。- 🔎 — search_tools 从 386 中找到合适的工具,get_status准确告诉你连接了什么,每个错误返回一个类型代码和一个修复提示。

概述(AI 翻译)

Godot 引擎最完整的 MCP 服务器——386 个工具,让你的 AI 助手真正参与你的游戏项目。

英文 |中文文档


Godot MCP 是一个模型上下文协议服务器,连接任何 AI 助手——Claude、Cursor、VS Code Copilot、Windsurf、Cline、Codex、Aider——直接连接到 Godot Engine 4.x。你的 AI 停止猜测你的项目,开始操作它。

  • 📂 原生读写你的项目文件 — .tscn 场景,.tres 资源,GDScript,C#,.gdshader,project.godot。自定义解析器,无需 Godot 进程,响应即时。
  • 🎛️ 驱动实时编辑器 — 选择节点、连接信号、编写视觉着色器、烘焙光照贴图、设置断点、步进调试器、运行和停止游戏。
  • ↩️ 每个场景编辑都是可撤销的 — 添加、删除、重命名、移动、重育、复制和实例化所有寄存器,都存在Godot的原生撤销堆栈。如果AI操作错误,Ctrl+Z会将其重新放回原位。
  • 🎮 进入运行中的游戏 — 检查实时场景树,调用方法,注入输入,冻结游戏,逐帧推进,并截图结果。 其他公开的 Godot MCP 都不做这件事。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。


Godot MCP is a Model Context Protocol server that connects any AI assistant — Claude, Cursor, VS Code Copilot, Windsurf, Cline, Codex, Aider — directly to Godot Engine 4.x. Your AI stops guessing about your project and starts operating it.

  • 📂 Reads and writes your project files natively — .tscn scenes, .tres resources, GDScript, C#, .gdshader, project.godot. Custom parsers, no Godot process required, instant response.
  • 🎛️ Drives the live editor — select nodes, connect signals, author visual shaders, bake lightmaps, set breakpoints, step the debugger, run and stop the game.
  • ↩️ Every scene edit is undoable — add, remove, rename, move, reparent, duplicate and instantiate all register on Godot’s native undo stack. If the AI gets it wrong, Ctrl+Z puts it back.
  • 🎮 Reaches inside the running game — inspect the live scene tree, call methods, inject input, freeze the game, step it one frame at a time, and screenshot the result. No other public Godot MCP does this.
  • 🔎 Stays usable at scale — search_tools finds the right tool out of 386, get_status tells you exactly what is connected, and every error returns a typed code plus a repair hint.

386 tools · 30 categories · 21 AI clients · 4 communication paths · one-command setup.

npx @yanhuifair/godot-mcp --enable-plugin -p .
Requirement
Godot 4.x (Godot 3 not supported)
Node.js >= 18
AI Client Any MCP-compatible client (see Configuration)

Why Godot MCP

Godot MCP Other Godot MCP servers
Tool count 386 across 30 categories 16 – 156
Works without Godot running ✅ Native .tscn / .tres / .godot parsers ⚠️ Usually needs a live editor
Live editor control ✅ 140 tools — play, debug, breakpoints, viewport, bake Partial
在 GitHub 查看完整 README

安装

npx -y @yanhuifair/godot-mcp -p .
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "godot-mcp": { "type": "stdio", "command": "npx", "args": ["-y", "@yanhuifair/godot-mcp", "-p", "."] } } }