godot-ai-mcp
Provides AI assistants with tools to launch the Godot editor, run projects, manipulate scenes, manage scripts, and control node properties through a standardized MCP interface.
README
Godot AI MCP Server
An enhanced Model Context Protocol (MCP) server for the Godot game engine. Provides AI assistants with tools to launch the editor, run projects, manipulate scenes, manage scripts, and control node properties — all through a standardized MCP interface.
Based on
@coding-solo/godot-mcpby Solomon Elias. That project provides the original core tools (launch editor, run project, scene management, UID tools). This fork adds script manipulation (set_script,read_script,write_script,list_scripts), scene inspection (get_scene_tree), node removal (remove_node), and property editing (set_node_property).
Original project: Coding-Solo/godot-mcp — MIT License.
Features
Core Tools
- launch_editor — Open the Godot editor for a project
- run_project — Run a Godot project in debug mode
- get_debug_output — Capture stdout/stderr from running projects
- stop_project — Stop a running project
- get_godot_version — Check installed Godot version
- list_projects — Find Godot projects in a directory
- get_project_info — Get project metadata (scene count, script count, etc.)
Scene Management
- create_scene — Create new scene files with any root node type
- add_node — Add nodes to existing scenes with properties
- remove_node — Remove nodes from scenes
- get_scene_tree — Inspect the full scene tree structure
- load_sprite — Load textures into Sprite2D/Sprite3D/TextureRect nodes
- export_mesh_library — Export 3D scenes as MeshLibrary for GridMap
- save_scene — Save/repack scene files
Script Tools
- set_script — Attach a script to a node (creates the script if it doesn't exist)
- read_script — Read
.gd,.cs, or.shaderfile contents - write_script — Create or overwrite script files
- list_scripts — List all scripts in a project
Node Properties
- set_node_property — Set any property on a node in a scene
UID Management (Godot 4.4+)
- get_uid — Get UID for a specific file
- update_project_uids — Resave all resources to update UID references
Requirements
- Node.js >= 18.0.0
- Godot 4.x (Mono build recommended for C# support)
Installation
npm install -g /path/to/godot-ai-mcp
Or use directly via npx:
npx /path/to/godot-ai-mcp
Configuration
MCP Config (opencode.json, claude desktop, etc.)
{
"mcp": {
"godot-ai": {
"type": "local",
"command": [
"env",
"GODOT_PATH=/path/to/your/godot/executable",
"DEBUG=true",
"npx",
"-y",
"godot-ai-mcp"
]
}
}
}
Environment Variables
| Variable | Description |
|---|---|
GODOT_PATH |
Path to the Godot executable (auto-detected if not set) |
DEBUG |
Set to true for verbose debug output on stderr |
Usage Examples
Create a scene with a Player node and attach a script
1. create_scene(projectPath="/path/to/project", scenePath="scenes/player.tscn", rootNodeType="CharacterBody2D")
2. add_node(projectPath="/path/to/project", scenePath="scenes/player.tscn", parentNodePath="root", nodeType="Sprite2D", nodeName="Sprite")
3. set_script(projectPath="/path/to/project", scenePath="scenes/player.tscn", nodePath="root", scriptPath="scripts/player.gd")
4. load_sprite(projectPath="/path/to/project", scenePath="scenes/player.tscn", nodePath="root/Sprite", texturePath="assets/player.png")
Inspect and modify a scene
1. get_scene_tree(projectPath="/path/to/project", scenePath="scenes/level.tscn")
2. set_node_property(projectPath="/path/to/project", scenePath="scenes/level.tscn", nodePath="root/Enemy", propertyName="position", propertyValue=[100, 200])
3. remove_node(projectPath="/path/to/project", scenePath="scenes/level.tscn", nodePath="root/DebugNode")
Script workflow
1. list_scripts(projectPath="/path/to/project")
2. read_script(projectPath="/path/to/project", scriptPath="scripts/enemy.gd")
3. write_script(projectPath="/path/to/project", scriptPath="scripts/enemy.gd", content="extends CharacterBody2D\n...")
Building from Source
npm install
npm run build
The compiled output goes to build/. The GDScript file is copied to build/scripts/.
License
MIT — see LICENSE for details.
This project is derived from @coding-solo/godot-mcp (MIT, © Solomon Elias). The original core server architecture, GDScript headless operations pattern, and scene manipulation tools are based on that project.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。