godot-mcp-runtime 3.0.0 → 3.1.1
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 +55 -67
- package/dist/dispatch.js +27 -27
- package/dist/dispatch.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/scripts/godot_operations.gd +150 -115
- package/dist/scripts/mcp_bridge.gd +19 -24
- package/dist/tools/autoload-tools.d.ts +8 -8
- package/dist/tools/autoload-tools.d.ts.map +1 -1
- package/dist/tools/autoload-tools.js +15 -11
- package/dist/tools/autoload-tools.js.map +1 -1
- package/dist/tools/node-tools.d.ts.map +1 -1
- package/dist/tools/node-tools.js +105 -25
- package/dist/tools/node-tools.js.map +1 -1
- package/dist/tools/project-tools.d.ts.map +1 -1
- package/dist/tools/project-tools.js +52 -15
- package/dist/tools/project-tools.js.map +1 -1
- package/dist/tools/runtime-tools.d.ts.map +1 -1
- package/dist/tools/runtime-tools.js +224 -28
- package/dist/tools/runtime-tools.js.map +1 -1
- package/dist/tools/scene-tools.d.ts.map +1 -1
- package/dist/tools/scene-tools.js +30 -12
- package/dist/tools/scene-tools.js.map +1 -1
- package/dist/tools/validate-tools.d.ts.map +1 -1
- package/dist/tools/validate-tools.js +89 -30
- package/dist/tools/validate-tools.js.map +1 -1
- package/dist/utils/autoload-ini.d.ts +6 -0
- package/dist/utils/autoload-ini.d.ts.map +1 -1
- package/dist/utils/autoload-ini.js +13 -0
- package/dist/utils/autoload-ini.js.map +1 -1
- package/dist/utils/bridge-manager.d.ts +18 -1
- package/dist/utils/bridge-manager.d.ts.map +1 -1
- package/dist/utils/bridge-manager.js +61 -11
- package/dist/utils/bridge-manager.js.map +1 -1
- package/dist/utils/bridge-protocol.d.ts +6 -3
- package/dist/utils/bridge-protocol.d.ts.map +1 -1
- package/dist/utils/bridge-protocol.js +28 -15
- package/dist/utils/bridge-protocol.js.map +1 -1
- package/dist/utils/godot-runner.d.ts +47 -3
- package/dist/utils/godot-runner.d.ts.map +1 -1
- package/dist/utils/godot-runner.js +239 -56
- package/dist/utils/godot-runner.js.map +1 -1
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,43 +1,62 @@
|
|
|
1
1
|
# Godot MCP Runtime
|
|
2
2
|
|
|
3
|
-
<
|
|
4
|
-
<img width="380" height="200" src="https://glama.ai/mcp/servers/@Erodenn/godot-runtime-mcp/badge" alt="godot-runtime-mcp MCP server"
|
|
5
|
-
</
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://glama.ai/mcp/servers/@Erodenn/godot-mcp-runtime"><img width="380" height="200" src="https://glama.ai/mcp/servers/@Erodenn/godot-runtime-mcp/badge" alt="godot-runtime-mcp MCP server"></a>
|
|
5
|
+
</p>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://modelcontextprotocol.io/introduction"><img src="https://badge.mcpx.dev?type=server" alt="MCP Server"></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/godot-mcp-runtime"><img src="https://img.shields.io/npm/v/godot-mcp-runtime" alt="npm version"></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/godot-mcp-runtime"><img src="https://img.shields.io/npm/dt/godot-mcp-runtime" alt="npm downloads"></a>
|
|
11
|
+
<a href="LICENSE"><img src="https://badgen.net/github/license/Erodenn/godot-mcp-runtime" alt="License: MIT"></a>
|
|
12
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/godot-mcp-runtime" alt="Node.js"></a>
|
|
13
|
+
</p>
|
|
12
14
|
|
|
13
|
-
A lightweight [MCP](https://modelcontextprotocol.io/) server that
|
|
15
|
+
A lightweight [MCP](https://modelcontextprotocol.io/) server that pairs comprehensive headless editing with full runtime control over a [Godot](https://godotengine.org/) 4.x project. Scene, node, autoload, and validation ops cover everything short of the most niche corners of the engine; the runtime bridge adds screenshots, input simulation, UI discovery, and live GDScript against the running scene tree.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
<p align="center"><img src="docs/assets/demo.gif" alt="Agent driving a Godot game via MCP runtime tools" width="1000"></p>
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
<h3 align="center">The AI doesn't just write your game, it can check its work.</h3>
|
|
20
|
+
<br>
|
|
18
21
|
|
|
19
|
-
**
|
|
22
|
+
- **Headless editing** — scenes, nodes, scripts, signals, validation, no editor window
|
|
23
|
+
- **Runtime control** — screenshots, input simulation, UI discovery, and live GDScript against the running game
|
|
24
|
+
- **Zero footprint** — no Godot addon, no project commits, auto-cleanup on shutdown
|
|
25
|
+
|
|
26
|
+
**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. Use npx and there's no install or setup needed.
|
|
20
27
|
|
|
21
28
|
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.
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
> [!NOTE]
|
|
31
|
+
> 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.
|
|
32
|
+
|
|
33
|
+
## Contents
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
- [What It Does](#what-it-does)
|
|
36
|
+
- [Quick Start](#quick-start)
|
|
37
|
+
- [Docs](#docs)
|
|
38
|
+
- [Acknowledgments](#acknowledgments)
|
|
39
|
+
- [License](#license)
|
|
26
40
|
|
|
27
41
|
## What It Does
|
|
28
42
|
|
|
29
|
-
**
|
|
43
|
+
**Built for agents.** Every tool is purpose-built and self-documenting. When something fails, the response tells the agent how to fix it; when something succeeds, it points toward the next step. The result is an AI that stays unstuck and self-corrects without needing you to nudge it along.
|
|
44
|
+
|
|
45
|
+
**Headless editing.** Create scenes, add nodes, set properties, attach scripts, connect signals, validate GDScript. All the standard operations, no editor window required.
|
|
30
46
|
|
|
31
|
-
**Runtime bridge.** When `run_project` or `attach_project` is called, the server injects `McpBridge` as an autoload. This opens a TCP listener
|
|
47
|
+
**Runtime bridge.** When `run_project` or `attach_project` is called, the server injects `McpBridge` as an autoload. This opens a localhost-only TCP listener (both auto-select a free port when `bridgePort` is omitted; pass `bridgePort` to pin a specific port) and enables:
|
|
32
48
|
|
|
33
49
|
- **Screenshots:** Capture the viewport — by default returns a 960x540 preview inline plus the full PNG on disk; use `responseMode: 'full'` for pixel-perfect or `'path_only'` to skip the inline image
|
|
34
50
|
- **Input simulation:** Batched sequences of key presses, mouse clicks, mouse motion, UI element clicks by name or path, Godot action events, and timed waits
|
|
35
51
|
- **UI discovery:** Walk the live scene tree and collect every visible Control node with its position, type, text content, and disabled state
|
|
36
52
|
- **Live script execution:** Compile and run arbitrary GDScript with full SceneTree access while the game is running
|
|
37
53
|
|
|
38
|
-
**Background mode.** Pass `background: true` to `run_project` and the Godot window moves off-screen with physical input blocked: borderless, unfocusable, mouse-passthrough. Programmatic input, screenshots, and all runtime tools work exactly the same. Useful for automated agent-driven testing where the window shouldn't be visible or interactive.
|
|
54
|
+
**Background mode.** Pass `background: true` to `run_project` and the Godot window moves off-screen (positioned at `(-9999, -9999)`) with physical input blocked: borderless, unfocusable, mouse-passthrough. Programmatic input, screenshots, and all runtime tools work exactly the same. Useful for automated agent-driven testing where the window shouldn't be visible or interactive.
|
|
39
55
|
|
|
40
|
-
**Manual attach mode.** When something other than MCP launches the game (a CI pipeline, an external debugger, your own shell), call `attach_project` first. It injects the bridge and marks the project active without spawning Godot, so when you launch the game manually, runtime tools work against it.
|
|
56
|
+
**Manual attach mode.** When something other than MCP launches the game (a CI pipeline, an external debugger, your own shell), call `attach_project` first. It injects the bridge and marks the project active without spawning Godot, so when you launch the game manually, runtime tools work against it. Use `detach_project` when done.
|
|
57
|
+
|
|
58
|
+
> [!IMPORTANT]
|
|
59
|
+
> `get_debug_output` is unavailable in attached mode. stdout and stderr only flow through processes MCP started itself, so when Godot is launched externally there's no captured output to return. Use `run_project` if you need the debug stream.
|
|
41
60
|
|
|
42
61
|
The bridge cleans itself up automatically when `stop_project` or `detach_project` is called. No leftover autoloads, no modified project files.
|
|
43
62
|
|
|
@@ -112,62 +131,31 @@ npm run build
|
|
|
112
131
|
}
|
|
113
132
|
```
|
|
114
133
|
|
|
134
|
+
> [!TIP]
|
|
135
|
+
> **Prefer pnpm?** All three install paths work with pnpm. Substitute `pnpm dlx godot-mcp-runtime` for `npx -y godot-mcp-runtime`, `pnpm add -g godot-mcp-runtime` for the global install, or `pnpm install && pnpm run build` for the source build. pnpm ships stronger defaults against npm supply-chain attacks; see [pnpm's supply chain security guide](https://pnpm.io/supply-chain-security).
|
|
136
|
+
|
|
115
137
|
If Godot is on your `PATH`, you can omit `GODOT_PATH` entirely. The server will auto-detect it. Set `"DEBUG": "true"` in `env` for verbose logging.
|
|
116
138
|
|
|
139
|
+
> [!IMPORTANT]
|
|
140
|
+
> **Windows path gotchas.** `GODOT_PATH` must point at the Godot executable itself, not its install folder. Backslashes in JSON must be escaped or replaced with forward slashes:
|
|
141
|
+
>
|
|
142
|
+
> ```json
|
|
143
|
+
> "GODOT_PATH": "D:\\Godot\\Godot_v4.4-stable_win64.exe"
|
|
144
|
+
> // or equivalently
|
|
145
|
+
> "GODOT_PATH": "D:/Godot/Godot_v4.4-stable_win64.exe"
|
|
146
|
+
> ```
|
|
147
|
+
>
|
|
148
|
+
> Setting the variable from a wrapper `.bat` does not propagate to the MCP server — the path must live in the client's `env` block above.
|
|
149
|
+
|
|
117
150
|
### Verify
|
|
118
151
|
|
|
119
152
|
Ask your AI assistant to call `get_project_info`. If it returns a Godot version string (e.g., `4.4.stable`), you're connected and working.
|
|
120
153
|
|
|
121
|
-
##
|
|
122
|
-
|
|
123
|
-
See [`docs/tools.md`](docs/tools.md) for the full tool reference, grouped by category. Authoring standards for adding or modifying tools live in [`docs/tool-authoring.md`](docs/tool-authoring.md).
|
|
124
|
-
|
|
125
|
-
## Architecture
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
src/
|
|
129
|
-
├── index.ts # MCP server entry point, server setup
|
|
130
|
-
├── dispatch.ts # Tool-name → handler dispatch table
|
|
131
|
-
├── tools/
|
|
132
|
-
│ ├── project-tools.ts # Project introspection (list_projects, get_project_info, files, search, settings, scene_dependencies)
|
|
133
|
-
│ ├── runtime-tools.ts # Runtime/lifecycle (run_project, attach_project, take_screenshot, etc.)
|
|
134
|
-
│ ├── autoload-tools.ts # Autoload management (list/add/remove/update_autoload)
|
|
135
|
-
│ ├── scene-tools.ts # Scene creation, node addition, sprite loading, batch ops
|
|
136
|
-
│ ├── node-tools.ts # Node properties, scripts, tree, duplication, signals
|
|
137
|
-
│ └── validate-tools.ts # GDScript and scene validation
|
|
138
|
-
├── scripts/
|
|
139
|
-
│ ├── godot_operations.gd # Headless GDScript operations
|
|
140
|
-
│ └── mcp_bridge.gd # TCP autoload for runtime communication
|
|
141
|
-
└── utils/
|
|
142
|
-
├── godot-runner.ts # Process spawning, output parsing, shared validation helpers
|
|
143
|
-
├── handler-helpers.ts # executeSceneOp wrapper for headless-op handlers
|
|
144
|
-
├── bridge-manager.ts # McpBridge artifact lifecycle (inject, cleanup, repair)
|
|
145
|
-
├── bridge-protocol.ts # TCP framing (length-prefixed frames, port resolution)
|
|
146
|
-
├── autoload-ini.ts # project.godot [autoload] INI primitives
|
|
147
|
-
└── logger.ts # logDebug / logError helpers
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Headless operations spawn Godot with `--headless --script godot_operations.gd`, perform the operation, and return JSON. Runtime operations communicate over a long-lived TCP connection with the injected `McpBridge` autoload (4-byte big-endian length prefix + UTF-8 JSON frames).
|
|
151
|
-
|
|
152
|
-
## How the Bridge Works
|
|
153
|
-
|
|
154
|
-
When `run_project` or `attach_project` is called:
|
|
155
|
-
|
|
156
|
-
1. `mcp_bridge.gd` is copied into the project directory
|
|
157
|
-
2. It's registered as an autoload in `project.godot`
|
|
158
|
-
3. Godot launches with the bridge listening on `127.0.0.1:9900` (override with `MCP_BRIDGE_PORT`). With `run_project`, MCP spawns the process; with `attach_project`, you launch it yourself.
|
|
159
|
-
4. The Node side opens a long-lived TCP connection on first runtime call and sends framed JSON commands; the bridge replies on the same connection
|
|
160
|
-
5. `stop_project` or `detach_project` sends a `shutdown` command (so the bridge releases the port cleanly), then removes the bridge script and autoload entry
|
|
161
|
-
|
|
162
|
-
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.
|
|
163
|
-
|
|
164
|
-
`take_screenshot` defaults to `responseMode: "preview"` — the full PNG is saved to `.mcp/screenshots/` and a 960x540-bounded preview is returned inline. Override per call:
|
|
165
|
-
|
|
166
|
-
- `responseMode: "full"` — return the full inline PNG when the agent needs to inspect exact pixels, small UI text, or texture detail.
|
|
167
|
-
- `responseMode: "path_only"` — skip the inline image entirely when another tool or human will inspect the saved file.
|
|
168
|
-
- `previewMaxWidth` / `previewMaxHeight` — override the default 960x540 preview bounds (e.g. `{ "responseMode": "preview", "previewMaxWidth": 480, "previewMaxHeight": 270 }`).
|
|
154
|
+
## Docs
|
|
169
155
|
|
|
170
|
-
|
|
156
|
+
- [`docs/tools.md`](docs/tools.md) — full tool reference, grouped by category
|
|
157
|
+
- [`docs/tool-authoring.md`](docs/tool-authoring.md) — standards for adding or modifying tools
|
|
158
|
+
- [`docs/architecture.md`](docs/architecture.md) — source layout, bridge sequence diagram, lifecycle steps, runtime artifact behavior
|
|
171
159
|
|
|
172
160
|
## Acknowledgments
|
|
173
161
|
|
package/dist/dispatch.js
CHANGED
|
@@ -19,18 +19,18 @@ import { handleDeleteNodes, handleSetNodeProperties, handleGetNodeProperties, ha
|
|
|
19
19
|
import { handleValidate } from './tools/validate-tools.js';
|
|
20
20
|
export const toolDispatch = {
|
|
21
21
|
// Project tools
|
|
22
|
-
launch_editor:
|
|
23
|
-
run_project:
|
|
24
|
-
attach_project:
|
|
25
|
-
detach_project:
|
|
26
|
-
get_debug_output:
|
|
27
|
-
stop_project:
|
|
22
|
+
launch_editor: handleLaunchEditor,
|
|
23
|
+
run_project: handleRunProject,
|
|
24
|
+
attach_project: handleAttachProject,
|
|
25
|
+
detach_project: handleDetachProject,
|
|
26
|
+
get_debug_output: handleGetDebugOutput,
|
|
27
|
+
stop_project: handleStopProject,
|
|
28
28
|
list_projects: (_runner, args) => handleListProjects(args),
|
|
29
|
-
get_project_info:
|
|
30
|
-
take_screenshot:
|
|
31
|
-
simulate_input:
|
|
32
|
-
get_ui_elements:
|
|
33
|
-
run_script:
|
|
29
|
+
get_project_info: handleGetProjectInfo,
|
|
30
|
+
take_screenshot: handleTakeScreenshot,
|
|
31
|
+
simulate_input: handleSimulateInput,
|
|
32
|
+
get_ui_elements: handleGetUiElements,
|
|
33
|
+
run_script: handleRunScript,
|
|
34
34
|
list_autoloads: (_runner, args) => handleListAutoloads(args),
|
|
35
35
|
add_autoload: (_runner, args) => handleAddAutoload(args),
|
|
36
36
|
remove_autoload: (_runner, args) => handleRemoveAutoload(args),
|
|
@@ -40,24 +40,24 @@ export const toolDispatch = {
|
|
|
40
40
|
get_scene_dependencies: (_runner, args) => handleGetSceneDependencies(args),
|
|
41
41
|
get_project_settings: (_runner, args) => handleGetProjectSettings(args),
|
|
42
42
|
// Scene tools
|
|
43
|
-
create_scene:
|
|
44
|
-
add_node:
|
|
45
|
-
load_sprite:
|
|
46
|
-
save_scene:
|
|
47
|
-
export_mesh_library:
|
|
48
|
-
batch_scene_operations:
|
|
43
|
+
create_scene: handleCreateScene,
|
|
44
|
+
add_node: handleAddNode,
|
|
45
|
+
load_sprite: handleLoadSprite,
|
|
46
|
+
save_scene: handleSaveScene,
|
|
47
|
+
export_mesh_library: handleExportMeshLibrary,
|
|
48
|
+
batch_scene_operations: handleBatchSceneOperations,
|
|
49
49
|
// Node tools
|
|
50
|
-
delete_nodes:
|
|
51
|
-
set_node_properties:
|
|
52
|
-
get_node_properties:
|
|
53
|
-
attach_script:
|
|
54
|
-
get_scene_tree:
|
|
55
|
-
duplicate_node:
|
|
56
|
-
get_node_signals:
|
|
57
|
-
connect_signal:
|
|
58
|
-
disconnect_signal:
|
|
50
|
+
delete_nodes: handleDeleteNodes,
|
|
51
|
+
set_node_properties: handleSetNodeProperties,
|
|
52
|
+
get_node_properties: handleGetNodeProperties,
|
|
53
|
+
attach_script: handleAttachScript,
|
|
54
|
+
get_scene_tree: handleGetSceneTree,
|
|
55
|
+
duplicate_node: handleDuplicateNode,
|
|
56
|
+
get_node_signals: handleGetNodeSignals,
|
|
57
|
+
connect_signal: handleConnectSignal,
|
|
58
|
+
disconnect_signal: handleDisconnectSignal,
|
|
59
59
|
// Validate tools
|
|
60
|
-
validate:
|
|
60
|
+
validate: handleValidate,
|
|
61
61
|
};
|
|
62
62
|
export async function dispatchToolCall(runner, toolName, args) {
|
|
63
63
|
const handler = toolDispatch[toolName];
|
package/dist/dispatch.js.map
CHANGED
|
@@ -1 +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;AASzE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,CAAC,MAAM,YAAY,GAAgC;IACvD,gBAAgB;IAChB,aAAa,EAAE,
|
|
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;AASzE,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,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EAAE,IAAI,EAAE,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC;IAC3E,oBAAoB,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,wBAAwB,CAAC,IAAI,CAAC;IAEvE,cAAc;IACd,YAAY,EAAE,iBAAiB;IAC/B,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE,eAAe;IAC3B,mBAAmB,EAAE,uBAAuB;IAC5C,sBAAsB,EAAE,0BAA0B;IAElD,aAAa;IACb,YAAY,EAAE,iBAAiB;IAC/B,mBAAmB,EAAE,uBAAuB;IAC5C,mBAAmB,EAAE,uBAAuB;IAC5C,aAAa,EAAE,kBAAkB;IACjC,cAAc,EAAE,kBAAkB;IAClC,cAAc,EAAE,mBAAmB;IACnC,gBAAgB,EAAE,oBAAoB;IACtC,cAAc,EAAE,mBAAmB;IACnC,iBAAiB,EAAE,sBAAsB;IAEzC,iBAAiB;IACjB,QAAQ,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAAmB,EACnB,QAAgB,EAChB,IAAqB;IAErB,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,iBAAiB,QAAQ,EAAE,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,MAAM,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ class GodotMcpServer {
|
|
|
51
51
|
this.runner = new GodotRunner(config);
|
|
52
52
|
this.server = new Server({
|
|
53
53
|
name: 'godot-mcp',
|
|
54
|
-
version: '3.
|
|
54
|
+
version: '3.1.1',
|
|
55
55
|
}, {
|
|
56
56
|
capabilities: {
|
|
57
57
|
tools: {},
|
|
@@ -89,12 +89,12 @@ class GodotMcpServer {
|
|
|
89
89
|
try {
|
|
90
90
|
await this.runner.detectGodotPath();
|
|
91
91
|
const godotPath = this.runner.getGodotPath();
|
|
92
|
-
if (
|
|
93
|
-
console.error('[SERVER] Warning: Godot executable not found. Set GODOT_PATH to enable Godot tools.');
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
92
|
+
if (godotPath) {
|
|
96
93
|
console.error(`[SERVER] Using Godot at: ${godotPath}`);
|
|
97
94
|
}
|
|
95
|
+
// detectGodotPath() already emits a specific logError on failure (bad
|
|
96
|
+
// GODOT_PATH, no binary found, etc.). Don't duplicate with a generic
|
|
97
|
+
// warning here — the runner's message names the actual cause.
|
|
98
98
|
const transport = new StdioServerTransport();
|
|
99
99
|
await this.server.connect(transport);
|
|
100
100
|
console.error('Godot MCP server running on stdio');
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,0FAA0F;AAC1F,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,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,u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