gopeak 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +909 -0
- package/build/addon/auto_reload/auto_reload.gd +126 -0
- package/build/addon/auto_reload/auto_reload.gd.uid +1 -0
- package/build/addon/auto_reload/plugin.cfg +7 -0
- package/build/addon/godot_mcp_runtime/godot_mcp_runtime.gd +33 -0
- package/build/addon/godot_mcp_runtime/godot_mcp_runtime.gd.uid +1 -0
- package/build/addon/godot_mcp_runtime/mcp_runtime_autoload.gd +616 -0
- package/build/addon/godot_mcp_runtime/mcp_runtime_autoload.gd.uid +1 -0
- package/build/addon/godot_mcp_runtime/plugin.cfg +7 -0
- package/build/dap_client.js +506 -0
- package/build/gdscript_utils.js +121 -0
- package/build/index.js +6275 -0
- package/build/lsp_client.js +521 -0
- package/build/project_utils.js +82 -0
- package/build/providers/ambientcg.js +174 -0
- package/build/providers/index.js +5 -0
- package/build/providers/kenney.js +159 -0
- package/build/providers/manager.js +122 -0
- package/build/providers/polyhaven.js +191 -0
- package/build/providers/types.js +19 -0
- package/build/resources.js +189 -0
- package/build/scripts/godot_operations.gd +6811 -0
- package/build/scripts/godot_operations.gd.uid +1 -0
- package/build/tools.js +89 -0
- package/package.json +82 -0
package/README.md
ADDED
|
@@ -0,0 +1,909 @@
|
|
|
1
|
+
# GoPeak
|
|
2
|
+
|
|
3
|
+
[](https://modelcontextprotocol.io/introduction)
|
|
4
|
+
[](https://godotengine.org)
|
|
5
|
+
[](https://nodejs.org/en/download/)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://www.npmjs.com/package/gopeak)
|
|
8
|
+
|
|
9
|
+
[](https://github.com/HaD0Yun/godot-mcp/commits/main)
|
|
10
|
+
[](https://github.com/HaD0Yun/godot-mcp/stargazers)
|
|
11
|
+
[](https://github.com/HaD0Yun/godot-mcp/network/members)
|
|
12
|
+
[](https://opensource.org/licenses/MIT)
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
((((((( (((((((
|
|
16
|
+
((((((((((( (((((((((((
|
|
17
|
+
((((((((((((( (((((((((((((
|
|
18
|
+
(((((((((((((((((((((((((((((((((
|
|
19
|
+
(((((((((((((((((((((((((((((((((
|
|
20
|
+
((((( ((((((((((((((((((((((((((((((((((((((((( (((((
|
|
21
|
+
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
22
|
+
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
23
|
+
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
24
|
+
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
25
|
+
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
26
|
+
(((((((((((@@@@@@@(((((((((((((((((((((((((((@@@@@@@(((((((((((
|
|
27
|
+
(((((((((@@@@,,,,,@@@(((((((((((((((((((((@@@,,,,,@@@@(((((((((
|
|
28
|
+
((((((((@@@,,,,,,,,,@@(((((((@@@@@(((((((@@,,,,,,,,,@@@((((((((
|
|
29
|
+
((((((((@@@,,,,,,,,,@@(((((((@@@@@(((((((@@,,,,,,,,,@@@((((((((
|
|
30
|
+
(((((((((@@@,,,,,,,@@((((((((@@@@@((((((((@@,,,,,,,@@@(((((((((
|
|
31
|
+
((((((((((((@@@@@@(((((((((((@@@@@(((((((((((@@@@@@((((((((((((
|
|
32
|
+
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
33
|
+
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
34
|
+
@@@@@@@@@@@@@((((((((((((@@@@@@@@@@@@@((((((((((((@@@@@@@@@@@@@
|
|
35
|
+
((((((((( @@@(((((((((((@@(((((((((((@@(((((((((((@@@ (((((((((
|
|
36
|
+
(((((((((( @@((((((((((@@@(((((((((((@@@((((((((((@@ ((((((((((
|
|
37
|
+
(((((((((((@@@@@@@@@@@@@@(((((((((((@@@@@@@@@@@@@@(((((((((((
|
|
38
|
+
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
39
|
+
(((((((((((((((((((((((((((((((((((((((((((((((((((((
|
|
40
|
+
(((((((((((((((((((((((((((((((((((((((((((((((
|
|
41
|
+
(((((((((((((((((((((((((((((((((
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/$$$$$$ /$$$$$$$ /$$
|
|
45
|
+
/$$__ $$ | $$__ $$ | $$
|
|
46
|
+
| $$ \__/ /$$$$$$ | $$ \ $$ /$$$$$$ /$$$$$$$ | $$ /$$/
|
|
47
|
+
| $$ /$$$$//$$__ $$| $$$$$$$//$$__ $$ |____ $$ | $$ /$$/
|
|
48
|
+
| $$|_ $$| $$ \ $$| $$____/| $$$$$$$$ /$$$$$$$ | $$$$$/
|
|
49
|
+
| $$ \ $$| $$ | $$| $$ | $$_____/ /$$__ $$ | $$ $$
|
|
50
|
+
| $$$$$$/| $$$$$$/| $$ | $$$$$$ | $$$$$$$ | $$\ $$
|
|
51
|
+
\______/ \______/ |__/ \______/ \_______/ |__/ \__/
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**The most comprehensive Model Context Protocol (MCP) server for Godot Engine — enabling AI assistants to build, modify, and debug Godot games with unprecedented depth and precision.**
|
|
55
|
+
|
|
56
|
+
> **Now with Auto Reload!** Scenes and scripts automatically refresh in the Godot editor when modified externally via MCP.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Why GoPeak? The Game-Changing Benefits
|
|
61
|
+
|
|
62
|
+
### 🚀 Transform Your Game Development Workflow
|
|
63
|
+
|
|
64
|
+
GoPeak isn't just another tool — it's a **paradigm shift** in how AI assistants interact with game engines. Here's why this matters:
|
|
65
|
+
|
|
66
|
+
#### 1. **AI That Truly Understands Godot**
|
|
67
|
+
|
|
68
|
+
Traditional AI assistants can write GDScript, but they're essentially working blind. They generate code based on training data, hoping it works. **GoPeak changes everything:**
|
|
69
|
+
|
|
70
|
+
- **Real-time Feedback Loop**: When you ask "run my project and show me errors," the AI actually runs your project, captures the output, and sees exactly what went wrong
|
|
71
|
+
- **Context-Aware Assistance**: The AI can inspect your actual scene tree, understand your node hierarchy, and provide suggestions based on your real project structure
|
|
72
|
+
- **Validation Before Suggesting**: Before suggesting you use a resource, the AI can verify it exists in your project
|
|
73
|
+
|
|
74
|
+
#### 2. **95+ Tools with Dynamic ClassDB Introspection**
|
|
75
|
+
|
|
76
|
+
Instead of hardcoding tools for every Godot class, GoPeak provides **generic tools** (`add_node`, `create_resource`) that work with ANY ClassDB class, plus **ClassDB introspection tools** that let AI discover classes, properties, and methods dynamically.
|
|
77
|
+
|
|
78
|
+
| Category | What You Can Do | Tools |
|
|
79
|
+
|----------|-----------------|-------|
|
|
80
|
+
| **Scene Management** | Build entire scene trees programmatically | `create_scene`, `add_node`, `delete_node`, `duplicate_node`, `reparent_node`, `list_scene_nodes`, `get_node_properties`, `set_node_properties` |
|
|
81
|
+
| **ClassDB Introspection** | Dynamically discover Godot classes, properties, methods, signals | `query_classes`, `query_class_info`, `inspect_inheritance` |
|
|
82
|
+
| **GDScript Operations** | Write and modify scripts with surgical precision | `create_script`, `modify_script`, `get_script_info` |
|
|
83
|
+
| **Resource Management** | Create any resource type, modify existing resources | `create_resource`, `modify_resource`, `create_material`, `create_shader` |
|
|
84
|
+
| **Animation System** | Build animations and state machines | `create_animation`, `add_animation_track`, `create_animation_tree`, `add_animation_state`, `connect_animation_states` |
|
|
85
|
+
| **2D Tile System** | Create tilesets and populate tilemaps | `create_tileset`, `set_tilemap_cells` |
|
|
86
|
+
| **Signal Management** | Wire up your game's event system | `connect_signal`, `disconnect_signal`, `list_connections` |
|
|
87
|
+
| **Project Configuration** | Manage settings, autoloads, and inputs | `get_project_setting`, `set_project_setting`, `add_autoload`, `add_input_action` |
|
|
88
|
+
| **Developer Experience** | Analyze, debug, and maintain your project | `get_dependencies`, `find_resource_usages`, `parse_error_log`, `get_project_health`, `search_project` |
|
|
89
|
+
| **Runtime Debugging** | Inspect and modify running games | `inspect_runtime_tree`, `set_runtime_property`, `call_runtime_method`, `get_runtime_metrics` |
|
|
90
|
+
| **Screenshot Capture** | Capture viewport screenshots from running games | `capture_screenshot`, `capture_viewport` |
|
|
91
|
+
| **Input Injection** | Simulate keyboard, mouse, and action inputs | `inject_action`, `inject_key`, `inject_mouse_click`, `inject_mouse_motion` |
|
|
92
|
+
| **GDScript LSP** | Diagnostics, completions, hover, and symbols via Godot's built-in Language Server | `lsp_get_diagnostics`, `lsp_get_completions`, `lsp_get_hover`, `lsp_get_symbols` |
|
|
93
|
+
| **Debug Adapter (DAP)** | Breakpoints, stepping, stack traces, and debug output capture | `dap_get_output`, `dap_set_breakpoint`, `dap_continue`, `dap_step_over`, `dap_get_stack_trace` |
|
|
94
|
+
| **MCP Resources** | Access project files via `godot://` URIs | `godot://project/info`, `godot://scene/{path}`, `godot://script/{path}` |
|
|
95
|
+
| **Audio System** | Create audio buses, configure effects | `create_audio_bus`, `get_audio_buses`, `set_audio_bus_effect`, `set_audio_bus_volume` |
|
|
96
|
+
| **Navigation** | AI pathfinding setup | `create_navigation_region`, `create_navigation_agent` |
|
|
97
|
+
| **UI/Themes** | Create and apply custom themes with shaders | `set_theme_color`, `set_theme_font_size`, `apply_theme_shader` |
|
|
98
|
+
| **Asset Library** | Search and download CC0 assets from multiple sources | `search_assets`, `fetch_asset`, `list_asset_providers` |
|
|
99
|
+
| **Auto Reload** | Instant editor refresh on external changes | Built-in Editor Plugin |
|
|
100
|
+
|
|
101
|
+
> **Design Philosophy**: Rather than providing 90+ specialized tools (e.g., `create_camera`, `create_light`, `create_physics_material`), GoPeak uses generic `add_node` and `create_resource` tools that work with ANY Godot class. The AI uses `query_classes` to discover available types and `query_class_info` to learn their properties — just like a developer using the Godot docs.
|
|
102
|
+
|
|
103
|
+
#### 3. **Seamless Editor Integration with Auto Reload**
|
|
104
|
+
|
|
105
|
+
The included **Auto Reload plugin** eliminates the friction of external editing:
|
|
106
|
+
|
|
107
|
+
- **No Manual Refresh**: When MCP modifies a scene or script, the Godot editor automatically reloads it
|
|
108
|
+
- **1-Second Detection**: Lightweight polling with negligible performance impact (~0.01ms/sec)
|
|
109
|
+
- **Smart Watching**: Monitors open scenes AND their attached scripts
|
|
110
|
+
- **Zero Configuration**: Just enable the plugin and forget about it
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
MCP modifies file → Auto Reload detects change → Editor reloads → You see the result instantly
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### 4. **Eliminate the Copy-Paste-Debug Cycle**
|
|
117
|
+
|
|
118
|
+
**Before GoPeak:**
|
|
119
|
+
1. Ask AI for code
|
|
120
|
+
2. Copy code to your project
|
|
121
|
+
3. Run project, encounter error
|
|
122
|
+
4. Copy error back to AI
|
|
123
|
+
5. Get fix, paste it
|
|
124
|
+
6. Repeat 10+ times
|
|
125
|
+
|
|
126
|
+
**With GoPeak:**
|
|
127
|
+
1. "Create a player character with health, movement, and jumping"
|
|
128
|
+
2. AI creates the scene, writes the script, adds the nodes, connects signals, and tests it
|
|
129
|
+
3. Done.
|
|
130
|
+
|
|
131
|
+
The AI doesn't just write code — it **implements features end-to-end**.
|
|
132
|
+
|
|
133
|
+
#### 5. **Type-Safe, Error-Resistant Operations**
|
|
134
|
+
|
|
135
|
+
Every operation in GoPeak includes:
|
|
136
|
+
|
|
137
|
+
- **Path Validation**: Prevents invalid file operations
|
|
138
|
+
- **Type Serialization**: Correctly handles Vector2, Vector3, Color, Transform, and all Godot types
|
|
139
|
+
- **Error Recovery**: Meaningful error messages with suggested fixes
|
|
140
|
+
- **Atomic Operations**: Changes are applied consistently or not at all
|
|
141
|
+
|
|
142
|
+
Example: When you ask to set a node's position, GoPeak:
|
|
143
|
+
1. Validates the scene exists
|
|
144
|
+
2. Validates the node path
|
|
145
|
+
3. Deserializes `{"x": 100, "y": 200}` to `Vector2(100, 200)`
|
|
146
|
+
4. Sets the property
|
|
147
|
+
5. Saves the scene
|
|
148
|
+
6. Confirms success or reports exactly what went wrong
|
|
149
|
+
|
|
150
|
+
#### 6. **Project Health Intelligence**
|
|
151
|
+
|
|
152
|
+
The `get_project_health` tool provides a comprehensive analysis of your project:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"score": 85,
|
|
157
|
+
"grade": "B",
|
|
158
|
+
"checks": {
|
|
159
|
+
"structure": { "passed": true },
|
|
160
|
+
"resources": { "issues": ["3 textures need reimporting"] },
|
|
161
|
+
"scripts": { "issues": ["5 TODO comments found"] },
|
|
162
|
+
"config": { "passed": true }
|
|
163
|
+
},
|
|
164
|
+
"recommendations": [
|
|
165
|
+
"Configure export presets for your target platforms",
|
|
166
|
+
"Review and resolve TODO items before release"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This turns your AI assistant into a **code reviewer that actually understands your Godot project**.
|
|
172
|
+
|
|
173
|
+
#### 7. **Dependency Analysis & Circular Reference Detection**
|
|
174
|
+
|
|
175
|
+
Ever had a project break because of circular dependencies? The `get_dependencies` tool:
|
|
176
|
+
|
|
177
|
+
- Maps every resource dependency in your project
|
|
178
|
+
- Detects circular references before they cause runtime errors
|
|
179
|
+
- Shows you the complete dependency chain for any resource
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
PlayerScene.tscn
|
|
183
|
+
├── PlayerScript.gd
|
|
184
|
+
│ └── WeaponBase.gd
|
|
185
|
+
│ └── ⚠️ CIRCULAR: PlayerScript.gd
|
|
186
|
+
└── PlayerSprite.png
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
#### 8. **Live Runtime Debugging (Optional Addon)**
|
|
190
|
+
|
|
191
|
+
Install the included `godot_mcp_runtime` addon and unlock:
|
|
192
|
+
|
|
193
|
+
- **Live Scene Tree Inspection**: See your game's actual node tree while it runs
|
|
194
|
+
- **Hot Property Modification**: Change values in real-time without restarting
|
|
195
|
+
- **Remote Method Calling**: Trigger functions in your running game
|
|
196
|
+
- **Performance Monitoring**: Track FPS, memory, draw calls, and more
|
|
197
|
+
|
|
198
|
+
This transforms debugging from "add print statements and restart" to "inspect and modify on the fly."
|
|
199
|
+
|
|
200
|
+
### 💡 Real-World Use Cases
|
|
201
|
+
|
|
202
|
+
#### **Rapid Prototyping**
|
|
203
|
+
```
|
|
204
|
+
"Create a basic platformer with a player that can move, jump, and collect coins"
|
|
205
|
+
```
|
|
206
|
+
The AI creates scenes, scripts, nodes, signals, and input actions — a playable prototype in minutes.
|
|
207
|
+
|
|
208
|
+
#### **Refactoring at Scale**
|
|
209
|
+
```
|
|
210
|
+
"Find all uses of the old PlayerData resource and update them to use the new PlayerStats"
|
|
211
|
+
```
|
|
212
|
+
Search the entire project, identify every reference, and make consistent changes.
|
|
213
|
+
|
|
214
|
+
#### **Debugging Complex Issues**
|
|
215
|
+
```
|
|
216
|
+
"My player keeps falling through the floor. Check my collision setup and tell me what's wrong"
|
|
217
|
+
```
|
|
218
|
+
Inspect node properties, analyze scene structure, and identify configuration issues.
|
|
219
|
+
|
|
220
|
+
#### **Learning Godot**
|
|
221
|
+
```
|
|
222
|
+
"Show me how signals work by creating a button that changes a label's text when clicked"
|
|
223
|
+
```
|
|
224
|
+
Instead of just explaining, the AI builds a working example in your actual project.
|
|
225
|
+
|
|
226
|
+
#### **Maintaining Large Projects**
|
|
227
|
+
```
|
|
228
|
+
"Run a health check on my project and tell me what needs attention"
|
|
229
|
+
```
|
|
230
|
+
Get actionable insights about project structure, unused resources, and potential issues.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Features
|
|
235
|
+
|
|
236
|
+
### Core Features
|
|
237
|
+
- **Launch Godot Editor**: Open the Godot editor for a specific project
|
|
238
|
+
- **Run Godot Projects**: Execute Godot projects in debug mode
|
|
239
|
+
- **Capture Debug Output**: Retrieve console output and error messages
|
|
240
|
+
- **Control Execution**: Start and stop Godot projects programmatically
|
|
241
|
+
- **Get Godot Version**: Retrieve the installed Godot version
|
|
242
|
+
- **List Godot Projects**: Find Godot projects in a specified directory
|
|
243
|
+
- **Project Analysis**: Get detailed information about project structure
|
|
244
|
+
|
|
245
|
+
### Scene Management
|
|
246
|
+
- Create new scenes with specified root node types
|
|
247
|
+
- Add, delete, duplicate, and reparent nodes
|
|
248
|
+
- Set node properties with type-safe serialization
|
|
249
|
+
- List scene tree structure with full hierarchy
|
|
250
|
+
- Load sprites and textures into Sprite2D nodes
|
|
251
|
+
- Export 3D scenes as MeshLibrary resources for GridMap
|
|
252
|
+
|
|
253
|
+
### GDScript Operations
|
|
254
|
+
- **Create Scripts**: Generate new GDScript files with templates (singleton, state_machine, component, resource)
|
|
255
|
+
- **Modify Scripts**: Add functions, variables, and signals to existing scripts
|
|
256
|
+
- **Analyze Scripts**: Get detailed information about script structure, dependencies, and exports
|
|
257
|
+
|
|
258
|
+
### Signal & Connection Management
|
|
259
|
+
- Connect signals between nodes in scenes
|
|
260
|
+
- Disconnect signal connections
|
|
261
|
+
- List all signal connections in a scene
|
|
262
|
+
|
|
263
|
+
### ClassDB Introspection (New!)
|
|
264
|
+
- **Query Classes**: Discover available Godot classes with filtering by name, category (node, node2d, node3d, control, resource, etc.), and instantiability
|
|
265
|
+
- **Query Class Info**: Get detailed methods, properties, signals, and enums for any class
|
|
266
|
+
- **Inspect Inheritance**: Explore class hierarchy — ancestors, children, and all descendants
|
|
267
|
+
|
|
268
|
+
### Resource Management
|
|
269
|
+
- **Create Resources**: Generate ANY resource type as .tres files (replaces specialized create_* tools)
|
|
270
|
+
- **Modify Resources**: Update properties of existing .tres/.res files
|
|
271
|
+
- **Create Materials**: StandardMaterial3D, ShaderMaterial, CanvasItemMaterial, ParticleProcessMaterial
|
|
272
|
+
- **Create Shaders**: canvas_item, spatial, particles, sky, fog shaders with templates
|
|
273
|
+
|
|
274
|
+
### Animation System
|
|
275
|
+
- Create new animations in AnimationPlayer nodes
|
|
276
|
+
- Add property and method tracks to animations
|
|
277
|
+
- Insert keyframes with proper value serialization
|
|
278
|
+
|
|
279
|
+
### 2D Tile System
|
|
280
|
+
- Create TileSet resources with atlas texture sources
|
|
281
|
+
- Set TileMap cells programmatically
|
|
282
|
+
|
|
283
|
+
### Import/Export Pipeline
|
|
284
|
+
- Get import status and options for resources
|
|
285
|
+
- Modify import settings and trigger reimport
|
|
286
|
+
- List export presets and validate project for export
|
|
287
|
+
- Export projects using Godot CLI
|
|
288
|
+
|
|
289
|
+
### Project Configuration
|
|
290
|
+
- Get and set project settings
|
|
291
|
+
- Manage autoload singletons (add, remove, list)
|
|
292
|
+
- Set main scene
|
|
293
|
+
- Add input actions with key, mouse, and joypad events
|
|
294
|
+
|
|
295
|
+
### Plugin Management
|
|
296
|
+
- List installed plugins with status
|
|
297
|
+
- Enable and disable plugins
|
|
298
|
+
|
|
299
|
+
### Developer Experience
|
|
300
|
+
- **Dependency Analysis**: Get resource dependency graphs with circular reference detection
|
|
301
|
+
- **Resource Usage Finder**: Find all usages of a resource across the project
|
|
302
|
+
- **Error Log Parser**: Parse Godot error logs with suggestions
|
|
303
|
+
- **Project Health Check**: Comprehensive project analysis with scoring
|
|
304
|
+
- **Project Search**: Search for text/patterns across all project files
|
|
305
|
+
|
|
306
|
+
### Runtime Connection (Optional Addon)
|
|
307
|
+
- Real-time scene tree inspection
|
|
308
|
+
- Live property modification
|
|
309
|
+
- Remote method calling
|
|
310
|
+
- Performance metrics monitoring
|
|
311
|
+
- Signal watching
|
|
312
|
+
|
|
313
|
+
### Screenshot Capture (New!)
|
|
314
|
+
- Capture the running game's viewport as a base64 PNG/JPG image
|
|
315
|
+
- Specify target resolution for resized captures
|
|
316
|
+
- Capture specific viewports by node path
|
|
317
|
+
|
|
318
|
+
### Input Injection (New!)
|
|
319
|
+
- Simulate Godot input actions (press/release) for automated testing
|
|
320
|
+
- Inject keyboard key events with modifier support (Shift, Ctrl, Alt)
|
|
321
|
+
- Simulate mouse clicks (left/right/middle, single/double)
|
|
322
|
+
- Simulate mouse movement (absolute and relative)
|
|
323
|
+
|
|
324
|
+
### GDScript Language Server (New!)
|
|
325
|
+
- Get real-time diagnostics (errors/warnings) from Godot's built-in LSP
|
|
326
|
+
- Code completions at any position in a GDScript file
|
|
327
|
+
- Hover information for symbols, functions, and variables
|
|
328
|
+
- Document symbol outlines for navigation
|
|
329
|
+
- Lazy connection to Godot editor's LSP (port 6005)
|
|
330
|
+
|
|
331
|
+
### Debug Adapter Protocol (New!)
|
|
332
|
+
- Capture debug console output from running Godot games
|
|
333
|
+
- Set and remove breakpoints in GDScript files
|
|
334
|
+
- Step over, continue, and pause execution
|
|
335
|
+
- Inspect stack traces at breakpoints
|
|
336
|
+
- Lazy connection to Godot's built-in DAP (port 6006)
|
|
337
|
+
|
|
338
|
+
### MCP Resources (New!)
|
|
339
|
+
- Access Godot project files via `godot://` URI protocol
|
|
340
|
+
- `godot://project/info` — parsed project.godot metadata as JSON
|
|
341
|
+
- `godot://scene/{path}` — read .tscn scene files
|
|
342
|
+
- `godot://script/{path}` — read .gd script files
|
|
343
|
+
- `godot://resource/{path}` — read .tres/.tscn/.gd files
|
|
344
|
+
- Path traversal protection built-in
|
|
345
|
+
|
|
346
|
+
### UID Management (Godot 4.4+)
|
|
347
|
+
- Get UID for specific files
|
|
348
|
+
- Update UID references by resaving resources
|
|
349
|
+
|
|
350
|
+
### Multi-Source Asset Library (CC0)
|
|
351
|
+
- **Unified Search**: Search for 3D models, textures, HDRIs across multiple CC0 asset providers
|
|
352
|
+
- **Automatic Download**: Fetch assets directly into your Godot project
|
|
353
|
+
- **Provider Priority**: Searches Poly Haven → AmbientCG → Kenney in order
|
|
354
|
+
- **Attribution Tracking**: Automatic CREDITS.md generation for proper attribution
|
|
355
|
+
|
|
356
|
+
**Supported Providers:**
|
|
357
|
+
|
|
358
|
+
| Provider | Asset Types | License |
|
|
359
|
+
|----------|-------------|---------|
|
|
360
|
+
| [Poly Haven](https://polyhaven.com) | Models, Textures, HDRIs | CC0 |
|
|
361
|
+
| [AmbientCG](https://ambientcg.com) | Textures, Models, HDRIs | CC0 |
|
|
362
|
+
| [Kenney](https://kenney.nl) | Models, Textures, 2D, Audio | CC0 |
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Requirements
|
|
367
|
+
|
|
368
|
+
- [Godot Engine 4.x](https://godotengine.org/download) installed on your system
|
|
369
|
+
- Node.js 18+ and npm
|
|
370
|
+
- An AI assistant that supports MCP (Claude Desktop, Cline, Cursor, OpenCode, etc.)
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Installation and Configuration
|
|
375
|
+
|
|
376
|
+
### 🚀 One-Click Install (Recommended)
|
|
377
|
+
|
|
378
|
+
**Linux / macOS**
|
|
379
|
+
```bash
|
|
380
|
+
curl -sL https://raw.githubusercontent.com/HaD0Yun/godot-mcp/main/install.sh | bash
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
This script will:
|
|
384
|
+
- ✅ Check prerequisites (Git, Node.js 18+, npm)
|
|
385
|
+
- ✅ Clone the repository to `~/.local/share/godot-mcp`
|
|
386
|
+
- ✅ Install dependencies and build automatically
|
|
387
|
+
- ✅ Auto-detect Godot installation
|
|
388
|
+
- ✅ Show configuration instructions for your AI assistant
|
|
389
|
+
|
|
390
|
+
**Advanced Options:**
|
|
391
|
+
```bash
|
|
392
|
+
# Custom installation directory
|
|
393
|
+
curl -sL https://raw.githubusercontent.com/HaD0Yun/godot-mcp/main/install.sh | bash -s -- --dir ~/my-godot-mcp
|
|
394
|
+
|
|
395
|
+
# Specify Godot path
|
|
396
|
+
curl -sL https://raw.githubusercontent.com/HaD0Yun/godot-mcp/main/install.sh | bash -s -- --godot /usr/bin/godot4
|
|
397
|
+
|
|
398
|
+
# Get configuration for specific AI assistant
|
|
399
|
+
curl -sL https://raw.githubusercontent.com/HaD0Yun/godot-mcp/main/install.sh | bash -s -- --configure claude
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
**Available options:**
|
|
403
|
+
| Option | Description |
|
|
404
|
+
|--------|-------------|
|
|
405
|
+
| `-d, --dir PATH` | Installation directory (default: `~/.local/share/godot-mcp`) |
|
|
406
|
+
| `-g, --godot PATH` | Path to Godot executable |
|
|
407
|
+
| `-c, --configure NAME` | Show config for: `claude`, `cursor`, `cline`, `opencode` |
|
|
408
|
+
| `-h, --help` | Show help message |
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
### Install via npm (Fastest)
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
npx gopeak
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Or install globally:
|
|
419
|
+
```bash
|
|
420
|
+
npm install -g gopeak
|
|
421
|
+
gopeak
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Then configure your AI assistant to run `gopeak` (or `npx gopeak`) instead of `node /path/to/build/index.js`.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
### Manual Installation
|
|
429
|
+
|
|
430
|
+
#### Step 1: Install and Build
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
git clone https://github.com/HaD0Yun/godot-mcp.git
|
|
434
|
+
cd godot-mcp
|
|
435
|
+
npm install
|
|
436
|
+
npm run build
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
#### Step 2: Configure with Your AI Assistant
|
|
440
|
+
|
|
441
|
+
#### Option A: Configure with Cline (VS Code)
|
|
442
|
+
|
|
443
|
+
Add to your Cline MCP settings file:
|
|
444
|
+
|
|
445
|
+
**macOS**: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
|
|
446
|
+
**Windows**: `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
|
|
447
|
+
|
|
448
|
+
```json
|
|
449
|
+
{
|
|
450
|
+
"mcpServers": {
|
|
451
|
+
"godot": {
|
|
452
|
+
"command": "node",
|
|
453
|
+
"args": ["/absolute/path/to/godot-mcp/build/index.js"],
|
|
454
|
+
"env": {
|
|
455
|
+
"GODOT_PATH": "/path/to/godot",
|
|
456
|
+
"DEBUG": "true"
|
|
457
|
+
},
|
|
458
|
+
"disabled": false
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
#### Option B: Configure with Cursor
|
|
465
|
+
|
|
466
|
+
1. Go to **Cursor Settings** > **Features** > **MCP**
|
|
467
|
+
2. Click **+ Add New MCP Server**
|
|
468
|
+
3. Name: `godot`, Type: `command`
|
|
469
|
+
4. Command: `node /absolute/path/to/godot-mcp/build/index.js`
|
|
470
|
+
|
|
471
|
+
#### Option C: Configure with Claude Desktop
|
|
472
|
+
|
|
473
|
+
Add to `claude_desktop_config.json`:
|
|
474
|
+
|
|
475
|
+
```json
|
|
476
|
+
{
|
|
477
|
+
"mcpServers": {
|
|
478
|
+
"godot": {
|
|
479
|
+
"command": "node",
|
|
480
|
+
"args": ["/absolute/path/to/godot-mcp/build/index.js"],
|
|
481
|
+
"env": {
|
|
482
|
+
"GODOT_PATH": "/path/to/godot"
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
#### Option D: Configure with OpenCode
|
|
490
|
+
|
|
491
|
+
Add to your `opencode.json`:
|
|
492
|
+
|
|
493
|
+
```json
|
|
494
|
+
{
|
|
495
|
+
"mcp": {
|
|
496
|
+
"godot": {
|
|
497
|
+
"type": "local",
|
|
498
|
+
"command": ["node", "/absolute/path/to/godot-mcp/build/index.js"],
|
|
499
|
+
"enabled": true,
|
|
500
|
+
"environment": {
|
|
501
|
+
"GODOT_PATH": "/path/to/godot"
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### Step 3: Environment Variables
|
|
509
|
+
|
|
510
|
+
| Variable | Description |
|
|
511
|
+
|----------|-------------|
|
|
512
|
+
| `GODOT_PATH` | Path to Godot executable (auto-detected if not set) |
|
|
513
|
+
| `DEBUG` | Set to "true" for detailed logging |
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
## Example Prompts
|
|
518
|
+
|
|
519
|
+
Once configured, you can use natural language to control Godot:
|
|
520
|
+
|
|
521
|
+
### Scene Building
|
|
522
|
+
```
|
|
523
|
+
"Create a new scene with a CharacterBody2D root node called Player"
|
|
524
|
+
"Add a Sprite2D and CollisionShape2D to my Player scene"
|
|
525
|
+
"Duplicate the Enemy node and name it Enemy2"
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### Script Operations
|
|
529
|
+
```
|
|
530
|
+
"Create a GDScript for my player with movement and jumping"
|
|
531
|
+
"Add a take_damage function to my player script that emits a health_changed signal"
|
|
532
|
+
"Show me the structure of my PlayerController script"
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Resource Management
|
|
536
|
+
```
|
|
537
|
+
"Create a red StandardMaterial3D for my enemy"
|
|
538
|
+
"Create a canvas_item shader with a dissolve effect"
|
|
539
|
+
"Generate a TileSet from my tilemap_atlas.png with 16x16 tiles"
|
|
540
|
+
"Modify the environment resource to enable fog and glow"
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### ClassDB Discovery
|
|
544
|
+
```
|
|
545
|
+
"What 3D light types are available in Godot?"
|
|
546
|
+
"Show me all properties of CharacterBody3D"
|
|
547
|
+
"What classes inherit from Control?"
|
|
548
|
+
"Find all instantiable physics body types"
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### Project Analysis
|
|
552
|
+
```
|
|
553
|
+
"Check my project health and show me any issues"
|
|
554
|
+
"Find all files that use the PlayerData resource"
|
|
555
|
+
"Show me the dependency graph for my main scene"
|
|
556
|
+
"Search my project for 'TODO' comments"
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
### Configuration
|
|
560
|
+
```
|
|
561
|
+
"Add a 'jump' input action mapped to Space and gamepad button 0"
|
|
562
|
+
"Register my GameManager script as an autoload singleton"
|
|
563
|
+
"Set the main scene to res://scenes/main_menu.tscn"
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
### Debugging
|
|
567
|
+
```
|
|
568
|
+
"Run my project and show me any errors"
|
|
569
|
+
"Parse my Godot error log and suggest fixes"
|
|
570
|
+
"Inspect the scene tree of my running game"
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### Asset Library
|
|
574
|
+
```
|
|
575
|
+
"Search for a chair model across all asset sources"
|
|
576
|
+
"Find rock textures from AmbientCG"
|
|
577
|
+
"Download the nature-kit asset pack from Kenney"
|
|
578
|
+
"List all available asset providers"
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### Screenshot & Input
|
|
582
|
+
```
|
|
583
|
+
"Take a screenshot of the running game"
|
|
584
|
+
"Press the jump action and capture the result"
|
|
585
|
+
"Click at position (400, 300) in the game"
|
|
586
|
+
"Simulate pressing the W key"
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
### GDScript Analysis (LSP)
|
|
590
|
+
```
|
|
591
|
+
"Check my player script for errors using the language server"
|
|
592
|
+
"Get code completions at line 25 in movement.gd"
|
|
593
|
+
"Show me hover info for the 'velocity' variable"
|
|
594
|
+
"Get the symbol outline for my main script"
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
### Debug Adapter
|
|
598
|
+
```
|
|
599
|
+
"Set a breakpoint at line 42 in player.gd"
|
|
600
|
+
"Show me the stack trace"
|
|
601
|
+
"Continue execution after the breakpoint"
|
|
602
|
+
"Get the debug console output"
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
## Included Addons
|
|
608
|
+
|
|
609
|
+
### Auto Reload Plugin (Recommended)
|
|
610
|
+
|
|
611
|
+
**Essential for MCP workflow** - automatically reloads scenes and scripts when modified externally.
|
|
612
|
+
|
|
613
|
+
#### Installation
|
|
614
|
+
|
|
615
|
+
**Option 1: One-Click Install**
|
|
616
|
+
|
|
617
|
+
**Linux / macOS (Bash)**
|
|
618
|
+
```bash
|
|
619
|
+
# Run in your Godot project folder
|
|
620
|
+
curl -sL https://raw.githubusercontent.com/HaD0Yun/godot-mcp/main/install-addon.sh | bash
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
**Windows (PowerShell)**
|
|
624
|
+
```powershell
|
|
625
|
+
# Run in your Godot project folder
|
|
626
|
+
irm https://raw.githubusercontent.com/HaD0Yun/godot-mcp/main/install-addon.ps1 | iex
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
**Option 2: Manual Install**
|
|
630
|
+
1. Copy `build/addon/auto_reload` to your project's `addons/` folder
|
|
631
|
+
2. Open your project in Godot
|
|
632
|
+
3. Go to **Project > Project Settings > Plugins**
|
|
633
|
+
4. Enable "Godot MCP Auto Reload"
|
|
634
|
+
|
|
635
|
+
#### How It Works
|
|
636
|
+
|
|
637
|
+
```
|
|
638
|
+
[1 sec polling] → Check file modification times → Reload changed files
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
| Feature | Detail |
|
|
642
|
+
|---------|--------|
|
|
643
|
+
| **Performance** | ~0.01ms per second (negligible) |
|
|
644
|
+
| **Watched Files** | Current scene + attached scripts |
|
|
645
|
+
| **Detection** | OS file modification timestamp |
|
|
646
|
+
| **Reload Method** | `EditorInterface.reload_scene_from_path()` |
|
|
647
|
+
|
|
648
|
+
#### Output Messages
|
|
649
|
+
```
|
|
650
|
+
[Godot MCP - AutoReload] Plugin activated - watching for external changes
|
|
651
|
+
[Godot MCP - AutoReload] Scene changed: res://scenes/player.tscn
|
|
652
|
+
[Godot MCP - AutoReload] Scene reloaded: res://scenes/player.tscn
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
#### Warning
|
|
656
|
+
|
|
657
|
+
**Data Loss Risk**: If you modify a scene in the editor AND externally at the same time, editor changes will be lost.
|
|
658
|
+
|
|
659
|
+
**Best Practice**:
|
|
660
|
+
- Use MCP for modifications
|
|
661
|
+
- Use Godot editor for viewing/testing only
|
|
662
|
+
- Save before external modifications
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
### Runtime Addon (Optional)
|
|
667
|
+
|
|
668
|
+
For live debugging features, install the runtime addon:
|
|
669
|
+
|
|
670
|
+
1. Copy `build/addon/godot_mcp_runtime` to your project's `addons/` folder
|
|
671
|
+
2. Enable in **Project Settings > Plugins**
|
|
672
|
+
3. The addon starts a TCP server on port 7777 when your game runs
|
|
673
|
+
|
|
674
|
+
**Runtime Tools:**
|
|
675
|
+
- `get_runtime_status` - Check if game is running
|
|
676
|
+
- `inspect_runtime_tree` - View live scene tree
|
|
677
|
+
- `set_runtime_property` - Modify properties in real-time
|
|
678
|
+
- `call_runtime_method` - Invoke methods remotely
|
|
679
|
+
- `get_runtime_metrics` - Monitor FPS, memory, draw calls
|
|
680
|
+
- `capture_screenshot` - Capture viewport as base64 image
|
|
681
|
+
- `capture_viewport` - Capture specific viewport texture
|
|
682
|
+
- `inject_action` / `inject_key` / `inject_mouse_click` / `inject_mouse_motion` - Input simulation
|
|
683
|
+
|
|
684
|
+
---
|
|
685
|
+
|
|
686
|
+
## Complete Tool Reference
|
|
687
|
+
|
|
688
|
+
### Core Tools (7)
|
|
689
|
+
| Tool | Description |
|
|
690
|
+
|------|-------------|
|
|
691
|
+
| `launch_editor` | Open Godot editor for a project |
|
|
692
|
+
| `run_project` | Execute project in debug mode |
|
|
693
|
+
| `stop_project` | Stop running project |
|
|
694
|
+
| `get_debug_output` | Get console output and errors |
|
|
695
|
+
| `get_godot_version` | Get installed Godot version |
|
|
696
|
+
| `list_projects` | Find projects in a directory |
|
|
697
|
+
| `get_project_info` | Get project structure info |
|
|
698
|
+
|
|
699
|
+
### Scene Tools (9)
|
|
700
|
+
| Tool | Description |
|
|
701
|
+
|------|-------------|
|
|
702
|
+
| `create_scene` | Create new scene file |
|
|
703
|
+
| `add_node` | Add ANY node type to scene (universal — replaces all specialized create_* node tools) |
|
|
704
|
+
| `delete_node` | Remove node from scene |
|
|
705
|
+
| `duplicate_node` | Clone node in scene |
|
|
706
|
+
| `reparent_node` | Move node to new parent |
|
|
707
|
+
| `list_scene_nodes` | Get scene tree structure |
|
|
708
|
+
| `get_node_properties` | Get all node properties |
|
|
709
|
+
| `set_node_properties` | Set multiple properties |
|
|
710
|
+
| `save_scene` | Save scene changes |
|
|
711
|
+
|
|
712
|
+
### Script Tools (3)
|
|
713
|
+
| Tool | Description |
|
|
714
|
+
|------|-------------|
|
|
715
|
+
| `create_script` | Create GDScript with templates |
|
|
716
|
+
| `modify_script` | Add functions/variables/signals |
|
|
717
|
+
| `get_script_info` | Analyze script structure |
|
|
718
|
+
|
|
719
|
+
### ClassDB Introspection Tools (3)
|
|
720
|
+
| Tool | Description |
|
|
721
|
+
|------|-------------|
|
|
722
|
+
| `query_classes` | Discover available Godot classes with filtering by name, category, and instantiability |
|
|
723
|
+
| `query_class_info` | Get methods, properties, signals, and enums for any class |
|
|
724
|
+
| `inspect_inheritance` | Explore class hierarchy — ancestors, children, all descendants |
|
|
725
|
+
|
|
726
|
+
### Resource Tools (7)
|
|
727
|
+
| Tool | Description |
|
|
728
|
+
|------|-------------|
|
|
729
|
+
| `create_resource` | Create ANY resource type as .tres file |
|
|
730
|
+
| `modify_resource` | Modify properties of existing .tres/.res files |
|
|
731
|
+
| `create_material` | Create material resource |
|
|
732
|
+
| `create_shader` | Create shader file |
|
|
733
|
+
| `load_sprite` | Load texture into Sprite2D |
|
|
734
|
+
| `export_mesh_library` | Export as MeshLibrary |
|
|
735
|
+
| `create_tileset` | Create TileSet resource |
|
|
736
|
+
|
|
737
|
+
### Animation Tools (2)
|
|
738
|
+
| Tool | Description |
|
|
739
|
+
|------|-------------|
|
|
740
|
+
| `create_animation` | Create animation in AnimationPlayer |
|
|
741
|
+
| `add_animation_track` | Add track with keyframes |
|
|
742
|
+
|
|
743
|
+
### Signal Tools (3)
|
|
744
|
+
| Tool | Description |
|
|
745
|
+
|------|-------------|
|
|
746
|
+
| `connect_signal` | Connect signal to method |
|
|
747
|
+
| `disconnect_signal` | Remove signal connection |
|
|
748
|
+
| `list_connections` | List all connections in scene |
|
|
749
|
+
|
|
750
|
+
### Import/Export Tools (7)
|
|
751
|
+
| Tool | Description |
|
|
752
|
+
|------|-------------|
|
|
753
|
+
| `get_import_status` | Check resource import status |
|
|
754
|
+
| `get_import_options` | Get import settings |
|
|
755
|
+
| `set_import_options` | Modify import settings |
|
|
756
|
+
| `reimport_resource` | Trigger reimport |
|
|
757
|
+
| `list_export_presets` | List export configurations |
|
|
758
|
+
| `export_project` | Build for distribution |
|
|
759
|
+
| `validate_project` | Check export readiness |
|
|
760
|
+
|
|
761
|
+
### Configuration Tools (7)
|
|
762
|
+
| Tool | Description |
|
|
763
|
+
|------|-------------|
|
|
764
|
+
| `get_project_setting` | Read project setting |
|
|
765
|
+
| `set_project_setting` | Write project setting |
|
|
766
|
+
| `add_autoload` | Register singleton |
|
|
767
|
+
| `remove_autoload` | Unregister singleton |
|
|
768
|
+
| `list_autoloads` | List all autoloads |
|
|
769
|
+
| `set_main_scene` | Set startup scene |
|
|
770
|
+
| `add_input_action` | Add input mapping |
|
|
771
|
+
|
|
772
|
+
### Plugin Tools (3)
|
|
773
|
+
| Tool | Description |
|
|
774
|
+
|------|-------------|
|
|
775
|
+
| `list_plugins` | List installed plugins |
|
|
776
|
+
| `enable_plugin` | Enable a plugin |
|
|
777
|
+
| `disable_plugin` | Disable a plugin |
|
|
778
|
+
|
|
779
|
+
### DX Tools (5)
|
|
780
|
+
| Tool | Description |
|
|
781
|
+
|------|-------------|
|
|
782
|
+
| `get_dependencies` | Map resource dependencies |
|
|
783
|
+
| `find_resource_usages` | Find all resource references |
|
|
784
|
+
| `parse_error_log` | Parse errors with suggestions |
|
|
785
|
+
| `get_project_health` | Comprehensive health check |
|
|
786
|
+
| `search_project` | Search across all files |
|
|
787
|
+
|
|
788
|
+
### Runtime Tools (5)
|
|
789
|
+
| Tool | Description |
|
|
790
|
+
|------|-------------|
|
|
791
|
+
| `get_runtime_status` | Check runtime connection |
|
|
792
|
+
| `inspect_runtime_tree` | Live scene inspection |
|
|
793
|
+
| `set_runtime_property` | Modify runtime property |
|
|
794
|
+
| `call_runtime_method` | Call method on running node |
|
|
795
|
+
| `get_runtime_metrics` | Get performance metrics |
|
|
796
|
+
|
|
797
|
+
### UID Tools (2)
|
|
798
|
+
| Tool | Description |
|
|
799
|
+
|------|-------------|
|
|
800
|
+
| `get_uid` | Get file UID (Godot 4.4+) |
|
|
801
|
+
| `update_project_uids` | Regenerate UIDs |
|
|
802
|
+
|
|
803
|
+
### Asset Library Tools (3)
|
|
804
|
+
| Tool | Description |
|
|
805
|
+
|------|-------------|
|
|
806
|
+
| `search_assets` | Search CC0 assets across Poly Haven, AmbientCG, and Kenney |
|
|
807
|
+
| `fetch_asset` | Download asset to your Godot project |
|
|
808
|
+
| `list_asset_providers` | List available providers and their capabilities |
|
|
809
|
+
|
|
810
|
+
### Screenshot Tools (2)
|
|
811
|
+
| Tool | Description |
|
|
812
|
+
|------|-------------|
|
|
813
|
+
| `capture_screenshot` | Capture running game viewport as base64 image |
|
|
814
|
+
| `capture_viewport` | Capture a specific viewport node's texture |
|
|
815
|
+
|
|
816
|
+
### Input Injection Tools (4)
|
|
817
|
+
| Tool | Description |
|
|
818
|
+
|------|-------------|
|
|
819
|
+
| `inject_action` | Simulate Godot input action press/release |
|
|
820
|
+
| `inject_key` | Simulate keyboard key event with modifiers |
|
|
821
|
+
| `inject_mouse_click` | Simulate mouse click at position |
|
|
822
|
+
| `inject_mouse_motion` | Simulate mouse movement |
|
|
823
|
+
|
|
824
|
+
### GDScript LSP Tools (4)
|
|
825
|
+
| Tool | Description |
|
|
826
|
+
|------|-------------|
|
|
827
|
+
| `lsp_get_diagnostics` | Get errors/warnings from Godot Language Server |
|
|
828
|
+
| `lsp_get_completions` | Get code completions at a position |
|
|
829
|
+
| `lsp_get_hover` | Get hover info for a symbol |
|
|
830
|
+
| `lsp_get_symbols` | Get document symbol outline |
|
|
831
|
+
|
|
832
|
+
### DAP (Debug) Tools (7)
|
|
833
|
+
| Tool | Description |
|
|
834
|
+
|------|-------------|
|
|
835
|
+
| `dap_get_output` | Get captured debug console output |
|
|
836
|
+
| `dap_set_breakpoint` | Set breakpoint in a GDScript file |
|
|
837
|
+
| `dap_remove_breakpoint` | Remove a breakpoint |
|
|
838
|
+
| `dap_continue` | Continue execution after breakpoint |
|
|
839
|
+
| `dap_pause` | Pause running debug target |
|
|
840
|
+
| `dap_step_over` | Step over current line |
|
|
841
|
+
| `dap_get_stack_trace` | Get current stack trace |
|
|
842
|
+
|
|
843
|
+
---
|
|
844
|
+
|
|
845
|
+
## Architecture
|
|
846
|
+
|
|
847
|
+
GoPeak uses a hybrid architecture:
|
|
848
|
+
|
|
849
|
+
1. **Direct CLI Commands**: Simple operations use Godot's built-in CLI
|
|
850
|
+
2. **Bundled GDScript**: Complex operations use a comprehensive `godot_operations.gd` script with ClassDB introspection
|
|
851
|
+
3. **Runtime Addon**: TCP server (port 7777) for live debugging, screenshot capture, and input injection
|
|
852
|
+
4. **Godot LSP Integration**: Connects to Godot editor's Language Server (port 6005) for GDScript diagnostics
|
|
853
|
+
5. **Godot DAP Integration**: Connects to Godot editor's Debug Adapter (port 6006) for breakpoints and stepping
|
|
854
|
+
6. **MCP Resources**: `godot://` URI protocol for direct project file access
|
|
855
|
+
|
|
856
|
+
**Key Design Decisions:**
|
|
857
|
+
- **ClassDB-based dynamic approach**: Instead of hardcoding tools for every Godot class, generic tools (`add_node`, `create_resource`) work with ANY class. AI discovers capabilities via `query_classes` and `query_class_info`
|
|
858
|
+
- **Type-safe serialization**: Automatic conversion for Vector2, Vector3, Color, Rect2, NodePath, and other Godot types
|
|
859
|
+
- **No temporary files**: Everything runs through the bundled GDScript operations dispatcher
|
|
860
|
+
- **Consistent error handling**: All operations validate inputs and provide meaningful error messages
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
## Troubleshooting
|
|
865
|
+
|
|
866
|
+
| Issue | Solution |
|
|
867
|
+
|-------|----------|
|
|
868
|
+
| Godot not found | Set `GODOT_PATH` environment variable |
|
|
869
|
+
| Connection issues | Restart your AI assistant |
|
|
870
|
+
| Invalid project path | Ensure path contains `project.godot` |
|
|
871
|
+
| Build errors | Run `npm install` to install dependencies |
|
|
872
|
+
| Runtime tools not working | Install and enable the addon in your project |
|
|
873
|
+
|
|
874
|
+
---
|
|
875
|
+
|
|
876
|
+
## Contributing
|
|
877
|
+
|
|
878
|
+
Contributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
|
|
879
|
+
|
|
880
|
+
---
|
|
881
|
+
|
|
882
|
+
## License
|
|
883
|
+
|
|
884
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
885
|
+
|
|
886
|
+
---
|
|
887
|
+
|
|
888
|
+
## Stats
|
|
889
|
+
|
|
890
|
+
- **95+ Tools** — comprehensive tools covering scene management, scripting, resources, animation, configuration, debugging, screenshots, input injection, LSP, DAP, and asset management
|
|
891
|
+
- **MCP Resources** — `godot://` URI protocol for direct project file access
|
|
892
|
+
- **GDScript LSP** — real-time diagnostics, completions, hover, and symbols via Godot's Language Server
|
|
893
|
+
- **Debug Adapter (DAP)** — breakpoints, stepping, stack traces, and console output capture
|
|
894
|
+
- **Screenshot Capture** — viewport capture from running games via runtime addon
|
|
895
|
+
- **Input Injection** — keyboard, mouse, and action simulation for automated testing
|
|
896
|
+
- **ClassDB Introspection** — AI dynamically discovers Godot classes, properties, and methods instead of relying on hardcoded tool definitions
|
|
897
|
+
- **20,000+ lines** of TypeScript and GDScript
|
|
898
|
+
- **~85% coverage** of Godot Engine's capabilities
|
|
899
|
+
- **Godot 4.x** full support (including 4.4+ UID features)
|
|
900
|
+
- **Auto Reload** plugin for seamless MCP integration
|
|
901
|
+
- **Multi-Source Asset Library** with CC0 assets from Poly Haven, AmbientCG, and Kenney
|
|
902
|
+
- **npm package** — install with `npx gopeak` or `npm install -g gopeak`
|
|
903
|
+
|
|
904
|
+
---
|
|
905
|
+
|
|
906
|
+
## Credits
|
|
907
|
+
|
|
908
|
+
- Original MCP server by [Coding-Solo](https://github.com/Coding-Solo/godot-mcp)
|
|
909
|
+
- Auto Reload plugin and unified package by [HaD0Yun](https://github.com/HaD0Yun)
|