# Godot MCP助手
## 基本信息
- Slug: `coding-solo-godot-mcp`
- Source: modelscope
- Publisher: @Coding-Solo/godot-mcp
- Categories: developer-tools / os-automation
- Hosted: No
- License: MIT License
- Source URL: https://www.modelscope.cn/mcp/servers/@Coding-Solo/godot-mcp
## 简介
一种模型上下文协议服务器， enables 人工智能助手与Godot游戏引擎进行交互，使它们能够启动编辑器、运行项目、捕获调试输出以及控制项目执行。
## 安装提示

```bash
一个用于与 Godot 游戏引擎交互的模型上下文协议 (MCP) 服务器。 ## 简介 Godot MCP 使 AI 助手能够启动 Godot 编辑器、运行项目、捕获调试输出并控制项目执行——所有这些都通过一个标准化的接口完成。 这种直接的反馈循环有助于像 Claude 这样的 AI 助手理解在真实的 Godot 项目中什么有效，什么无效，从而提高代码生成和调试辅助的质量。 ## 特性 - **启动 Godot 编辑器**：打开特定项目的 Godot 编辑器 - **运行 Godot 项目**：以调试模式执行 Godot 项目 - **捕获调试输出**：获取控制台输出和错误信息 - **控制执行**：以编程方式启动和停止 Godot 项目 - **获取 Godot 版本**：检索已安装的 Godot 版本 - **列出 Godot 项目**：在指定目录中查找 Godot 项目 - **项目分析**：获取有关项目结构的详细信息 - **场景管理**： - 使用指定的根节点类型创建新场景 - 向现有场景添加具有自定义属性的节点 - 将精灵和纹理加载到 Sprite2D 节点中 - 将 3D 场景导出为 MeshLibrary 资源以供 GridMap 使用 - 保存场景，并提供创建变体的选项 - **UID 管理**（适用于 Godot 4.4+）： - 获取特定文件的 UID - 通过重新保存资源更新 UID 引用 ## 要求 - 在您的系统上安装 [Godot 引擎](https://godotengine.org/download) - Node.js 和 npm - 支持 MCP 的 AI 助手（例如 Cline、Cursor 等） ## 安装和配置 ### 第一步：安装和构建 首先，克隆仓库并构建 MCP 服务器：
```

## MCP Server 详情

# Godot MCP

[![](https://badge.mcpx.dev?type=server 'MCP 服务器')](https://modelcontextprotocol.io/introduction)
[![使用 Godot 制作](https://img.shields.io/badge/使用-Godot-478CBF?style=flat&logo=godot%20engine&logoColor=white)](https://godotengine.org)
[![](https://img.shields.io/badge/Node.js-339933?style=flat&logo=nodedotjs&logoColor=white 'Node.js')](https://nodejs.org/en/download/)
[![](https://img.shields.io/badge/TypeScript-3178C6?style=flat&logo=typescript&logoColor=white 'TypeScript')](https://www.typescriptlang.org/)

[![](https://img.shields.io/github/last-commit/Coding-Solo/godot-mcp '最近提交')](https://github.com/Coding-Solo/godot-mcp/commits/main)
[![](https://img.shields.io/github/stars/Coding-Solo/godot-mcp '星标')](https://github.com/Coding-Solo/godot-mcp/stargazers)
[![](https://img.shields.io/github/forks/Coding-Solo/godot-mcp '分叉')](https://github.com/Coding-Solo/godot-mcp/network/members)
[![](https://img.shields.io/badge/License-MIT-red.svg 'MIT 许可证')](https://opensource.org/licenses/MIT)

```text
                           (((((((             (((((((                          
                        (((((((((((           (((((((((((                      
                        (((((((((((((       (((((((((((((                       
                        (((((((((((((((((((((((((((((((((                       
                        (((((((((((((((((((((((((((((((((                       
         (((((      (((((((((((((((((((((((((((((((((((((((((      (((((        
       (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((      
     ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((    
    ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((    
      (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((     
        (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((       
         (((((((((((@@@@@@@(((((((((((((((((((((((((((@@@@@@@(((((((((((        
         (((((((((@@@@,,,,,@@@(((((((((((((((((((((@@@,,,,,@@@@(((((((((        
         ((((((((@@@,,,,,,,,,@@(((((((@@@@@(((((((@@,,,,,,,,,@@@((((((((        
         ((((((((@@@,,,,,,,,,@@(((((((@@@@@(((((((@@,,,,,,,,,@@@((((((((        
         (((((((((@@@,,,,,,,@@((((((((@@@@@((((((((@@,,,,,,,@@@(((((((((        
         ((((((((((((@@@@@@(((((((((((@@@@@(((((((((((@@@@@@((((((((((((        
         (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((        
         (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((        
         @@@@@@@@@@@@@((((((((((((@@@@@@@@@@@@@((((((((((((@@@@@@@@@@@@@        
         ((((((((( @@@(((((((((((@@(((((((((((@@(((((((((((@@@ (((((((((        
         (((((((((( @@((((((((((@@@(((((((((((@@@((((((((((@@ ((((((((((        
          (((((((((((@@@@@@@@@@@@@@(((((((((((@@@@@@@@@@@@@@(((((((((((         
           (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((          
              (((((((((((((((((((((((((((((((((((((((((((((((((((((             
                 (((((((((((((((((((((((((((((((((((((((((((((((                
                        (((((((((((((((((((((((((((((((((                       
                                                                                

                          /$$      /$$  /$$$$$$  /$$$$$$$ 
                         | $$$    /$$$ /$$__  $$| $$__  $$
                         | $$$$  /$$$$| $$  \__/| $$  \ $$
                         | $$ $$/$$ $$| $$      | $$$$$$$/
                         | $$  $$$| $$| $$      | $$____/ 
                         | $$\  $ | $$| $$    $$| $$      
                         | $$ \/  | $$|  $$$$$$/| $$      
                         |__/     |__/ \______/ |__/       
```


一个用于与 Godot 游戏引擎交互的模型上下文协议 (MCP) 服务器。

## 简介

Godot MCP 使 AI 助手能够启动 Godot 编辑器、运行项目、捕获调试输出并控制项目执行——所有这些都通过一个标准化的接口完成。

这种直接的反馈循环有助于像 Claude 这样的 AI 助手理解在真实的 Godot 项目中什么有效，什么无效，从而提高代码生成和调试辅助的质量。

## 特性

- **启动 Godot 编辑器**：打开特定项目的 Godot 编辑器
- **运行 Godot 项目**：以调试模式执行 Godot 项目
- **捕获调试输出**：获取控制台输出和错误信息
- **控制执行**：以编程方式启动和停止 Godot 项目
- **获取 Godot 版本**：检索已安装的 Godot 版本
- **列出 Godot 项目**：在指定目录中查找 Godot 项目
- **项目分析**：获取有关项目结构的详细信息
- **场景管理**：
  - 使用指定的根节点类型创建新场景
  - 向现有场景添加具有自定义属性的节点
  - 将精灵和纹理加载到 Sprite2D 节点中
  - 将 3D 场景导出为 MeshLibrary 资源以供 GridMap 使用
  - 保存场景，并提供创建变体的选项
- **UID 管理**（适用于 Godot 4.4+）：
  - 获取特定文件的 UID
  - 通过重新保存资源更新 UID 引用

## 要求

- 在您的系统上安装 [Godot 引擎](https://godotengine.org/download)
- Node.js 和 npm
- 支持 MCP 的 AI 助手（例如 Cline、Cursor 等）

## 安装和配置

### 第一步：安装和构建

首先，克隆仓库并构建 MCP 服务器：

```bash
git clone https://github.com/Coding-Solo/godot-mcp.git
cd godot-mcp
npm install
npm run build
```


### 第二步：与您的 AI 助手进行配置

#### 选项 A：使用 Cline 配置

将以下内容添加到您的 Cline MCP 设置文件中（`~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`）：

```json
{
  "mcpServers": {
    "godot": {
      "command": "node",
      "args": ["/absolute/path/to/godot-mcp/build/index.js"],
      "env": {
        "DEBUG": "true"                  // Optional: Enable detailed logging
      },
      "disabled": false,
      "autoApprove": [
        "launch_editor",
        "run_project",
        "get_debug_output",
        "stop_project",
        "get_godot_version",
        "list_projects",
        "get_project_info",
        "create_scene",
        "add_node",
        "load_sprite",
        "export_mesh_library",
        "save_scene",
        "get_uid",
        "update_project_uids"
      ]
    }
  }
}
```


#### 选项 B：使用 Cursor 配置

**使用 Cursor UI：**


1. 转到 **Cursor 设置** > **功能** > **MCP**
2. 点击 **+ 添加新的 MCP 服务器** 按钮
3. 填写表单：
   - 名称: `godot`（或任何你喜欢的名称）
   - 类型: `command`
   - 命令: `node /absolute/path/to/godot-mcp/build/index.js`
4. 点击“添加”
5. 您可能需要点击 MCP 服务器卡片右上角的刷新按钮以填充工具列表

**使用特定于项目的配置：**

在您的项目目录中创建一个名为 `.cursor/mcp.json` 的文件，内容如下：

```json
{
  "mcpServers": {
    "godot": {
      "command": "node",
      "args": ["/absolute/path/to/godot-mcp/build/index.js"],
      "env": {…

