godot-mcp-runtime 2.2.0 → 2.2.2
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/README.md +61 -64
- package/dist/dispatch.d.ts +26 -0
- package/dist/dispatch.d.ts.map +1 -0
- package/dist/dispatch.js +70 -0
- package/dist/dispatch.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -118
- package/dist/index.js.map +1 -1
- package/dist/scripts/godot_operations.gd +1117 -1117
- package/dist/scripts/mcp_bridge.gd +9 -1
- package/dist/tools/node-tools.d.ts +1 -1
- package/dist/tools/node-tools.d.ts.map +1 -1
- package/dist/tools/node-tools.js +168 -56
- package/dist/tools/node-tools.js.map +1 -1
- package/dist/tools/project-tools.d.ts +4 -11
- package/dist/tools/project-tools.d.ts.map +1 -1
- package/dist/tools/project-tools.js +489 -153
- package/dist/tools/project-tools.js.map +1 -1
- package/dist/tools/scene-tools.d.ts +1 -1
- package/dist/tools/scene-tools.d.ts.map +1 -1
- package/dist/tools/scene-tools.js +168 -44
- package/dist/tools/scene-tools.js.map +1 -1
- package/dist/tools/validate-tools.d.ts +1 -1
- package/dist/tools/validate-tools.d.ts.map +1 -1
- package/dist/tools/validate-tools.js +44 -15
- package/dist/tools/validate-tools.js.map +1 -1
- package/dist/utils/godot-runner.d.ts +39 -1
- package/dist/utils/godot-runner.d.ts.map +1 -1
- package/dist/utils/godot-runner.js +200 -36
- package/dist/utils/godot-runner.js.map +1 -1
- package/package.json +22 -4
package/README.md
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
# Godot MCP Runtime
|
|
2
2
|
|
|
3
|
+
<a href="https://glama.ai/mcp/servers/@Erodenn/godot-mcp-runtime">
|
|
4
|
+
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Erodenn/godot-runtime-mcp/badge" alt="godot-runtime-mcp MCP server" />
|
|
5
|
+
</a>
|
|
6
|
+
|
|
7
|
+
[](https://modelcontextprotocol.io/introduction)
|
|
3
8
|
[](https://www.npmjs.com/package/godot-mcp-runtime)
|
|
4
9
|
[](https://www.npmjs.com/package/godot-mcp-runtime)
|
|
5
10
|
[](LICENSE)
|
|
6
11
|
[](https://nodejs.org/)
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
When you run a project through this server, it injects a lightweight UDP bridge as an autoload, and suddenly the AI can interact with your game the same way a player would: press keys, click buttons, read what's on screen, and run arbitrary code against the live scene tree.
|
|
13
|
+
A lightweight [MCP](https://modelcontextprotocol.io/) server that gives AI assistants direct access to a running [Godot](https://godotengine.org/) 4.x game. Not just file editing, not just scene manipulation. Actual runtime control: input simulation, screenshots, UI discovery, and live GDScript execution while the game is running.
|
|
11
14
|
|
|
12
15
|
**The distinction matters: the AI doesn't just write your game, it can check its work.**
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
When you run a project through this server, it injects a lightweight UDP bridge as an autoload, and suddenly the AI can interact with your game the same way a player would: press keys, click buttons, read what's on screen, and run arbitrary code against the live scene tree.
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
**No addon required.** Most Godot MCP servers that offer runtime support ship as a Godot addon — something you install into your project, commit to version control, and manage as a dependency. All this server needs is Node.js and a Godot executable: no addon installation, no project modifications, no cleanup.
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
Think of it as [Playwright MCP](https://github.com/microsoft/playwright-mcp), but for Godot. This does the same thing for games: run the project, take a screenshot, simulate input, read what's on screen, execute a script against the live scene tree. The agent closes the loop on its own changes rather than handing off to you to verify.
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
This is not a playtesting replacement. It doesn't catch the subtle feel issues that only a human notices, and it won't tell you if your game is fun. What it does is let an agent confirm that a scene loads, a button responds, a value updated, a script ran without errors. The ability to check work is crucial for AI driven workflows.
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Erodenn/godot-runtime-mcp/badge" alt="godot-runtime-mcp MCP server" />
|
|
24
|
-
</a>
|
|
25
|
+
Each tool teaches agents how to use it through its description and response messages: what to call next, when to wait, and how to recover from errors. Every operation is its own tool with only its relevant parameters, no operation discriminators and no conditional schemas. This server is built for agents.
|
|
25
26
|
|
|
26
27
|
## What It Does
|
|
27
28
|
|
|
@@ -121,73 +122,73 @@ Ask your AI assistant to call `get_project_info`. If it returns a Godot version
|
|
|
121
122
|
|
|
122
123
|
### Project Management
|
|
123
124
|
|
|
124
|
-
| Tool
|
|
125
|
-
|
|
126
|
-
| `launch_editor`
|
|
127
|
-
| `run_project`
|
|
128
|
-
| `attach_project`
|
|
129
|
-
| `detach_project`
|
|
130
|
-
| `stop_project`
|
|
131
|
-
| `get_debug_output` | Read stdout/stderr from an MCP-spawned project (unavailable in attached mode)
|
|
132
|
-
| `list_projects`
|
|
133
|
-
| `get_project_info` | Get project metadata and Godot version
|
|
125
|
+
| Tool | Description |
|
|
126
|
+
| ------------------ | -------------------------------------------------------------------------------------- |
|
|
127
|
+
| `launch_editor` | Open the Godot editor GUI for a project |
|
|
128
|
+
| `run_project` | Run a project and inject the MCP bridge. Pass `background: true` to hide the window |
|
|
129
|
+
| `attach_project` | Inject the MCP bridge for a project you'll launch yourself |
|
|
130
|
+
| `detach_project` | Remove the injected bridge after manual-launch use, leaving the external process alone |
|
|
131
|
+
| `stop_project` | Stop the running project and remove the bridge (also detaches attached-mode state) |
|
|
132
|
+
| `get_debug_output` | Read stdout/stderr from an MCP-spawned project (unavailable in attached mode) |
|
|
133
|
+
| `list_projects` | Find Godot projects in a directory |
|
|
134
|
+
| `get_project_info` | Get project metadata and Godot version |
|
|
134
135
|
|
|
135
136
|
### Runtime (requires `run_project` or `attach_project` first)
|
|
136
137
|
|
|
137
138
|
After `run_project`, or after `attach_project` plus launching Godot manually, wait 2-3 seconds for the bridge to initialize before using these tools.
|
|
138
139
|
|
|
139
|
-
| Tool
|
|
140
|
-
|
|
141
|
-
| `take_screenshot` | Capture a PNG of the running viewport
|
|
142
|
-
| `simulate_input`
|
|
143
|
-
| `get_ui_elements` | Get all visible Control nodes with positions, types, and text
|
|
144
|
-
| `run_script`
|
|
140
|
+
| Tool | Description |
|
|
141
|
+
| ----------------- | ---------------------------------------------------------------- |
|
|
142
|
+
| `take_screenshot` | Capture a PNG of the running viewport |
|
|
143
|
+
| `simulate_input` | Send batched input: key, mouse, click_element, action, wait |
|
|
144
|
+
| `get_ui_elements` | Get all visible Control nodes with positions, types, and text |
|
|
145
|
+
| `run_script` | Execute arbitrary GDScript at runtime with full SceneTree access |
|
|
145
146
|
|
|
146
147
|
### Scene Editing (headless)
|
|
147
148
|
|
|
148
149
|
All mutation operations save automatically. Use `save_scene` only for save-as (`newPath`) or to re-canonicalize a `.tscn` file.
|
|
149
150
|
|
|
150
|
-
| Tool
|
|
151
|
-
|
|
152
|
-
| `create_scene`
|
|
153
|
-
| `add_node`
|
|
154
|
-
| `load_sprite`
|
|
155
|
-
| `save_scene`
|
|
156
|
-
| `export_mesh_library`
|
|
151
|
+
| Tool | Description |
|
|
152
|
+
| ------------------------ | -------------------------------------------------------------------- |
|
|
153
|
+
| `create_scene` | Create a new scene file |
|
|
154
|
+
| `add_node` | Add a node to an existing scene (supports promoted spatial params) |
|
|
155
|
+
| `load_sprite` | Set a texture on a Sprite2D, Sprite3D, or TextureRect |
|
|
156
|
+
| `save_scene` | Re-pack and save the scene, or save-as with `newPath` |
|
|
157
|
+
| `export_mesh_library` | Export scenes as a MeshLibrary for GridMap |
|
|
157
158
|
| `batch_scene_operations` | Run multiple add_node/load_sprite/save ops in a single Godot process |
|
|
158
159
|
|
|
159
160
|
### Node Editing (headless)
|
|
160
161
|
|
|
161
162
|
All mutation operations save automatically.
|
|
162
163
|
|
|
163
|
-
| Tool
|
|
164
|
-
|
|
165
|
-
| `get_scene_tree`
|
|
166
|
-
| `get_node_properties`
|
|
167
|
-
| `batch_get_node_properties` | Read properties from multiple nodes in one process
|
|
168
|
-
| `set_node_property`
|
|
169
|
-
| `batch_set_node_properties` | Set multiple properties in one process
|
|
170
|
-
| `attach_script`
|
|
171
|
-
| `duplicate_node`
|
|
172
|
-
| `delete_node`
|
|
173
|
-
| `get_node_signals`
|
|
174
|
-
| `connect_signal`
|
|
175
|
-
| `disconnect_signal`
|
|
164
|
+
| Tool | Description |
|
|
165
|
+
| --------------------------- | ------------------------------------------------------------------------- |
|
|
166
|
+
| `get_scene_tree` | Get the full scene tree hierarchy (use `maxDepth: 1` for shallow listing) |
|
|
167
|
+
| `get_node_properties` | Read properties from a node |
|
|
168
|
+
| `batch_get_node_properties` | Read properties from multiple nodes in one process |
|
|
169
|
+
| `set_node_property` | Set a property on a node |
|
|
170
|
+
| `batch_set_node_properties` | Set multiple properties in one process |
|
|
171
|
+
| `attach_script` | Attach a GDScript to a node |
|
|
172
|
+
| `duplicate_node` | Duplicate a node within the scene |
|
|
173
|
+
| `delete_node` | Remove a node from the scene |
|
|
174
|
+
| `get_node_signals` | List all signals on a node with their connections |
|
|
175
|
+
| `connect_signal` | Connect a signal to a method on another node |
|
|
176
|
+
| `disconnect_signal` | Disconnect a signal connection |
|
|
176
177
|
|
|
177
178
|
### Project Config (no Godot process required)
|
|
178
179
|
|
|
179
180
|
These tools edit `project.godot` directly or read the filesystem. Safe to use even when autoloads are broken.
|
|
180
181
|
|
|
181
|
-
| Tool
|
|
182
|
-
|
|
183
|
-
| `list_autoloads`
|
|
184
|
-
| `add_autoload`
|
|
185
|
-
| `remove_autoload`
|
|
186
|
-
| `update_autoload`
|
|
187
|
-
| `get_project_settings`
|
|
188
|
-
| `get_project_files`
|
|
189
|
-
| `search_project`
|
|
190
|
-
| `get_scene_dependencies` | List all resources a scene depends on
|
|
182
|
+
| Tool | Description |
|
|
183
|
+
| ------------------------ | ------------------------------------------------------------- |
|
|
184
|
+
| `list_autoloads` | List all registered autoloads with paths and singleton status |
|
|
185
|
+
| `add_autoload` | Register a new autoload |
|
|
186
|
+
| `remove_autoload` | Unregister an autoload by name |
|
|
187
|
+
| `update_autoload` | Modify an existing autoload's path or singleton flag |
|
|
188
|
+
| `get_project_settings` | Read settings from `project.godot` by section and key |
|
|
189
|
+
| `get_project_files` | Get the project file tree with types and extensions |
|
|
190
|
+
| `search_project` | Search for a string across project source files |
|
|
191
|
+
| `get_scene_dependencies` | List all resources a scene depends on |
|
|
191
192
|
|
|
192
193
|
### Validation: `validate`
|
|
193
194
|
|
|
@@ -195,10 +196,10 @@ Validate before attaching or running. Catches syntax errors and missing resource
|
|
|
195
196
|
|
|
196
197
|
### UIDs: `manage_uids` (Godot 4.4+)
|
|
197
198
|
|
|
198
|
-
| Operation | Description
|
|
199
|
-
|
|
200
|
-
| `get`
|
|
201
|
-
| `update`
|
|
199
|
+
| Operation | Description |
|
|
200
|
+
| --------- | --------------------------------------------- |
|
|
201
|
+
| `get` | Get a resource's UID |
|
|
202
|
+
| `update` | Resave all resources to update UID references |
|
|
202
203
|
|
|
203
204
|
## Architecture
|
|
204
205
|
|
|
@@ -231,10 +232,6 @@ When `run_project` or `attach_project` is called:
|
|
|
231
232
|
|
|
232
233
|
Files generated during runtime (screenshots, executed scripts) are stored in `.mcp/` inside the project directory. This directory is automatically added to `.gitignore` and has a `.gdignore` so Godot won't import it.
|
|
233
234
|
|
|
234
|
-
## Broken Autoloads
|
|
235
|
-
|
|
236
|
-
If any registered autoload fails to initialize (syntax error, missing resource, display dependency), Godot's headless process will crash before any operation runs. Use `list_autoloads` and `remove_autoload` to inspect and remove the failing autoload. These tools edit `project.godot` directly, with no Godot process involved.
|
|
237
|
-
|
|
238
235
|
## Acknowledgments
|
|
239
236
|
|
|
240
237
|
Built on the foundation laid by [Coding-Solo/godot-mcp](https://github.com/Coding-Solo/godot-mcp) for headless Godot operations.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool dispatch table.
|
|
3
|
+
*
|
|
4
|
+
* Maps every MCP tool name to a handler that takes the runner + raw args and
|
|
5
|
+
* returns the tool response. Extracted from index.ts so tests can exercise
|
|
6
|
+
* dispatch as a pure data structure (no Server / stdio / lifecycle setup).
|
|
7
|
+
*
|
|
8
|
+
* Behavioral contract preserved from the original switch in index.ts:
|
|
9
|
+
* - Each name routes to the same handler it did before.
|
|
10
|
+
* - Unknown tool names throw McpError(MethodNotFound, ...) — see
|
|
11
|
+
* `dispatchToolCall`.
|
|
12
|
+
*/
|
|
13
|
+
import type { GodotRunner, OperationParams } from './utils/godot-runner.js';
|
|
14
|
+
export interface ToolResponse {
|
|
15
|
+
content: Array<{
|
|
16
|
+
type: string;
|
|
17
|
+
text?: string;
|
|
18
|
+
[k: string]: unknown;
|
|
19
|
+
}>;
|
|
20
|
+
isError?: boolean;
|
|
21
|
+
[k: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
export type ToolHandler = (runner: GodotRunner, args: OperationParams) => Promise<ToolResponse> | ToolResponse;
|
|
24
|
+
export declare const toolDispatch: Record<string, ToolHandler>;
|
|
25
|
+
export declare function dispatchToolCall(runner: GodotRunner, toolName: string, args: OperationParams): Promise<ToolResponse>;
|
|
26
|
+
//# sourceMappingURL=dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAmD5E,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AACD,MAAM,MAAM,WAAW,GAAG,CACxB,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,eAAe,KAClB,OAAO,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;AAE1C,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CA+CpD,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,YAAY,CAAC,CAMvB"}
|
package/dist/dispatch.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool dispatch table.
|
|
3
|
+
*
|
|
4
|
+
* Maps every MCP tool name to a handler that takes the runner + raw args and
|
|
5
|
+
* returns the tool response. Extracted from index.ts so tests can exercise
|
|
6
|
+
* dispatch as a pure data structure (no Server / stdio / lifecycle setup).
|
|
7
|
+
*
|
|
8
|
+
* Behavioral contract preserved from the original switch in index.ts:
|
|
9
|
+
* - Each name routes to the same handler it did before.
|
|
10
|
+
* - Unknown tool names throw McpError(MethodNotFound, ...) — see
|
|
11
|
+
* `dispatchToolCall`.
|
|
12
|
+
*/
|
|
13
|
+
import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js';
|
|
14
|
+
import { handleLaunchEditor, handleRunProject, handleAttachProject, handleDetachProject, handleGetDebugOutput, handleStopProject, handleListProjects, handleGetProjectInfo, handleTakeScreenshot, handleSimulateInput, handleGetUiElements, handleRunScript, handleListAutoloads, handleAddAutoload, handleRemoveAutoload, handleUpdateAutoload, handleGetProjectFiles, handleSearchProject, handleGetSceneDependencies, handleGetProjectSettings, } from './tools/project-tools.js';
|
|
15
|
+
import { handleCreateScene, handleAddNode, handleLoadSprite, handleSaveScene, handleExportMeshLibrary, handleBatchSceneOperations, handleManageUids, } from './tools/scene-tools.js';
|
|
16
|
+
import { handleDeleteNode, handleSetNodeProperty, handleBatchSetNodeProperties, handleGetNodeProperties, handleBatchGetNodeProperties, handleAttachScript, handleGetSceneTree, handleDuplicateNode, handleGetNodeSignals, handleConnectSignal, handleDisconnectSignal, } from './tools/node-tools.js';
|
|
17
|
+
import { handleValidate } from './tools/validate-tools.js';
|
|
18
|
+
export const toolDispatch = {
|
|
19
|
+
// Project tools
|
|
20
|
+
launch_editor: (runner, args) => handleLaunchEditor(runner, args),
|
|
21
|
+
run_project: (runner, args) => handleRunProject(runner, args),
|
|
22
|
+
attach_project: (runner, args) => handleAttachProject(runner, args),
|
|
23
|
+
detach_project: (runner) => handleDetachProject(runner),
|
|
24
|
+
get_debug_output: (runner, args) => handleGetDebugOutput(runner, args),
|
|
25
|
+
stop_project: (runner) => handleStopProject(runner),
|
|
26
|
+
list_projects: (_runner, args) => handleListProjects(args),
|
|
27
|
+
get_project_info: (runner, args) => handleGetProjectInfo(runner, args),
|
|
28
|
+
take_screenshot: (runner, args) => handleTakeScreenshot(runner, args),
|
|
29
|
+
simulate_input: (runner, args) => handleSimulateInput(runner, args),
|
|
30
|
+
get_ui_elements: (runner, args) => handleGetUiElements(runner, args),
|
|
31
|
+
run_script: (runner, args) => handleRunScript(runner, args),
|
|
32
|
+
list_autoloads: (_runner, args) => handleListAutoloads(args),
|
|
33
|
+
add_autoload: (_runner, args) => handleAddAutoload(args),
|
|
34
|
+
remove_autoload: (_runner, args) => handleRemoveAutoload(args),
|
|
35
|
+
update_autoload: (_runner, args) => handleUpdateAutoload(args),
|
|
36
|
+
get_project_files: (_runner, args) => handleGetProjectFiles(args),
|
|
37
|
+
search_project: (_runner, args) => handleSearchProject(args),
|
|
38
|
+
get_scene_dependencies: (_runner, args) => handleGetSceneDependencies(args),
|
|
39
|
+
get_project_settings: (_runner, args) => handleGetProjectSettings(args),
|
|
40
|
+
// Scene tools
|
|
41
|
+
create_scene: (runner, args) => handleCreateScene(runner, args),
|
|
42
|
+
add_node: (runner, args) => handleAddNode(runner, args),
|
|
43
|
+
load_sprite: (runner, args) => handleLoadSprite(runner, args),
|
|
44
|
+
save_scene: (runner, args) => handleSaveScene(runner, args),
|
|
45
|
+
export_mesh_library: (runner, args) => handleExportMeshLibrary(runner, args),
|
|
46
|
+
batch_scene_operations: (runner, args) => handleBatchSceneOperations(runner, args),
|
|
47
|
+
manage_uids: (runner, args) => handleManageUids(runner, args),
|
|
48
|
+
// Node tools
|
|
49
|
+
delete_node: (runner, args) => handleDeleteNode(runner, args),
|
|
50
|
+
set_node_property: (runner, args) => handleSetNodeProperty(runner, args),
|
|
51
|
+
batch_set_node_properties: (runner, args) => handleBatchSetNodeProperties(runner, args),
|
|
52
|
+
get_node_properties: (runner, args) => handleGetNodeProperties(runner, args),
|
|
53
|
+
batch_get_node_properties: (runner, args) => handleBatchGetNodeProperties(runner, args),
|
|
54
|
+
attach_script: (runner, args) => handleAttachScript(runner, args),
|
|
55
|
+
get_scene_tree: (runner, args) => handleGetSceneTree(runner, args),
|
|
56
|
+
duplicate_node: (runner, args) => handleDuplicateNode(runner, args),
|
|
57
|
+
get_node_signals: (runner, args) => handleGetNodeSignals(runner, args),
|
|
58
|
+
connect_signal: (runner, args) => handleConnectSignal(runner, args),
|
|
59
|
+
disconnect_signal: (runner, args) => handleDisconnectSignal(runner, args),
|
|
60
|
+
// Validate tools
|
|
61
|
+
validate: (runner, args) => handleValidate(runner, args),
|
|
62
|
+
};
|
|
63
|
+
export async function dispatchToolCall(runner, toolName, args) {
|
|
64
|
+
const handler = toolDispatch[toolName];
|
|
65
|
+
if (!handler) {
|
|
66
|
+
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${toolName}`);
|
|
67
|
+
}
|
|
68
|
+
return await handler(runner, args);
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=dispatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch.js","sourceRoot":"","sources":["../src/dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAIzE,OAAO,EACL,kBAAkB,EAClB,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to launch the Godot editor, run Godot projects,
|
|
7
7
|
* capture debug output, manipulate scenes and nodes, and more.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export declare const allToolDefinitions: import("./utils/godot-runner.js").ToolDefinition[];
|
|
10
|
+
export declare const serverInstructions = "Godot MCP Server \u2014 AI-driven Godot 4.x project manipulation.\n\nTool categories:\n- Project management: launch_editor, run_project, attach_project, detach_project, stop_project, get_debug_output, list_projects, get_project_info\n- Scene editing (headless): create_scene, add_node, load_sprite, save_scene, export_mesh_library, batch_scene_operations\n- Node editing (headless): delete_node, set_node_property, batch_set_node_properties, get_node_properties, batch_get_node_properties, attach_script, get_scene_tree, duplicate_node, get_node_signals, connect_signal, disconnect_signal\n- Runtime (requires run_project or attach_project): take_screenshot, simulate_input, get_ui_elements, run_script\n- Project config (no Godot process): list_autoloads, add_autoload, remove_autoload, update_autoload, get_project_files, search_project, get_scene_dependencies, get_project_settings\n- Validation: validate\n- UIDs (Godot 4.4+): manage_uids\n\nKey behaviors:\n- All mutation operations (add_node, set_node_property, delete_node, etc.) save the scene automatically. Only use save_scene for save-as (newPath) or re-canonicalization.\n- Headless Godot initializes ALL registered autoloads. If any autoload is broken, headless operations will fail. Use list_autoloads / remove_autoload to diagnose.\n- run_project verifies bridge readiness before returning success. If it reports degraded status, retry runtime tools after a moment or check get_debug_output.\n- attach_project is the fallback path for a manually launched Godot process. It injects the bridge and marks the project active, but it does not spawn Godot or capture stdout/stderr.\n- click_element in simulate_input resolves by node path or node name (BFS search), NOT by visible text. Use get_ui_elements to discover valid element identifiers.\n- run_script expects GDScript with \"extends RefCounted\" and \"func execute(scene_tree: SceneTree) -> Variant\".\n- run_project spawns Godot without -d so runtime errors do not pause execution; the `breakpoint` keyword in user code is a no-op (no debugger is attached). SCRIPT ERROR output and GDScript backtraces still appear in stderr.";
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAeH,eAAO,MAAM,kBAAkB,oDAK9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,qmEAkBmM,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,29 +8,20 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
10
10
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
11
|
-
import { CallToolRequestSchema,
|
|
11
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
12
12
|
import { GodotRunner } from './utils/godot-runner.js';
|
|
13
|
-
|
|
14
|
-
import { projectToolDefinitions
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.runner = new GodotRunner(config);
|
|
26
|
-
this.server = new Server({
|
|
27
|
-
name: 'godot-mcp',
|
|
28
|
-
version: '2.2.0',
|
|
29
|
-
}, {
|
|
30
|
-
capabilities: {
|
|
31
|
-
tools: {},
|
|
32
|
-
},
|
|
33
|
-
instructions: `Godot MCP Server — AI-driven Godot 4.x project manipulation.
|
|
13
|
+
import { dispatchToolCall } from './dispatch.js';
|
|
14
|
+
import { projectToolDefinitions } from './tools/project-tools.js';
|
|
15
|
+
import { sceneToolDefinitions } from './tools/scene-tools.js';
|
|
16
|
+
import { nodeToolDefinitions } from './tools/node-tools.js';
|
|
17
|
+
import { validateToolDefinitions } from './tools/validate-tools.js';
|
|
18
|
+
export const allToolDefinitions = [
|
|
19
|
+
...projectToolDefinitions,
|
|
20
|
+
...sceneToolDefinitions,
|
|
21
|
+
...nodeToolDefinitions,
|
|
22
|
+
...validateToolDefinitions,
|
|
23
|
+
];
|
|
24
|
+
export const serverInstructions = `Godot MCP Server — AI-driven Godot 4.x project manipulation.
|
|
34
25
|
|
|
35
26
|
Tool categories:
|
|
36
27
|
- Project management: launch_editor, run_project, attach_project, detach_project, stop_project, get_debug_output, list_projects, get_project_info
|
|
@@ -44,10 +35,24 @@ Tool categories:
|
|
|
44
35
|
Key behaviors:
|
|
45
36
|
- All mutation operations (add_node, set_node_property, delete_node, etc.) save the scene automatically. Only use save_scene for save-as (newPath) or re-canonicalization.
|
|
46
37
|
- Headless Godot initializes ALL registered autoloads. If any autoload is broken, headless operations will fail. Use list_autoloads / remove_autoload to diagnose.
|
|
47
|
-
-
|
|
38
|
+
- run_project verifies bridge readiness before returning success. If it reports degraded status, retry runtime tools after a moment or check get_debug_output.
|
|
48
39
|
- attach_project is the fallback path for a manually launched Godot process. It injects the bridge and marks the project active, but it does not spawn Godot or capture stdout/stderr.
|
|
49
40
|
- click_element in simulate_input resolves by node path or node name (BFS search), NOT by visible text. Use get_ui_elements to discover valid element identifiers.
|
|
50
|
-
- run_script expects GDScript with "extends RefCounted" and "func execute(scene_tree: SceneTree) -> Variant"
|
|
41
|
+
- run_script expects GDScript with "extends RefCounted" and "func execute(scene_tree: SceneTree) -> Variant".
|
|
42
|
+
- run_project spawns Godot without -d so runtime errors do not pause execution; the \`breakpoint\` keyword in user code is a no-op (no debugger is attached). SCRIPT ERROR output and GDScript backtraces still appear in stderr.`;
|
|
43
|
+
class GodotMcpServer {
|
|
44
|
+
server;
|
|
45
|
+
runner;
|
|
46
|
+
constructor(config) {
|
|
47
|
+
this.runner = new GodotRunner(config);
|
|
48
|
+
this.server = new Server({
|
|
49
|
+
name: 'godot-mcp',
|
|
50
|
+
version: '2.2.2',
|
|
51
|
+
}, {
|
|
52
|
+
capabilities: {
|
|
53
|
+
tools: {},
|
|
54
|
+
},
|
|
55
|
+
instructions: serverInstructions,
|
|
51
56
|
});
|
|
52
57
|
this.setupToolHandlers();
|
|
53
58
|
this.server.onerror = (error) => console.error('[MCP Error]', error);
|
|
@@ -66,106 +71,14 @@ Key behaviors:
|
|
|
66
71
|
await this.server.close();
|
|
67
72
|
}
|
|
68
73
|
setupToolHandlers() {
|
|
69
|
-
// Combine all tool definitions
|
|
70
|
-
const allTools = [
|
|
71
|
-
...projectToolDefinitions,
|
|
72
|
-
...sceneToolDefinitions,
|
|
73
|
-
...nodeToolDefinitions,
|
|
74
|
-
...validateToolDefinitions,
|
|
75
|
-
];
|
|
76
74
|
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
77
|
-
tools:
|
|
75
|
+
tools: allToolDefinitions,
|
|
78
76
|
}));
|
|
79
77
|
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
80
78
|
const toolName = request.params.name;
|
|
81
79
|
const args = request.params.arguments || {};
|
|
82
80
|
console.error(`[SERVER] Handling tool request: ${toolName}`);
|
|
83
|
-
|
|
84
|
-
// Project tools
|
|
85
|
-
case 'launch_editor':
|
|
86
|
-
return await handleLaunchEditor(this.runner, args);
|
|
87
|
-
case 'run_project':
|
|
88
|
-
return await handleRunProject(this.runner, args);
|
|
89
|
-
case 'attach_project':
|
|
90
|
-
return await handleAttachProject(this.runner, args);
|
|
91
|
-
case 'detach_project':
|
|
92
|
-
return handleDetachProject(this.runner);
|
|
93
|
-
case 'get_debug_output':
|
|
94
|
-
return handleGetDebugOutput(this.runner, args);
|
|
95
|
-
case 'stop_project':
|
|
96
|
-
return handleStopProject(this.runner);
|
|
97
|
-
case 'list_projects':
|
|
98
|
-
return await handleListProjects(args);
|
|
99
|
-
case 'get_project_info':
|
|
100
|
-
return await handleGetProjectInfo(this.runner, args);
|
|
101
|
-
case 'take_screenshot':
|
|
102
|
-
return await handleTakeScreenshot(this.runner, args);
|
|
103
|
-
case 'simulate_input':
|
|
104
|
-
return await handleSimulateInput(this.runner, args);
|
|
105
|
-
case 'get_ui_elements':
|
|
106
|
-
return await handleGetUiElements(this.runner, args);
|
|
107
|
-
case 'run_script':
|
|
108
|
-
return await handleRunScript(this.runner, args);
|
|
109
|
-
case 'list_autoloads':
|
|
110
|
-
return await handleListAutoloads(args);
|
|
111
|
-
case 'add_autoload':
|
|
112
|
-
return await handleAddAutoload(args);
|
|
113
|
-
case 'remove_autoload':
|
|
114
|
-
return await handleRemoveAutoload(args);
|
|
115
|
-
case 'update_autoload':
|
|
116
|
-
return await handleUpdateAutoload(args);
|
|
117
|
-
case 'get_project_files':
|
|
118
|
-
return await handleGetProjectFiles(args);
|
|
119
|
-
case 'search_project':
|
|
120
|
-
return await handleSearchProject(args);
|
|
121
|
-
case 'get_scene_dependencies':
|
|
122
|
-
return await handleGetSceneDependencies(args);
|
|
123
|
-
case 'get_project_settings':
|
|
124
|
-
return await handleGetProjectSettings(args);
|
|
125
|
-
// Scene tools
|
|
126
|
-
case 'create_scene':
|
|
127
|
-
return await handleCreateScene(this.runner, args);
|
|
128
|
-
case 'add_node':
|
|
129
|
-
return await handleAddNode(this.runner, args);
|
|
130
|
-
case 'load_sprite':
|
|
131
|
-
return await handleLoadSprite(this.runner, args);
|
|
132
|
-
case 'save_scene':
|
|
133
|
-
return await handleSaveScene(this.runner, args);
|
|
134
|
-
case 'export_mesh_library':
|
|
135
|
-
return await handleExportMeshLibrary(this.runner, args);
|
|
136
|
-
case 'batch_scene_operations':
|
|
137
|
-
return await handleBatchSceneOperations(this.runner, args);
|
|
138
|
-
case 'manage_uids':
|
|
139
|
-
return await handleManageUids(this.runner, args);
|
|
140
|
-
// Node tools
|
|
141
|
-
case 'delete_node':
|
|
142
|
-
return await handleDeleteNode(this.runner, args);
|
|
143
|
-
case 'set_node_property':
|
|
144
|
-
return await handleSetNodeProperty(this.runner, args);
|
|
145
|
-
case 'batch_set_node_properties':
|
|
146
|
-
return await handleBatchSetNodeProperties(this.runner, args);
|
|
147
|
-
case 'get_node_properties':
|
|
148
|
-
return await handleGetNodeProperties(this.runner, args);
|
|
149
|
-
case 'batch_get_node_properties':
|
|
150
|
-
return await handleBatchGetNodeProperties(this.runner, args);
|
|
151
|
-
case 'attach_script':
|
|
152
|
-
return await handleAttachScript(this.runner, args);
|
|
153
|
-
case 'get_scene_tree':
|
|
154
|
-
return await handleGetSceneTree(this.runner, args);
|
|
155
|
-
case 'duplicate_node':
|
|
156
|
-
return await handleDuplicateNode(this.runner, args);
|
|
157
|
-
case 'get_node_signals':
|
|
158
|
-
return await handleGetNodeSignals(this.runner, args);
|
|
159
|
-
case 'connect_signal':
|
|
160
|
-
return await handleConnectSignal(this.runner, args);
|
|
161
|
-
case 'disconnect_signal':
|
|
162
|
-
return await handleDisconnectSignal(this.runner, args);
|
|
163
|
-
// Validate tools
|
|
164
|
-
case 'validate':
|
|
165
|
-
return await handleValidate(this.runner, args);
|
|
166
|
-
default:
|
|
167
|
-
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${toolName}`);
|
|
168
|
-
}
|
|
81
|
+
return await dispatchToolCall(this.runner, toolName, args);
|
|
169
82
|
});
|
|
170
83
|
}
|
|
171
84
|
async run() {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAGnG,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,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