Godot Mcp

io.github.tomyud1由 GitHub 账号 tomyud1 发布v0.6.1更新于 Oct 24, 2026

MCP server for Godot game engine integration — control the Godot editor with AI

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

将 AI 助手连接到正在运行的 Godot 4.4+ 编辑器,可直接读取和修改场景、脚本、节点与项目设置。

可以做什么
  • 浏览项目目录、读取文件、搜索项目并创建脚本
  • 创建场景,添加、删除、移动节点并设置属性,挂载脚本,指定碰撞形状与纹理
  • 应用代码修改、校验脚本语法,并在重命名或移动文件时更新引用
  • 读取项目设置、输入映射、碰撞层、控制台错误与场景树快照
  • 从 SVG 生成 2D 精灵图,并打开基于浏览器的交互式项目图谱
适用场景
适合在开发或调试 Godot 游戏项目时,让助手直接在编辑器内操作,而不必复制粘贴代码和场景数据。更适用于编写脚本、搭建场景和检查项目,而非在无指导下生成完整游戏。
运行要求
以本地 Node.js 进程通过 npx 启动,需先安装 Node.js。需要 Godot 4.4+,并将 Godot MCP 插件复制到项目的 addons 目录并启用,然后重启项目。服务器通过 6505 端口的 WebSocket 与编辑器通信,并在 localhost:6510 提供可视化界面。
安装前请注意
助手会直接写入磁盘上的项目文件,Godot 自带的 Ctrl+Z 无法撤销这些改动,需改用 mcp_undo 工具。仅限本地运行,且同一时间只对应一个编辑器实例;助手对 Godot 的了解有限,使用前应检查其修改。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Godot Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Godot MCP Server

Give your AI assistant full access to the Godot editor.

Build games faster with Claude, Cursor, or any MCP-compatible AI — no copy-pasting, no context switching. The AI reads, writes, and manipulates your scenes, scripts, nodes, and project settings directly inside the running Godot editor.

Godot 4.4+ · 69 tools · Undo/redo · Interactive project visualizer · MIT license


Quick Start

0. Install Node.js (one-time setup)

Download and run the installer from nodejs.org (LTS version). It's a standard installer — no terminal needed.

1. Install the Godot plugin

No cloning or building required — runs directly via npx.

Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "godot": {      "command": "npx",      "args": ["-y", "godot-mcp-server"]    }  }}

Cursor — add to MCP settings (Settings → MCP → Add Server):

json
{  "mcpServers": {    "godot": {      "command": "npx",      "args": ["-y", "godot-mcp-server"]    }  }}

Works with any MCP-compatible client (Claude Code, Cline, Windsurf, etc.)

2. Install the Godot plugin

Copy the addons/godot_mcp/ folder from the GitHub repo into your Godot project's addons/ directory. Then enable it: Project → Project Settings → Plugins → Godot MCP → Enable.

Or install it from inside the Godot editor: the Asset Store tab (Godot 4.7+, search "Godlink MCP") or the AssetLib tab (Godot 4.6 and older, search "mcp") → Install.

3. Connect

Restart your Godot project. Check the top-right corner of the editor — you should see MCP: Agent Active in green. You're ready to go.


What Can It Do?

32 Tools Across 6 Categories

CategoryToolsExamples
File Operations4Browse directories, read files, search project, create scripts
Scene Operations11Create scenes, add/remove/move nodes, set properties, attach scripts, assign collision shapes and textures
Script Operations6Apply code edits, validate syntax, rename/move files with reference updates
Project Tools9Read project settings, input map, collision layers, console errors, scene tree dumps
Asset Generation1Generate 2D sprites from SVG
Visualization1Interactive browser-based project map

Interactive Visualizer

Run map_project and get a browser-based project explorer at localhost:6510:

  • Force-directed graph of all scripts and their relationships
  • Click any script to see variables, functions, signals, and connections
  • Edit code directly in the visualizer — changes sync to Godot in real time
  • Scene view with node property editing
  • Find usages before refactoring

[Godot MCP Visualizer]


How It Works

┌─────────────┐    MCP (stdio)    ┌─────────────┐   WebSocket    ┌──────────────┐│  AI Client   │◄────────────────►│  MCP Server  │◄─────────────►│ Godot Editor ││  (Claude,    │                  │  (Node.js)   │   port 6505   │  (Plugin)    ││   Cursor)    │                  │              │               │              │└─────────────┘                  │  Visualizer  │               │  32 tool     │                                 │  HTTP :6510  │               │  handlers    │                                 └──────┬───────┘               └──────────────┘                                        │                                 ┌──────▼───────┐                                 │   Browser     │                                 │  Visualizer   │                                 └──────────────┘

The MCP server connects to the Godot editor via WebSocket through the Godot plugin. The AI never guesses at your project structure — it reads live state directly from the running editor.


Current Limitations

  • Local only — runs on localhost, no remote connections
  • One Godot editor at a time — multiple AI clients can connect concurrently, but they all share a single Godot instance
  • Ctrl+Z does not reach AI changes — the plugin writes to disk rather than the editor's live tree, so Godot's native undo has nothing to revert. Use the mcp_undo tool instead (ask the agent to undo).
  • AI has limited Godot knowledge — it can help debug, write scripts, and build scenes, but can't create a complete game without guidance

Build From Source

bash
git clone https://github.com/tomyud1/godot-mcpcd godot-mcp/mcp-servernpm installnpm run build

Then point your AI client at mcp-server/dist/index.js instead of using npx.


License

MIT


GitHub · Report Issues

来源:mcp-server/README.md,提交 2c1f300

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.6.1最新Oct 17, 2026
  2. v0.6.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分