bambu-printer-mcp 1.1.5 → 1.1.8
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/CONTRIBUTORS.md +26 -0
- package/README.md +100 -27
- package/dist/blender-mcp-bridge.d.ts +10 -0
- package/dist/blender-mcp-bridge.js +389 -0
- package/dist/index.js +166 -102
- package/dist/printers/bambu.js +31 -13
- package/dist/slicer/profile-flatten.d.ts +15 -4
- package/dist/slicer/profile-flatten.js +181 -74
- package/dist/stl/stl-manipulator.d.ts +3 -17
- package/dist/stl/stl-manipulator.js +142 -85
- package/package.json +8 -4
- package/patches/bambu-node+3.22.21.patch +18 -2
- package/scripts/install-patches.mjs +64 -0
- package/src/blender-mcp-bridge.ts +344 -0
- package/src/index.ts +237 -123
- package/src/printers/bambu.ts +29 -13
- package/src/slicer/profile-flatten.ts +202 -80
- package/src/stl/stl-manipulator.ts +161 -98
package/CONTRIBUTORS.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
| [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). |
|
|
10
|
+
| [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). |
|
|
11
|
+
| [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). |
|
|
12
|
+
| [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). |
|
|
13
|
+
| [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). |
|
|
14
|
+
| [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. |
|
|
15
|
+
| [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. |
|
|
16
|
+
|
|
17
|
+
## Project contributors
|
|
18
|
+
|
|
19
|
+
Thank you also to the existing contributors whose work this release builds on:
|
|
20
|
+
|
|
21
|
+
- [David Montgomery (DMontgomery40)](https://github.com/DMontgomery40) — project maintainer.
|
|
22
|
+
- [rowbotik](https://github.com/rowbotik) — printer, AMS, slicing, and operational work across the existing release history.
|
|
23
|
+
- [len-foss](https://github.com/len-foss) — project code contribution.
|
|
24
|
+
- [thebitrock](https://github.com/thebitrock) — project code contribution.
|
|
25
|
+
|
|
26
|
+
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
|
-
|
|
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
|
-
|
|
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** (
|
|
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
|
|
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`.
|
|
@@ -100,7 +108,7 @@ This fork adds a substantial set of printer control tools beyond the upstream `m
|
|
|
100
108
|
- List, upload, and delete files on the printer's SD card via FTPS
|
|
101
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 (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.
|
|
111
|
+
- Optional single-color auto-slice path via BambuStudio CLI. BBL profile inheritance and include templates resolve automatically before slicing; missing dependencies stop the slice. Standalone custom configurations remain supported. H2C requires a compatible installed Bambu Studio profile tree and `BAMBU_MODEL=h2c`. The previously documented H2D multi-color CLI limitation remains; use a GUI-sliced `.gcode.3mf` for that workflow. See [docs/SLICING.md](./docs/SLICING.md).
|
|
104
112
|
- 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
113
|
- **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
114
|
- Cancel, pause, and resume in-progress print jobs via MQTT
|
|
@@ -138,7 +146,7 @@ This fork adds a substantial set of printer control tools beyond the upstream `m
|
|
|
138
146
|
The fastest way to get started. No global install required:
|
|
139
147
|
|
|
140
148
|
```bash
|
|
141
|
-
npx
|
|
149
|
+
npx bambu-printer-mcp
|
|
142
150
|
```
|
|
143
151
|
|
|
144
152
|
Set environment variables inline or via a `.env` file in your working directory (see [Configuration](#configuration)).
|
|
@@ -146,7 +154,7 @@ Set environment variables inline or via a `.env` file in your working directory
|
|
|
146
154
|
### Install globally from npm
|
|
147
155
|
|
|
148
156
|
```bash
|
|
149
|
-
npm install -g
|
|
157
|
+
npm install -g bambu-printer-mcp
|
|
150
158
|
```
|
|
151
159
|
|
|
152
160
|
After installation, the `bambu-printer-mcp` command is available in your PATH.
|
|
@@ -154,7 +162,7 @@ After installation, the `bambu-printer-mcp` command is available in your PATH.
|
|
|
154
162
|
### Install from source
|
|
155
163
|
|
|
156
164
|
```bash
|
|
157
|
-
git clone https://github.com/
|
|
165
|
+
git clone https://github.com/DMontgomery40/bambu-printer-mcp.git
|
|
158
166
|
cd bambu-printer-mcp
|
|
159
167
|
npm install
|
|
160
168
|
npm run build
|
|
@@ -204,8 +212,12 @@ MCP_HTTP_STATEFUL=true
|
|
|
204
212
|
MCP_HTTP_JSON_RESPONSE=true
|
|
205
213
|
MCP_HTTP_ALLOWED_ORIGINS=http://localhost
|
|
206
214
|
|
|
207
|
-
# --- Optional Blender MCP
|
|
208
|
-
|
|
215
|
+
# --- Optional standard Blender MCP server ---
|
|
216
|
+
BLENDER_MCP_COMMAND=uvx # Executable or full path; no shell command string
|
|
217
|
+
BLENDER_MCP_ARGS='["blender-mcp"]'
|
|
218
|
+
BLENDER_MCP_TIMEOUT_MS=120000
|
|
219
|
+
# Start the matching MCP addon inside Blender.
|
|
220
|
+
# Legacy custom executable bridge (optional): BLENDER_MCP_BRIDGE_COMMAND=
|
|
209
221
|
```
|
|
210
222
|
|
|
211
223
|
### Environment variables reference
|
|
@@ -221,7 +233,7 @@ BLENDER_MCP_BRIDGE_COMMAND= # Shell command to invoke your Blender MCP bri
|
|
|
221
233
|
| `SLICER_TYPE` | `bambustudio` | No | Slicer to use for slicing operations |
|
|
222
234
|
| `SLICER_PATH` | BambuStudio macOS path | No | Full path to the slicer executable. Alias: `BAMBU_STUDIO_PATH` |
|
|
223
235
|
| `SLICER_PROFILE` | | No | Path to a slicer profile or config file |
|
|
224
|
-
| `TEMP_DIR` |
|
|
236
|
+
| `TEMP_DIR` | private folder under the system temporary directory | No | Intermediate files; each server instance gets its own folder unless explicitly configured |
|
|
225
237
|
| `MCP_TRANSPORT` | `stdio` | No | Transport mode: `stdio` or `streamable-http` |
|
|
226
238
|
| `MCP_HTTP_HOST` | `127.0.0.1` | No | HTTP bind address (HTTP transport only) |
|
|
227
239
|
| `MCP_HTTP_PORT` | `3000` | No | HTTP port (HTTP transport only) |
|
|
@@ -229,8 +241,11 @@ BLENDER_MCP_BRIDGE_COMMAND= # Shell command to invoke your Blender MCP bri
|
|
|
229
241
|
| `MCP_HTTP_STATEFUL` | `true` | No | Enable stateful HTTP sessions |
|
|
230
242
|
| `MCP_HTTP_JSON_RESPONSE` | `true` | No | Return structured JSON alongside text responses |
|
|
231
243
|
| `MCP_HTTP_ALLOWED_ORIGINS` | | No | Comma-separated list of allowed CORS origins |
|
|
232
|
-
| `
|
|
233
|
-
| `
|
|
244
|
+
| `BLENDER_MCP_COMMAND` | | No | Trusted executable for a standard stdio Blender MCP server, e.g. full path to `uvx` |
|
|
245
|
+
| `BLENDER_MCP_ARGS` | `[]` | No | JSON array of server arguments, e.g. `["blender-mcp"]`; no shell parsing |
|
|
246
|
+
| `BLENDER_MCP_TIMEOUT_MS` | `120000` | No | Connection/discovery/call deadline, 100–300000 ms; interrupted edits are never retried automatically |
|
|
247
|
+
| `BLENDER_MCP_BRIDGE_COMMAND` | | No | Legacy custom executable receiving `MCP_BLENDER_PAYLOAD`; separate from the standard MCP integration |
|
|
248
|
+
| `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
249
|
| `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
250
|
|
|
236
251
|
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 +261,7 @@ Add this server to your MCP client's config (Claude Desktop, Claude Code, Cursor
|
|
|
246
261
|
"mcpServers": {
|
|
247
262
|
"bambu-printer": {
|
|
248
263
|
"command": "npx",
|
|
249
|
-
"args": ["-y", "
|
|
264
|
+
"args": ["-y", "bambu-printer-mcp"],
|
|
250
265
|
"env": {
|
|
251
266
|
"PRINTER_HOST": "192.168.1.100",
|
|
252
267
|
"BAMBU_SERIAL": "01P00A123456789",
|
|
@@ -273,6 +288,25 @@ Where this config lives depends on your client:
|
|
|
273
288
|
|
|
274
289
|
Restart your client after editing the config.
|
|
275
290
|
|
|
291
|
+
### Alternative: Claude Desktop extension (.mcpb)
|
|
292
|
+
|
|
293
|
+
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.
|
|
294
|
+
|
|
295
|
+
If your org has disabled Claude Desktop extension installs, install unpacked instead:
|
|
296
|
+
|
|
297
|
+
1. Clone the repo and run `npm ci && npm run build`.
|
|
298
|
+
2. Open Claude Desktop -> **Settings** -> **Extensions** -> **Advanced Settings** -> **Extension Developer** -> **Install Unpacked**.
|
|
299
|
+
3. Select the repo's root directory (the one containing `manifest.json`).
|
|
300
|
+
|
|
301
|
+
To build the bundle yourself instead of downloading a release asset:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
npm ci
|
|
305
|
+
npm run package:mcpb
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
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.
|
|
309
|
+
|
|
276
310
|
### Recommended: use with codemode-mcp
|
|
277
311
|
|
|
278
312
|
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.
|
|
@@ -771,7 +805,7 @@ Two transports are wired in, picked by `bambu_model`:
|
|
|
771
805
|
- **TCP-on-6000** for **A1, A1 mini, P1S, P1P**. Native protocol per [OpenBambuAPI/video.md](https://github.com/Doridian/OpenBambuAPI/blob/main/video.md): TLS on port 6000, 80-byte auth packet (`bblp` + access token), repeating 16-byte frame header + JPEG payload.
|
|
772
806
|
- **RTSP** for **X1, X1 Carbon, X1E, P2S** and **H2, H2S, H2D, H2C, H2D Pro**. Shells out to ffmpeg with `rtsps://bblp:<token>@<host>:322/streaming/live/1 -frames:v 1`. The H2 series wasn't documented in OpenBambuAPI's `video.md` but its firmware uses the same RTSP endpoint as X1 (verified live against an H2S, 2026-04-27).
|
|
773
807
|
|
|
774
|
-
**Requires ffmpeg in PATH** for the RTSP path. Install with `brew install ffmpeg` on macOS.
|
|
808
|
+
**Requires ffmpeg in PATH** for the RTSP path. Install with `brew install ffmpeg` on macOS. Configure a trusted custom binary with the server-side `FFMPEG_PATH` environment variable, or set `MCP_ALLOW_EXECUTABLE_ARG=1` before using the `ffmpeg_path` tool argument. The TCP-on-6000 path uses native Node TLS and does not require ffmpeg.
|
|
775
809
|
|
|
776
810
|
```json
|
|
777
811
|
{
|
|
@@ -1191,7 +1225,7 @@ Slice an STL or 3MF file using an external slicer and return the path to the out
|
|
|
1191
1225
|
|
|
1192
1226
|
`slicer_type` options: `bambustudio`, `orcaslicer`, `prusaslicer`, `cura`, `slic3r`. When omitted, the value from the `SLICER_TYPE` environment variable is used (default: `bambustudio`).
|
|
1193
1227
|
|
|
1194
|
-
`slicer_path` and `slicer_profile` fall back to the `SLICER_PATH` and `SLICER_PROFILE` environment variables when omitted.
|
|
1228
|
+
`slicer_path` and `slicer_profile` fall back to the `SLICER_PATH` and `SLICER_PROFILE` environment variables when omitted. Per-call `slicer_path` overrides require `MCP_ALLOW_EXECUTABLE_ARG=1`.
|
|
1195
1229
|
|
|
1196
1230
|
You can provide either `template_3mf_path` or `template_name` when you want to slice from a saved template. `template_name` resolves through the local template registry directory configured for the server.
|
|
1197
1231
|
|
|
@@ -1251,31 +1285,70 @@ These defaults keep you safe when printing downloaded models. When calling `slic
|
|
|
1251
1285
|
|
|
1252
1286
|
### Advanced Tools
|
|
1253
1287
|
|
|
1254
|
-
####
|
|
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.
|
|
1288
|
+
#### Blender MCP
|
|
1257
1289
|
|
|
1258
|
-
|
|
1290
|
+
Use a standard stdio Blender MCP server with `BLENDER_MCP_COMMAND` and
|
|
1291
|
+
`BLENDER_MCP_ARGS`. For the common Blender MCP server, install `uv` and its
|
|
1292
|
+
matching Blender addon, enable the addon, and start its connection inside
|
|
1293
|
+
Blender. Set the command to your full `uvx` path and the argument array to
|
|
1294
|
+
`["blender-mcp"]`. The Claude Desktop extension also offers these two optional
|
|
1295
|
+
settings. Printer tools work without Blender configured.
|
|
1259
1296
|
|
|
1260
|
-
|
|
1297
|
+
1. Call `blender_mcp_status` with `{"connect": true}` to initialize the server
|
|
1298
|
+
and discover its tools and input schemas. A connected MCP server does not
|
|
1299
|
+
by itself prove that the Blender addon is running.
|
|
1300
|
+
2. Call `blender_mcp_call` with a discovered tool name and its arguments. The
|
|
1301
|
+
full MCP result, including images and errors, is returned. For example:
|
|
1261
1302
|
|
|
1262
1303
|
```json
|
|
1263
1304
|
{
|
|
1264
|
-
"
|
|
1265
|
-
"
|
|
1266
|
-
"execute": false
|
|
1305
|
+
"tool_name": "get_scene_info",
|
|
1306
|
+
"arguments": {"user_prompt": "Inspect the scene before preparing a print."}
|
|
1267
1307
|
}
|
|
1268
1308
|
```
|
|
1269
1309
|
|
|
1310
|
+
For advanced Blender operations, forward `execute_blender_code` with `code`
|
|
1311
|
+
and the user's original `user_prompt`. These calls may edit the active scene.
|
|
1312
|
+
Use the discovered schema rather than assuming a tool exists.
|
|
1313
|
+
|
|
1314
|
+
#### blender_mcp_edit_model
|
|
1315
|
+
|
|
1316
|
+
The standard MCP edit helper imports an STL, applies ordered edits, and exports
|
|
1317
|
+
an STL without replacing the input or an existing output. Supported operations
|
|
1318
|
+
are `decimate:<ratio>` (greater than 0 through 1), `remesh:<voxel size>` (positive,
|
|
1319
|
+
in STL coordinate units), and `boolean_union:<STL path>`. Other operations can
|
|
1320
|
+
use `blender_mcp_call`. Both processes must have access to the same file paths.
|
|
1321
|
+
When `BLENDER_MCP_COMMAND` selects standard MCP, the advertised tool schema
|
|
1322
|
+
requires an explicit `output_path` for both preview and execution. Legacy-only
|
|
1323
|
+
bridge configurations keep `output_path` optional for compatibility.
|
|
1324
|
+
|
|
1270
1325
|
```json
|
|
1271
1326
|
{
|
|
1272
1327
|
"stl_path": "/path/to/model.stl",
|
|
1273
|
-
"
|
|
1274
|
-
"
|
|
1275
|
-
"
|
|
1328
|
+
"output_path": "/path/to/model-edited.stl",
|
|
1329
|
+
"operations": ["decimate:0.5"],
|
|
1330
|
+
"user_prompt": "Reduce the triangle count of this model for printing.",
|
|
1331
|
+
"execute": false
|
|
1276
1332
|
}
|
|
1277
1333
|
```
|
|
1278
1334
|
|
|
1335
|
+
The default preview returns the plan and generated Python without launching
|
|
1336
|
+
Blender. Set `execute` to `true` to run it. A successful standard edit returns
|
|
1337
|
+
`output_verified: true`, `output_path`, byte count, and triangle count after
|
|
1338
|
+
checking the matching export receipt and a valid finite mesh. The helper
|
|
1339
|
+
preserves existing scene objects and requires Object Mode. Inspect the result
|
|
1340
|
+
before slicing; a valid STL is not a guarantee of printability.
|
|
1341
|
+
|
|
1342
|
+
The bridge enforces request deadlines, closes child connections, and never
|
|
1343
|
+
replays interrupted editing requests. After a timeout, inspect Blender before
|
|
1344
|
+
trying the edit again because execution may already have started.
|
|
1345
|
+
|
|
1346
|
+
Existing custom executables still work through `BLENDER_MCP_BRIDGE_COMMAND`.
|
|
1347
|
+
They receive `MCP_BLENDER_PAYLOAD` with the requested file and operations;
|
|
1348
|
+
their results explicitly report `output_verified: false`. A missing executable
|
|
1349
|
+
configuration is an error when execution is requested. Per-call legacy
|
|
1350
|
+
`bridge_command` overrides remain disabled unless `MCP_ALLOW_EXECUTABLE_ARG=1`.
|
|
1351
|
+
|
|
1279
1352
|
</details>
|
|
1280
1353
|
|
|
1281
1354
|
---
|
|
@@ -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 {};
|