Godot MCP 服务器

Godot MCP 服务器

为 Godot 游戏引擎提供接口的 MCP 服务器,支持启动编辑器、运行项目和捕获调试输出。

快速入门

安装与配置

  1. 克隆仓库并安装依赖:

    • git clone https://github.com/Coding-Solo/godot-mcp.git
    • cd godot-mcp
    • npm install
    • npm run build
  2. 配置 AI 助手(如 Cline 或 Cursor)。

    • Cline:修改 cline_mcp_settings.json 文件,添加 Godot MCP 配置。
    • Cursor:通过 UI 添加 MCP 服务器或在项目中创建 .cursor/mcp.json 文件。
  3. 设置环境变量(可选):

    • GODOT_PATH:指定 Godot 可执行文件路径。
    • DEBUG:启用详细日志记录。

示例命令

  • 启动 Godot 编辑器:Launch the Godot editor for my project
  • 运行项目:Run my Godot project and show me any errors
  • 创建场景:Create a new scene with a Player node in my Godot project

更多功能请参考 README 文档。