Godot开发协议服务器

为Godot引擎开发提供测试、错误检查、资源导入和场景运行等工具支持的MCP服务器。

  • by struktured-labs
  • Python
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 struktured-labs/godot-mcp

使用说明

Godot MCP服务器

一个MCP(模型上下文协议)服务器,为Godot引擎开发提供工具。

特性

  • godot_run_tests -运行GUT(Godot单元测试)测试并获得结构化结果
  • godot_check_errors -在不运行游戏的情况下检查解析/语法错误
  • godot_import -进口/再进口资产
  • godot_run_scene -运行特定场景
  • godot_出口 -将项目导出到平台

安装

cd mcp/godot-mcp
uv pip install -e .

或者使用pip:

pip install -e mcp/godot-mcp

配置

添加到您的Claude Code MCP配置中(~/.claude/mcp.json):

{
  "mcpServers": {
    "godot": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp/godot-mcp", "godot-mcp"],
      "env": {
        "QT_QPA_PLATFORM": "xcb",
        "__GLX_VENDOR_LIBRARY_NAME": "mesa"
      }
    }
  }
}

或者,如果全局安装:

{
  "mcpServers": {
    "godot": {
      "command": "godot-mcp"
    }
  }
}

用法

配置后,Claude Code可以使用这些工具:

运行测试

Use godot_run_tests to run the unit tests

检查错误

Use godot_check_errors to check for parse errors

运行一个场景

Use godot_run_scene to run the game

需求

  • Python 3.10+
  • Godot 4.x已安装并位于PATH中
  • 用于测试功能的GUT(Godot单元测试)插件

许可证

麻省理工学院