Godot MCP
Godot MCP
让您的 AI 助手完全访问 Godot 编辑器。
使用 Claude、Cursor 或任何兼容 MCP 的 AI 更快地构建游戏——无需复制粘贴,无需切换上下文。AI 可直接读取、写入和操作您的场景、脚本、节点和项目设置。
Godot 4.x · 42 个工具 · 交互式项目可视化器 · MIT 许可证
快速开始
0. 安装 Node.js(一次性设置)
从 nodejs.org 下载并运行安装程序(LTS 版本)。这是一个标准安装程序——无需终端。
1. 安装 Godot 插件
在 Godot 编辑器内,点击顶部的 AssetLib 选项卡 → 搜索 "mcp" → 找到 "Godot AI Assistant tools MCP" → 安装。
然后进入 项目 → 项目设置 → 插件 并启用 Godot MCP 插件。
2. 将服务器配置添加到您的 AI 客户端
Claude Desktop — 设置 → 开发者 → 编辑配置 → 打开配置文件并粘贴:
Mac / Linux:
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["-y", "godot-mcp-server"]
}
}
}Windows:
{
"mcpServers": {
"godot": {
"command": "cmd",
"args": ["/c", "npx", "-y", "godot-mcp-server"]
}
}
}Cursor — 设置 → MCP → 添加服务器:
Mac / Linux:
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["-y", "godot-mcp-server"]
}
}
}Windows:
{
"mcpServers": {
"godot": {
"command": "cmd",
"args": ["/c", "npx", "-y", "godot-mcp-server"]
}
}
}Claude Code — 在终端中运行:
claude mcp add godot -- npx -y godot-mcp-server适用于任何兼容 MCP 的客户端(Cline、Windsurf 等)。
3. 重启您的 AI 客户端
关闭并重新打开 Claude Desktop / Cursor / 您的客户端,以便它加载新配置。
4. 重启您的 Godot 项目
点击 Godot 编辑器中的 重新启动项目。检查右上角——您应该会看到绿色的 MCP Connected。一切就绪,可以开始了。
Related MCP server: Godot MCP Bridge
它能做什么?
42 种工具,涵盖 6 个类别
类别 | 工具 | 示例 |
文件操作 | 4 | 浏览目录、读取文件、搜索项目、创建脚本 |
场景操作 | 11 | 创建场景、添加/移除/移动节点、设置属性、附加脚本、分配碰撞形状和纹理 |
脚本操作 | 6 | 应用代码编辑、验证语法、重命名/移动文件并更新引用 |
项目工具 | 14 | 运行/停止场景、查询 ClassDB、从 Output + Debugger 读取错误、项目设置、输入映射、碰撞层、场景树转储、重新扫描文件系统 |
资源生成 | 1 | 从 SVG 生成 2D 精灵 |
可视化 | 6 | 基于浏览器的交互式项目地图、场景图浏览器 |
交互式可视化器
运行 map_project,在 localhost:6510 获取一个基于浏览器的查看器:
所有脚本及其关系的力导向图
点击任意脚本查看变量、函数、信号和连接
在可视化器中直接编辑代码——更改会实时同步到 Godot
带有节点属性编辑功能的场景视图
在重构前查找引用
局限性
AI 无法独自完成 100% 的游戏开发——它在复杂 UI 布局、场景合成以及某些节点属性操作上仍有困难。它仍在积极开发中,非常欢迎反馈!
架构
┌─────────────┐ MCP (stdio) ┌──────────────┐ WebSocket ┌──────────────┐
│ AI Client │◄────────────────►│ MCP Server │◄─────────────►│ Godot Editor │
│ (Claude, │ │ (Node.js) │ port 6505 │ (Plugin) │
│ Cursor) │ │ │ │ │
└─────────────┘ │ Visualizer │ │ 42 tool │
│ HTTP :6510 │ │ handlers │
└──────┬───────┘ └──────────────┘
│
┌──────▼───────┐
│ Browser │
│ Visualizer │
└──────────────┘当前限制
仅限本地 — 在 localhost 上运行,不支持远程连接
单连接 — 一次只能运行一个 Godot 实例
无撤销 — 更改直接保存(请使用版本控制)
AI 对 Godot 的了解仍然有限 — 它无法独自完成 100% 的游戏开发,但它可以帮助调试、编写脚本,并陪伴您一路前行
开发
要从源码构建而不是使用 npm:
cd mcp-server
npm install
npm run build然后将您的 AI 客户端指向 mcp-server/dist/index.js,而不是使用 npx。
发布说明
每个版本的详细说明位于 release-notes/ 中(从 v0.5.0 开始)。查看完整的变更历史,请参阅 CHANGELOG.md。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceProvides a comprehensive integration between LLMs and the Godot Engine, enabling AI assistants to intelligently manipulate project files, scripts, and the live editor. It supports advanced workflows including version-aware documentation querying, automated E2E game testing, and real-time visual context capture.3226MIT
- FlicenseCqualityFmaintenanceEnables AI assistants to control Godot game engine projects through a WebSocket bridge. Supports scene editing, node manipulation, script management, and project introspection via 163 registered tools.1001
- AlicenseCqualityDmaintenanceEnables AI assistants to interact with and manipulate Godot game engine projects, including creating projects, launching editor, managing scenes and nodes.122341MIT
- AlicenseAqualityBmaintenanceEnables AI agents to launch, edit, debug, and test Godot game projects with comprehensive scene and script manipulation tools.501MIT
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tomyud1/godot-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server