Godot MCP
Provides 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.
README
Godot MCP (Model Context Protocol)
Project Overview
Godot MCP provides a comprehensive, production-ready integration between Large Language Models (LLMs) and the Godot Engine (versions 4.x). It creates a unified Model Context Protocol interface allowing AI assistants to intelligently read, write, and manipulate Godot project files, interact with the live Godot Editor, and perform End-to-End (E2E) testing on running games. By consolidating multiple AI-to-Godot features into a single robust toolkit, Godot MCP dramatically lowers the friction of AI-assisted game development.
Installation & Usage
1. Prerequisites
- Node.js (v18 or higher)
- Godot Engine 4.x
- Supported MCP client (e.g., Claude Desktop)
2. Setup the Server
git clone https://github.com/6NineLives/godot-mcp
cd godot-mcp/server
npm install
npm run build
3. Configure the MCP Client (Claude Desktop Example)
Add the following configuration to your mcp config json:
{
"mcpServers": {
"godot-mcp": {
"command": "node",
"args": ["<ABSOLUTE_PATH_TO_GODOT_MCP>/server/dist/index.js"],
"env": {
"GODOT_PATH": "<OPTIONAL_ABSOLUTE_PATH_TO_GODOT_EXECUTABLE>"
}
}
}
}
4. Godot Addon Installation
- Open your Godot project.
- Copy the
addons/godot_mcpfolder from this repository into your project'saddons/directory. - Ensure the
godot_mcpplugin is enabled in Godot via Project > Project Settings > Plugins. - Start your MCP Client. The server will seamlessly connect to the Godot WebSocket.
Feature List
- Live Editor Manipulation: Modify nodes, properties, and scenes in real-time within the Godot Editor.
- Deep Project Context: Read and analyze scripts, scene structures (
.tscn), and project files dynamically. - Version-Aware Godot Docs: Automatically query Godot documentation matching your specific engine version.
- End-to-End Game Bridge testing: Play, test, and assert logic in live running games via simulated inputs and state queries.
- Advanced Diagnostics: View diagnostics, validate scenes, and debug live errors automatically.
- Consolidated Architecture: Minimal tool footprint heavily utilizing
actionparameters to conserve AI context windows. - Auto-Screenshot Loop: Periodically captures visual screenshots of the editor or running game state to provide AI with continuous visual context.
- Bug Fix Loop: Automatically collects stack traces from the Godot engine, analyzes runtime errors, and iteratively proposes code fixes.
- Scene Tree Viewer: Interactive web-based visualizer for inspecting the live Godot scene tree and node properties via a browser.
- Intelligent Path Detection: Seamlessly detects correct Godot project paths and environment variables, even when loaded via external IDEs.
- Robust Connection Handling: Enterprise-grade WebSocket connections featuring command queuing, exponential backoff, and large payload buffering.
- Universal Asset Resolution: Resolves internal Godot UUIDs (
uid://...or.uidfiles) dynamically to absolute file paths, ensuring seamless AI context mapping.
MCP Tools Reference
| Tool Name | Description | Key Parameters |
|---|---|---|
manage_project |
Project-level operations | action (info, tree, stats), directory |
manage_project_config |
Modify project.godot or export settings | action (read, write), section, key, value |
manage_asset |
Resolve or inspect asset paths and UUIDs | action (resolve, get_uid), file_path, uid |
manage_script |
Create, read, update, or analyze GDScripts | action (create, read, edit), file_path, content |
manage_scene |
Scene-level operations | action (open, save, run, structure), scene_path |
manage_node |
Node-level edits within the live editor | action (create, delete, update, get), node_path, properties |
manage_physics |
Inspect or edit physics shapes and layers | action (get_layer, set_layer), node_path |
manage_animation |
Control AnimationPlayers in the editor | action (get_list, play, stop), node_path, anim_name |
manage_ui |
Inspect or modify Control nodes | action (get_theme, set_anchors), node_path |
manage_audio |
Audit or manipulate audio streams | action (get_buses, set_volume), bus_name |
manage_signal |
Connect or disconnect Godot signals | action (connect, disconnect), source_node, signal_name, target_node, method_name |
manage_game_bridge |
Connect to or configure a live running game | action (status, reset, ping) |
game_scene |
Get node trees from the running game | action (get_tree, get_node), node_path |
game_input |
Simulate input events in the running game | action (press, release, mouse_move), input_name |
game_state |
Query properties and execution state | action (get_property, call_method), node_path, property |
game_wait |
Pause execution to wait for visual updates | action (wait_frames, wait_seconds), amount |
godot_docs |
Query Godot Engine documentation | action (search, get_class), query |
execute_editor_script |
Run arbitrary GDScript within the editor | script_code |
visualize_project |
Launch the web-based project visualizer | port |
capture_vision |
Capture screenshots of the editor (if supported) | format, quality |
inspect_project |
Deep-scan relations and usages | action (find_usage), target |
debug_project |
Fetch logs and stack traces | action (get_errors, clear_logs) |
validate_scene |
Check for broken dependencies | scene_path |
run_and_verify |
Workflow tool to execute and assert correctness | scene_path, assertions |
get_project_diagnostics |
Aggregate warnings across the ecosystem | include_warnings |
search_project |
Full-text or regex search across scripts | query, use_regex, file_pattern |
semantic_search |
Search code by semantic meaning | query, threshold |
get_project_assets |
Get a comprehensive list of assets | resource_type |
get_project_context |
Retrieve summarized current working context | depth |
Acknowledgements
This project builds upon the foundational work of several existing Model Context Protocol (MCP) implementations for the Godot Engine. We would like to express our gratitude to the original maintainers and communities behind these repositories:
- godot-mcp-plugin: (tomyud1/godot-mcp)
- godot-mcp-scene: (Derfirm/godot-mcp)
- godot-mcp-docs: (Nihilantropy/godot-mcp-docs)
- godot-mcp-solo: (Coding-Solo/godot-mcp)
- godot_mcp_uid: (bradypp/godot-mcp)
We sincerely thank the original maintainers, contributors, and the broader Godot and open-source communities who laid the groundwork for these tools. Their specialized prototypes proved the viability of connecting Large Language Models to Godot via MCP and provided essential insights that made this unified, production-ready toolchain possible.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。