bambu-printer-mcp 1.1.6 → 1.1.9

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.
@@ -0,0 +1,27 @@
1
+ # Contributors
2
+
3
+ Thank you to everyone who builds, tests, reports problems, and shares real printer evidence. This release is stronger because of your work!
4
+
5
+ ## This release
6
+
7
+ | Contributor | Contribution |
8
+ | --- | --- |
9
+ | [Sebastian (sebas1986)](https://github.com/sebas1986) | Isolates the multi-filament CLI crash with real BambuStudio bisection, contributes per-slot colours and multi-nozzle prime-tower placement, and verifies X2D identification, status, and slicing in [#18](https://github.com/DMontgomery40/bambu-printer-mcp/pull/18). Direct X2D printing remains deferred pending the native transport. |
10
+ | [Stenslaen](https://github.com/Stenslaen) | Traces the delayed H2 crash to OTA model detection, documents a multi-day workaround, and reports unexpected state-transition crashes in [#7](https://github.com/DMontgomery40/bambu-printer-mcp/issues/7). |
11
+ | [Alejandro Oñate (alexol91)](https://github.com/alexol91) | Reports the missing machine-template G-code and multi-filament override problems in [#12](https://github.com/DMontgomery40/bambu-printer-mcp/issues/12), with measured output and a proposed fix in [#13](https://github.com/DMontgomery40/bambu-printer-mcp/pull/13). |
12
+ | [var-poro](https://github.com/var-poro) | Supplies P2S firmware/MQTT evidence and regression tests in [#15](https://github.com/DMontgomery40/bambu-printer-mcp/pull/15), plus profile-template resolution and inheritance tests in [#16](https://github.com/DMontgomery40/bambu-printer-mcp/pull/16). |
13
+ | [John Randall (johntrandall)](https://github.com/johntrandall) | Captures A1 job manifests and contributes the SD-root/project-file fix in [#14](https://github.com/DMontgomery40/bambu-printer-mcp/pull/14). |
14
+ | [Kyle Taylor (kyletaylored)](https://github.com/kyletaylored) | Contributes Claude Desktop extension packaging, prompted setup, and the writable-temp-directory fix in [#11](https://github.com/DMontgomery40/bambu-printer-mcp/pull/11). |
15
+ | [Quinn (quinnpertuit)](https://github.com/quinnpertuit) | Investigates P2S transfer routing and contributes model-capability and serial-prefix analysis in [#9](https://github.com/DMontgomery40/bambu-printer-mcp/pull/9). The release uses the alternative P2S implementation from #15. |
16
+ | [Vail (VailElla)](https://github.com/VailElla) | Contributes the native X2D transport, local eMMC investigation, and hardware evidence in [#10](https://github.com/DMontgomery40/bambu-printer-mcp/pull/10). That integration remains under review and is not enabled in this release. |
17
+
18
+ ## Project contributors
19
+
20
+ Thank you also to the existing contributors whose work this release builds on:
21
+
22
+ - [David Montgomery (DMontgomery40)](https://github.com/DMontgomery40) — project maintainer.
23
+ - [rowbotik](https://github.com/rowbotik) — printer, AMS, slicing, and operational work across the existing release history.
24
+ - [len-foss](https://github.com/len-foss) — project code contribution.
25
+ - [thebitrock](https://github.com/thebitrock) — project code contribution.
26
+
27
+ See the [full contribution history](https://github.com/DMontgomery40/bambu-printer-mcp/graphs/contributors) for commit authorship. Credit here includes bug reports and reviewed proposals as well as merged code.
package/README.md CHANGED
@@ -9,9 +9,9 @@
9
9
 
10
10
  A Bambu Lab-focused MCP server for controlling Bambu printers, manipulating STL files, and managing end-to-end 3MF print workflows from Claude Desktop, Claude Code, or any MCP-compatible client.
11
11
 
12
- This is a stripped-down, Bambu-only fork of [mcp-3D-printer-server](https://github.com/DMontgomery40/mcp-3D-printer-server). All OctoPrint, Klipper, Duet, Repetier, Prusa Connect, and Creality Cloud support has been removed. What remains is a focused, lean implementation for Bambu Lab hardware.
12
+ Built with help from our [contributors](./CONTRIBUTORS.md). Huge thanks to everyone sharing fixes, careful bug reports, and real printer testing!
13
13
 
14
- Local handoff note: see [REMOTE-DEPLOYMENT.md](./REMOTE-DEPLOYMENT.md) for the custom H2D/H2S/H2C patches, per-printer MCP split, and remote deployment plan used in this clone.
14
+ This is a stripped-down, Bambu-only fork of [mcp-3D-printer-server](https://github.com/DMontgomery40/mcp-3D-printer-server). All OctoPrint, Klipper, Duet, Repetier, Prusa Connect, and Creality Cloud support has been removed. What remains is a focused, lean implementation for Bambu Lab hardware.
15
15
 
16
16
  ---
17
17
 
@@ -19,6 +19,14 @@ Local handoff note: see [REMOTE-DEPLOYMENT.md](./REMOTE-DEPLOYMENT.md) for the c
19
19
 
20
20
  This fork adds a substantial set of printer control tools beyond the upstream `mcp-3D-printer-server`. Everything listed below is unique to this package.
21
21
 
22
+ ### v1.1.8 — reliable installs, printer fixes, and Blender MCP
23
+
24
+ - Fix delayed H2 status crashes and preserve machine-specific G-code when resolving Bambu profiles.
25
+ - Correct P2S and full-size A1 print routing while preserving other models' existing behavior.
26
+ - Install a Claude Desktop extension with prompted settings; keep local credentials and models out of packaged artifacts.
27
+ - Connect to standard Blender MCP servers, discover and call their tools, and verify STL edit/export results.
28
+ - Preserve filament-slot order and isolate temporary files between concurrent jobs and server instances.
29
+
22
30
  ### v1.1.0 — AMS auto-match, camera snapshot, pause/resume, skip objects
23
31
 
24
32
  - **AMS auto-match by RFID** (`auto_match_ams` on `print_3mf`) — resolves sliced 3MF filament requirements against live AMS inventory. Handles same-SKU different-color filaments. Dry-run with `resolve_3mf_ams_slots`.
@@ -30,10 +38,10 @@ This fork adds a substantial set of printer control tools beyond the upstream `m
30
38
  - **HMS diagnostics** (`printer://{host}/hms` MCP resource) — read-only error summary with automatic settle retry.
31
39
  - **Utility controls** — `set_print_speed` (silent/standard/sport/ludicrous), `clear_hms_errors`, `reread_ams_rfid`, `set_airduct_mode` (cooling/heating for H2/P2).
32
40
  - **H2-family-safe print path** — correct `project_file` format with `ams_mapping2` parallel array, H2 firmware quirks handled.
33
- - **BambuStudio CLI auto-flatten** (`BAMBU_CLI_FLATTEN=true`) — works around upstream profile inheritance bugs.
41
+ - **BambuStudio CLI auto-flatten** (automatic for BBL profiles) — works around upstream profile inheritance bugs.
34
42
  - **Print collar charm** (`print_collar_charm`) — specialized two-color wrapper with fixed tray policy.
35
43
 
36
- ### v1.1.1 — AMS dryer control (current)
44
+ ### v1.1.1 — AMS dryer control
37
45
 
38
46
  - **AMS dryer start/stop** (`set_ams_drying`) — sends `print.ams_control` MQTT command. Works on heated AMS units (AMS Pro / AMS-HT). Action: `start` or `stop`, target by AMS index 0–3.
39
47
  - Same-SKU different-color fix for `auto_match_ams`.
@@ -98,9 +106,10 @@ This fork adds a substantial set of printer control tools beyond the upstream `m
98
106
  - Get detailed printer status: temperatures (nozzle, bed, chamber), print progress, current layer, time remaining, and live AMS slot data
99
107
  - Query live AMS inventory with resolved Bambu/Orca filament profile paths via `get_printer_filaments`. Includes per-tray display names, match confidence (`high`/`medium`/`low`/`none`), resolution tier (`exact-model-nozzle`/`model`/`generic`/`unresolved`), and a summary with recommended auto-slice filament. Retries automatically when AMS data hasn't arrived yet (common on first MQTT push from idle printers).
100
108
  - List, upload, and delete files on the printer's SD card via FTPS
101
- - Capture a JPEG snapshot from the chamber camera. Supports A1, A1 mini, P1S, P1P (TCP-on-6000), and X1, X1C, X1E, P2S, H2, H2S, H2D, H2C, H2D Pro (RTSP via ffmpeg). Requires ffmpeg in PATH for the RTSP path.
109
+ - Capture a JPEG snapshot from the chamber camera. Supports A1, A1 mini, P1S, P1P (TCP-on-6000), and X1, X1C, X1E, P2S, H2, H2S, H2D, H2C, H2D Pro, X2D (RTSP via ffmpeg). Requires ffmpeg in PATH for the RTSP path.
102
110
  - Upload and print pre-sliced `.gcode.3mf` files with full plate selection and calibration flag control (recommended path — see [docs/SLICING.md](./docs/SLICING.md))
103
- - Optional single-color auto-slice path via BambuStudio CLI. Set `BAMBU_CLI_FLATTEN=true` to enable a workaround that flattens BBL profile inheritance before invoking the CLI — works around upstream bugs in BambuStudio CLI mode ([#9636](https://github.com/bambulab/BambuStudio/issues/9636), [#9968](https://github.com/bambulab/BambuStudio/issues/9968)). Single-color smoke is verified on H2S/H2D/X1C/P1S; H2C requires Bambu Studio 2.4.0 or newer and should use `BAMBU_MODEL=h2c`, not an H2D fallback. H2D two-color CLI slicing is blocked upstream ([#10408](https://github.com/bambulab/BambuStudio/issues/10408)); use a GUI-sliced `.gcode.3mf` for that workflow. Default off; Path A (GUI-slice) remains the recommended workflow for non-BBL profiles, multi-color H2 jobs, or first-time prints. See [docs/SLICING.md](./docs/SLICING.md).
111
+ - Slice through BambuStudio CLI with automatic BBL inheritance/include resolution, per-slot filament colours, and fallback prime-tower placement for multi-nozzle printers. Missing dependencies stop the slice; custom settings and saved project tower positions are preserved. Multi-colour slicing is verified by the contributor on BambuStudio 02.08.02.60 for Windows; older CLI versions have separate limitations. See [docs/SLICING.md](./docs/SLICING.md).
112
+ - Recognize X2D status and slice with its own installed BambuStudio preset (`BAMBU_MODEL=x2d`). **Direct X2D printing is not supported yet**: the internal eMMC transport is pending. These print requests stop before slicing, uploading, or issuing printer commands. Print exported projects through a supported slicer instead.
104
113
  - Parse AMS mapping from the 3MF's embedded slicer metadata (`Metadata/plate_<n>.json` + gcode filament header) and send it correctly formatted per the OpenBambuAPI spec, with correct H2S/H2D/H2C `ams_mapping2` parallel array format
105
114
  - **Auto-match AMS slots by RFID** (`auto_match_ams` flag on `print_3mf`). Resolves required `tray_info_idx` from the sliced 3MF against live AMS inventory. Handles same-SKU different-color filaments by matching on `(tray_info_idx, tray_color)` and tracking already-claimed slots. Dry-run with `resolve_3mf_ams_slots` before printing.
106
115
  - Cancel, pause, and resume in-progress print jobs via MQTT
@@ -138,7 +147,7 @@ This fork adds a substantial set of printer control tools beyond the upstream `m
138
147
  The fastest way to get started. No global install required:
139
148
 
140
149
  ```bash
141
- npx @rowbotik/bambu-printer-mcp
150
+ npx bambu-printer-mcp
142
151
  ```
143
152
 
144
153
  Set environment variables inline or via a `.env` file in your working directory (see [Configuration](#configuration)).
@@ -146,7 +155,7 @@ Set environment variables inline or via a `.env` file in your working directory
146
155
  ### Install globally from npm
147
156
 
148
157
  ```bash
149
- npm install -g @rowbotik/bambu-printer-mcp
158
+ npm install -g bambu-printer-mcp
150
159
  ```
151
160
 
152
161
  After installation, the `bambu-printer-mcp` command is available in your PATH.
@@ -154,7 +163,7 @@ After installation, the `bambu-printer-mcp` command is available in your PATH.
154
163
  ### Install from source
155
164
 
156
165
  ```bash
157
- git clone https://github.com/rowbotik/bambu-printer-mcp.git
166
+ git clone https://github.com/DMontgomery40/bambu-printer-mcp.git
158
167
  cd bambu-printer-mcp
159
168
  npm install
160
169
  npm run build
@@ -178,7 +187,7 @@ BAMBU_TOKEN=your_access_token # LAN access token from printer touchscreen
178
187
  # BAMBU_PRINTER_HOST / BAMBU_PRINTER_SERIAL / BAMBU_PRINTER_ACCESS_TOKEN
179
188
 
180
189
  # --- Printer model (CRITICAL for safe operation) ---
181
- BAMBU_MODEL=p1s # Your printer model: p1s, p1p, p2s, x1c, x1e, a1, a1mini, h2d, h2s, h2c
190
+ BAMBU_MODEL=p1s # Your printer model: p1s, p1p, p2s, x1c, x1e, a1, a1mini, h2d, h2s, h2c, x2d
182
191
  # Alias also accepted: BAMBU_PRINTER_MODEL
183
192
  BED_TYPE=textured_plate # Bed plate type: textured_plate, cool_plate, engineering_plate, hot_plate, supertack_plate
184
193
  NOZZLE_DIAMETER=0.4 # Nozzle diameter in mm (default: 0.4)
@@ -204,8 +213,12 @@ MCP_HTTP_STATEFUL=true
204
213
  MCP_HTTP_JSON_RESPONSE=true
205
214
  MCP_HTTP_ALLOWED_ORIGINS=http://localhost
206
215
 
207
- # --- Optional Blender MCP bridge ---
208
- BLENDER_MCP_BRIDGE_COMMAND= # Shell command to invoke your Blender MCP bridge executable
216
+ # --- Optional standard Blender MCP server ---
217
+ BLENDER_MCP_COMMAND=uvx # Executable or full path; no shell command string
218
+ BLENDER_MCP_ARGS='["blender-mcp"]'
219
+ BLENDER_MCP_TIMEOUT_MS=120000
220
+ # Start the matching MCP addon inside Blender.
221
+ # Legacy custom executable bridge (optional): BLENDER_MCP_BRIDGE_COMMAND=
209
222
  ```
210
223
 
211
224
  ### Environment variables reference
@@ -215,13 +228,13 @@ BLENDER_MCP_BRIDGE_COMMAND= # Shell command to invoke your Blender MCP bri
215
228
  | `PRINTER_HOST` | `localhost` | Yes | IP address of the Bambu printer. Alias: `BAMBU_PRINTER_HOST` |
216
229
  | `BAMBU_SERIAL` | | Yes | Printer serial number. Alias: `BAMBU_PRINTER_SERIAL` |
217
230
  | `BAMBU_TOKEN` | | Yes | LAN access token. Alias: `BAMBU_PRINTER_ACCESS_TOKEN` |
218
- | `BAMBU_MODEL` | | **Yes** | Printer model: `p1s`, `p1p`, `p2s`, `x1c`, `x1e`, `a1`, `a1mini`, `h2d`, `h2s`, `h2c`. **Required for safe operation** -- determines the correct G-code generation. Alias: `BAMBU_PRINTER_MODEL`. If omitted and the MCP client supports elicitation, the server will ask you interactively. Use `h2c` for H2C; do not use `h2d` as a fallback. |
231
+ | `BAMBU_MODEL` | | **Yes** | Printer model: `p1s`, `p1p`, `p2s`, `x1c`, `x1e`, `a1`, `a1mini`, `h2d`, `h2s`, `h2c`, `x2d`. **Required for safe operation** -- determines the correct G-code generation. Alias: `BAMBU_PRINTER_MODEL`. If omitted and the MCP client supports elicitation, the server will ask you interactively. Use `h2c` for H2C and `x2d` for X2D; do not use `h2d` as a fallback. |
219
232
  | `BED_TYPE` | `textured_plate` | No | Bed plate type: `textured_plate`, `cool_plate`, `engineering_plate`, `hot_plate`, `supertack_plate` |
220
233
  | `NOZZLE_DIAMETER` | `0.4` | No | Nozzle diameter in mm. Used to select the correct BambuStudio machine preset. |
221
234
  | `SLICER_TYPE` | `bambustudio` | No | Slicer to use for slicing operations |
222
235
  | `SLICER_PATH` | BambuStudio macOS path | No | Full path to the slicer executable. Alias: `BAMBU_STUDIO_PATH` |
223
236
  | `SLICER_PROFILE` | | No | Path to a slicer profile or config file |
224
- | `TEMP_DIR` | `./temp` | No | Directory for intermediate files |
237
+ | `TEMP_DIR` | private folder under the system temporary directory | No | Intermediate files; each server instance gets its own folder unless explicitly configured |
225
238
  | `MCP_TRANSPORT` | `stdio` | No | Transport mode: `stdio` or `streamable-http` |
226
239
  | `MCP_HTTP_HOST` | `127.0.0.1` | No | HTTP bind address (HTTP transport only) |
227
240
  | `MCP_HTTP_PORT` | `3000` | No | HTTP port (HTTP transport only) |
@@ -229,8 +242,11 @@ BLENDER_MCP_BRIDGE_COMMAND= # Shell command to invoke your Blender MCP bri
229
242
  | `MCP_HTTP_STATEFUL` | `true` | No | Enable stateful HTTP sessions |
230
243
  | `MCP_HTTP_JSON_RESPONSE` | `true` | No | Return structured JSON alongside text responses |
231
244
  | `MCP_HTTP_ALLOWED_ORIGINS` | | No | Comma-separated list of allowed CORS origins |
232
- | `BLENDER_MCP_BRIDGE_COMMAND` | | No | Command to invoke Blender MCP bridge |
233
- | `BAMBU_CLI_FLATTEN` | `false` | No | When `true`, the MCP flattens BBL profile inheritance before invoking the BambuStudio CLI. Workaround for upstream issues [#9636](https://github.com/bambulab/BambuStudio/issues/9636) / [#9968](https://github.com/bambulab/BambuStudio/issues/9968). BBL printers only. Single-color smoke verified on H2S/H2D/X1C/P1S; H2C requires Bambu Studio 2.4.0 or newer. H2D two-color CLI slicing remains blocked by [#10408](https://github.com/bambulab/BambuStudio/issues/10408). See [docs/SLICING.md](./docs/SLICING.md). |
245
+ | `BLENDER_MCP_COMMAND` | | No | Trusted executable for a standard stdio Blender MCP server, e.g. full path to `uvx` |
246
+ | `BLENDER_MCP_ARGS` | `[]` | No | JSON array of server arguments, e.g. `["blender-mcp"]`; no shell parsing |
247
+ | `BLENDER_MCP_TIMEOUT_MS` | `120000` | No | Connection/discovery/call deadline, 100–300000 ms; interrupted edits are never retried automatically |
248
+ | `BLENDER_MCP_BRIDGE_COMMAND` | | No | Legacy custom executable receiving `MCP_BLENDER_PAYLOAD`; separate from the standard MCP integration |
249
+ | `BAMBU_CLI_FLATTEN` | automatic | No | Legacy setting; BBL profile resolution now always runs when profiles contain inheritance or includes. A false/unset value cannot bypass required machine G-code. Standalone custom files without dependencies pass through. See [docs/SLICING.md](./docs/SLICING.md). |
234
250
  | `BAMBU_PROFILES_ROOT` | derived from `SLICER_PATH` | No | Override path to the BambuStudio `Resources/profiles` directory used by the CLI flattener. Useful for non-standard installs or dev environments. |
235
251
 
236
252
  SuperTack can be passed for pre-sliced print jobs, but BambuStudio CLI slicing currently fails fast for `supertack_plate` because the accepted CLI bed identifier is not verified. Use a pre-sliced 3MF for SuperTack until this is confirmed.
@@ -246,7 +262,7 @@ Add this server to your MCP client's config (Claude Desktop, Claude Code, Cursor
246
262
  "mcpServers": {
247
263
  "bambu-printer": {
248
264
  "command": "npx",
249
- "args": ["-y", "@rowbotik/bambu-printer-mcp"],
265
+ "args": ["-y", "bambu-printer-mcp"],
250
266
  "env": {
251
267
  "PRINTER_HOST": "192.168.1.100",
252
268
  "BAMBU_SERIAL": "01P00A123456789",
@@ -273,6 +289,25 @@ Where this config lives depends on your client:
273
289
 
274
290
  Restart your client after editing the config.
275
291
 
292
+ ### Alternative: Claude Desktop extension (.mcpb)
293
+
294
+ You can install this server into Claude Desktop without editing JSON by using the `.mcpb` extension bundle. Download `bambu-printer-mcp.mcpb` from the [latest release](https://github.com/DMontgomery40/bambu-printer-mcp/releases), double-click it, and Claude Desktop's extension wizard will register the server. You'll be prompted for your printer IP, serial number, LAN access code, and printer model -- the same values as the `mcpServers` config above.
295
+
296
+ If your org has disabled Claude Desktop extension installs, install unpacked instead:
297
+
298
+ 1. Clone the repo and run `npm ci && npm run build`.
299
+ 2. Open Claude Desktop -> **Settings** -> **Extensions** -> **Advanced Settings** -> **Extension Developer** -> **Install Unpacked**.
300
+ 3. Select the repo's root directory (the one containing `manifest.json`).
301
+
302
+ To build the bundle yourself instead of downloading a release asset:
303
+
304
+ ```bash
305
+ npm ci
306
+ npm run package:mcpb
307
+ ```
308
+
309
+ This produces `bambu-printer-mcp.mcpb` in the repo root using a pinned packaging tool. Packaging installs production dependencies in a temporary directory, retains licenses and source, excludes local credentials and models, and leaves your development dependencies intact.
310
+
276
311
  ### Recommended: use with codemode-mcp
277
312
 
278
313
  For any MCP server with a large tool surface, wrapping it behind [codemode-mcp](https://github.com/jx-codes/codemode-mcp) dramatically reduces token usage. Instead of exposing every tool definition to the model (which can consume tens of thousands of tokens per turn), codemode lets the agent write code against a two-tool interface (`search()` and `execute()`), loading only the tools it needs on demand.
@@ -1212,6 +1247,7 @@ When `slicer_type` is `bambustudio` (the default), these additional parameters a
1212
1247
  | `skip_objects` | string | Object indices to skip, comma-separated (e.g. `"3,5,10"`) |
1213
1248
  | `load_filaments` | string | Filament profile paths, semicolon-separated |
1214
1249
  | `load_filament_ids` | string | Filament-to-object mapping, comma-separated |
1250
+ | `filament_colours` | string | Slot colours, one `#RRGGBB` per filament slot, semicolon-separated. Explicit values take priority, followed by input 3MF colours, each custom profile's colour, then the BambuStudio default. |
1215
1251
  | `enable_timelapse` | boolean | Enable timelapse-aware slicing |
1216
1252
  | `allow_mix_temp` | boolean | Allow mixed-temperature filaments on one plate |
1217
1253
  | `scale` | number | Uniform scale factor |
@@ -1251,31 +1287,70 @@ These defaults keep you safe when printing downloaded models. When calling `slic
1251
1287
 
1252
1288
  ### Advanced Tools
1253
1289
 
1254
- #### blender_mcp_edit_model
1255
-
1256
- Send a set of named edit operations (remesh, boolean, decimate, etc.) to a Blender MCP bridge command for advanced mesh work that goes beyond what the built-in STL tools support.
1290
+ #### Blender MCP
1257
1291
 
1258
- When `execute` is `false` (the default), the tool returns the payload that would be sent without running anything -- useful for previewing what would be dispatched.
1292
+ Use a standard stdio Blender MCP server with `BLENDER_MCP_COMMAND` and
1293
+ `BLENDER_MCP_ARGS`. For the common Blender MCP server, install `uv` and its
1294
+ matching Blender addon, enable the addon, and start its connection inside
1295
+ Blender. Set the command to your full `uvx` path and the argument array to
1296
+ `["blender-mcp"]`. The Claude Desktop extension also offers these two optional
1297
+ settings. Printer tools work without Blender configured.
1259
1298
 
1260
- When `execute` is `true`, the server invokes the configured bridge command with the payload as a JSON-encoded environment variable (`MCP_BLENDER_PAYLOAD`). Configure it with `BLENDER_MCP_BRIDGE_COMMAND`; per-call `bridge_command` overrides require `MCP_ALLOW_EXECUTABLE_ARG=1`.
1299
+ 1. Call `blender_mcp_status` with `{"connect": true}` to initialize the server
1300
+ and discover its tools and input schemas. A connected MCP server does not
1301
+ by itself prove that the Blender addon is running.
1302
+ 2. Call `blender_mcp_call` with a discovered tool name and its arguments. The
1303
+ full MCP result, including images and errors, is returned. For example:
1261
1304
 
1262
1305
  ```json
1263
1306
  {
1264
- "stl_path": "/path/to/model.stl",
1265
- "operations": ["remesh", "decimate:0.5", "boolean_union:/path/to/other.stl"],
1266
- "execute": false
1307
+ "tool_name": "get_scene_info",
1308
+ "arguments": {"user_prompt": "Inspect the scene before preparing a print."}
1267
1309
  }
1268
1310
  ```
1269
1311
 
1312
+ For advanced Blender operations, forward `execute_blender_code` with `code`
1313
+ and the user's original `user_prompt`. These calls may edit the active scene.
1314
+ Use the discovered schema rather than assuming a tool exists.
1315
+
1316
+ #### blender_mcp_edit_model
1317
+
1318
+ The standard MCP edit helper imports an STL, applies ordered edits, and exports
1319
+ an STL without replacing the input or an existing output. Supported operations
1320
+ are `decimate:<ratio>` (greater than 0 through 1), `remesh:<voxel size>` (positive,
1321
+ in STL coordinate units), and `boolean_union:<STL path>`. Other operations can
1322
+ use `blender_mcp_call`. Both processes must have access to the same file paths.
1323
+ When `BLENDER_MCP_COMMAND` selects standard MCP, the advertised tool schema
1324
+ requires an explicit `output_path` for both preview and execution. Legacy-only
1325
+ bridge configurations keep `output_path` optional for compatibility.
1326
+
1270
1327
  ```json
1271
1328
  {
1272
1329
  "stl_path": "/path/to/model.stl",
1273
- "operations": ["remesh"],
1274
- "bridge_command": "/usr/local/bin/blender-mcp-bridge",
1275
- "execute": true
1330
+ "output_path": "/path/to/model-edited.stl",
1331
+ "operations": ["decimate:0.5"],
1332
+ "user_prompt": "Reduce the triangle count of this model for printing.",
1333
+ "execute": false
1276
1334
  }
1277
1335
  ```
1278
1336
 
1337
+ The default preview returns the plan and generated Python without launching
1338
+ Blender. Set `execute` to `true` to run it. A successful standard edit returns
1339
+ `output_verified: true`, `output_path`, byte count, and triangle count after
1340
+ checking the matching export receipt and a valid finite mesh. The helper
1341
+ preserves existing scene objects and requires Object Mode. Inspect the result
1342
+ before slicing; a valid STL is not a guarantee of printability.
1343
+
1344
+ The bridge enforces request deadlines, closes child connections, and never
1345
+ replays interrupted editing requests. After a timeout, inspect Blender before
1346
+ trying the edit again because execution may already have started.
1347
+
1348
+ Existing custom executables still work through `BLENDER_MCP_BRIDGE_COMMAND`.
1349
+ They receive `MCP_BLENDER_PAYLOAD` with the requested file and operations;
1350
+ their results explicitly report `output_verified: false`. A missing executable
1351
+ configuration is an error when execution is requested. Per-call legacy
1352
+ `bridge_command` overrides remain disabled unless `MCP_ALLOW_EXECUTABLE_ARG=1`.
1353
+
1279
1354
  </details>
1280
1355
 
1281
1356
  ---
@@ -0,0 +1,10 @@
1
+ import { type CallToolResult } from "@modelcontextprotocol/sdk/types.js";
2
+ type Arguments = Record<string, unknown>;
3
+ export declare class BlenderMcpBridge {
4
+ private session;
5
+ private invoke;
6
+ status(args: Arguments, signal?: AbortSignal): Promise<unknown>;
7
+ call(args: Arguments, signal?: AbortSignal): Promise<CallToolResult>;
8
+ edit(args: Arguments, legacyCommand?: string, signal?: AbortSignal): Promise<unknown>;
9
+ }
10
+ export {};