mcp-3d-printer-server 1.2.1 → 1.2.4

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 CHANGED
@@ -1,4 +1,7 @@
1
1
 
2
+ ## Thank You To FULU And Louis Rossmann
3
+
4
+ Thank you to the [FULU Foundation](https://github.com/FULU-Foundation/OrcaSlicer-bambulab) and [Louis Rossmann](https://www.youtube.com/@rossmanngroup) for standing up for consumer ownership, open source developers, repair rights, and users who should not have working hardware made worse by locked-down software. This MCP server treats the FULU OrcaSlicer-bambulab fork as a first-class Bambu project slicer target.
2
5
 
3
6
  # MCP 3D Printer Server
4
7
 
@@ -20,6 +23,7 @@
20
23
  <summary><strong>✨ What's New / Significant Updates (as of last session)</strong></summary>
21
24
 
22
25
  - **Dual Local Transports:** Added explicit `stdio` and `streamable-http` runtime modes with environment-based transport selection.
26
+ - **FULU OrcaSlicer-bambulab Support:** Added `orcaslicer-bambulab` / `fulu_orca` slicer support for Bambu project 3MF export, and made it the default Bambu slicer target when no slicer is configured.
23
27
  - **Bambu Reliability Pass:** Fixed Bambu argument wiring bugs, added FTP-backed file operations, improved status refresh behavior, and implemented practical command paths for `startJob`, `setTemperature`, and `print_3mf`.
24
28
  - **Blender Bridge Tooling:** Added `blender_mcp_edit_model` with optional execution mode for model-edit collaboration workflows.
25
29
  - **Transport Behavior Tests:** Added real behavior tests for both transports (`initialize`, `tools/list`, success + failing `tools/call`, origin rejection).
@@ -57,7 +61,7 @@
57
61
  - [Running with Docker](#running-with-docker)
58
62
  - [Using Slicers with Docker](#using-slicers-with-docker)
59
63
  - [Configuration](#configuration)
60
- - [Usage with Claude Desktop](#usage-with-claude-desktop)
64
+ - [Usage](#usage)
61
65
  - [Supported Printer Management Systems](#supported-printer-management-systems)
62
66
  - [OctoPrint](#octoprint)
63
67
  - [Klipper (via Moonraker)](#klipper-via-moonraker)
@@ -85,7 +89,7 @@
85
89
  - [Visualization Limitations](#visualization-limitations)
86
90
  - [Performance Considerations](#performance-considerations)
87
91
  - [Testing Recommendations](#testing-recommendations)
88
- - [Appendix: MCP in Practice (Code Execution, Scale, and Safety)](#appendix-mcp-in-practice-code-execution-scale-and-safety)
92
+ - [Appendix: MCP Safety Notes](#appendix-mcp-safety-notes)
89
93
  - [Badges](#badges)
90
94
  - [License](#license)
91
95
 
@@ -128,6 +132,8 @@ This server is a Model Context Protocol (MCP) server for connecting Claude with
128
132
  - Confirm temperature settings in G-code files
129
133
  - Complete end-to-end workflow from STL modification to printing
130
134
  - Print `.3mf` files directly on Bambu Lab printers (via MQTT command)
135
+ - Slice Bambu projects with FULU OrcaSlicer-bambulab (`SLICER_TYPE=orcaslicer-bambulab`) and auto-slice unsliced 3MF files before Bambu printing when a project slicer is configured
136
+ - Inspect and probe the FULU BambuNetwork runtime (`check_fulu_orca_setup`) and call safe-by-default FULU bridge RPC methods for diagnostics and development (`fulu_bambu_network_rpc`)
131
137
  - Read Bambu Studio preset files (printer, filament, process) as resources
132
138
 
133
139
  ## Installation
@@ -169,12 +175,12 @@ Please note that the default Docker setup **cannot directly use a slicer install
169
175
 
170
176
  The recommended approach is to **install your preferred slicer *inside* the Docker image**. This makes the container self-sufficient.
171
177
 
172
- To do this, you will need to modify the `Dockerfile`. Here's a conceptual example of how you might add PrusaSlicer or OrcaSlicer (specific commands may vary depending on the slicer, its dependencies, and current Alpine packages):
178
+ To do this, you will need to modify the `Dockerfile`. Here's a conceptual example of how you might add PrusaSlicer, OrcaSlicer, or the FULU OrcaSlicer-bambulab build (specific commands may vary depending on the slicer, its dependencies, and current Alpine packages):
173
179
 
174
180
  ```dockerfile
175
181
  # ... other Dockerfile commands ...
176
182
 
177
- # Example: Install PrusaSlicer or OrcaSlicer (adjust command as needed)
183
+ # Example: Install PrusaSlicer, OrcaSlicer, or FULU OrcaSlicer-bambulab (adjust command as needed)
178
184
  # Check Alpine package repositories first (e.g., apk add prusaslicer or apk add orcaslicer)
179
185
  # If not available, download and install manually (e.g., AppImage):
180
186
  # RUN apk add --no-cache fuse # FUSE might be needed for AppImages
@@ -188,7 +194,7 @@ ENV SLICER_PATH=/usr/local/bin/orcaslicer
188
194
  # ... rest of Dockerfile ...
189
195
  ```
190
196
 
191
- After modifying the `Dockerfile`, rebuild your image (`docker-compose build`). You'll also need to ensure the `SLICER_PATH` environment variable in your `.env` file or `docker-compose.yml` points to the correct path *inside the container* (e.g., `/usr/local/bin/orcaslicer`). Set `SLICER_TYPE` to `orcaslicer` as well.
197
+ After modifying the `Dockerfile`, rebuild your image (`docker-compose build`). You'll also need to ensure the `SLICER_PATH` environment variable in your `.env` file or `docker-compose.yml` points to the correct path *inside the container* (e.g., `/usr/local/bin/orcaslicer`). For the FULU Bambu-enabled fork, set `SLICER_TYPE=orcaslicer-bambulab`.
192
198
 
193
199
  Apologies for not including a specific slicer out-of-the-box, but given the wide variety of slicers (PrusaSlicer, OrcaSlicer, Cura, etc.) and configurations available, pre-installing one would unnecessarily bloat the image for many users. If a particular slicer becomes a very common request, I can certainly look into adding official support for it in a future version.
194
200
 
@@ -216,10 +222,23 @@ BED_TYPE=textured_plate # Bed plate: textured_plate, cool_plate, engine
216
222
  NOZZLE_DIAMETER=0.4 # Nozzle diameter in mm (default: 0.4)
217
223
 
218
224
  # Slicer configuration (for slice_stl tool)
219
- SLICER_TYPE=prusaslicer # Options: prusaslicer, cura, slic3r, orcaslicer, bambustudio
225
+ # For Bambu projects, the default is orcaslicer-bambulab unless SLICER_TYPE is set.
226
+ SLICER_TYPE=orcaslicer-bambulab # Options: prusaslicer, cura, slic3r, orcaslicer, orcaslicer-bambulab, bambustudio
220
227
  SLICER_PATH=/path/to/slicer/executable
221
228
  SLICER_PROFILE=/path/to/slicer/profile
222
229
 
230
+ # Optional aliases for FULU OrcaSlicer-bambulab when SLICER_PATH is not set
231
+ FULU_ORCA_PATH=/path/to/FULU/OrcaSlicer
232
+ ORCASLICER_BAMBULAB_PATH=/path/to/FULU/OrcaSlicer
233
+ FULU_ORCA_PLUGIN_DIR=/path/to/FULU/OrcaSlicer.app/Contents/MacOS
234
+ ORCASLICER_BAMBULAB_PLUGIN_DIR=/path/to/FULU/OrcaSlicer.app/Contents/MacOS
235
+
236
+ # Optional FULU BambuNetwork bridge runtime
237
+ # macOS default runtime dir:
238
+ # /Users/you/Library/Application Support/OrcaSlicer/macos-bridge/runtime
239
+ PJARCZAK_MAC_RUNTIME_DIR=
240
+ FULU_BAMBU_BRIDGE_COMMAND=
241
+
223
242
  # Optional: Path to Bambu Studio user config dir (for loading presets)
224
243
  # Example macOS: /Users/your_user/Library/Application Support/BambuStudio/user/YOUR_USER_ID
225
244
  # Example Windows: C:\Users\your_user\AppData\Roaming\BambuStudio\user\YOUR_USER_ID
@@ -239,46 +258,200 @@ MCP_HTTP_ALLOWED_ORIGINS=http://localhost
239
258
  BLENDER_MCP_BRIDGE_COMMAND=
240
259
  ```
241
260
 
242
- ## Usage with Claude Desktop
261
+ ## Usage
243
262
 
244
- 1. Edit your Claude Desktop configuration file:
263
+ Add this server to your MCP client's config (Claude Desktop, Claude Code, Cursor, Codex, or any MCP-compatible client). Most JSON-based clients use an `mcpServers` entry with the command and env vars:
245
264
 
246
265
  ```json
247
266
  {
248
267
  "mcpServers": {
249
268
  "3dprint": {
250
- "command": "mcp-3d-printer-server",
269
+ "command": "npx",
270
+ "args": ["-y", "mcp-3d-printer-server"],
251
271
  "env": {
252
- "API_KEY": "your_api_key_here",
253
272
  "PRINTER_HOST": "your_printer_ip",
254
- "PRINTER_TYPE": "octoprint"
273
+ "PRINTER_TYPE": "bambu",
274
+ "BAMBU_SERIAL": "your_printer_serial",
275
+ "BAMBU_TOKEN": "your_access_token",
276
+ "BAMBU_MODEL": "p1s",
277
+ "SLICER_TYPE": "orcaslicer-bambulab",
278
+ "SLICER_PATH": "/path/to/FULU/OrcaSlicer",
279
+ "FULU_ORCA_PLUGIN_DIR": "/Applications/OrcaSlicer.app/Contents/MacOS"
255
280
  }
256
281
  }
257
282
  }
258
283
  }
259
284
  ```
260
285
 
261
- 2. For Bambu Labs printers:
286
+ For non-Bambu printers, replace the Bambu-specific env vars with `API_KEY` and the appropriate `PRINTER_TYPE` (see [Supported Printer Management Systems](#supported-printer-management-systems)).
287
+
288
+ ### FULU OrcaSlicer-bambulab
289
+
290
+ Use [`FULU-Foundation/OrcaSlicer-bambulab`](https://github.com/FULU-Foundation/OrcaSlicer-bambulab) as the first-class Bambu project slicer by setting:
291
+
292
+ ```env
293
+ PRINTER_TYPE=bambu
294
+ SLICER_TYPE=orcaslicer-bambulab
295
+ SLICER_PATH=/path/to/FULU/OrcaSlicer
296
+ FULU_ORCA_PLUGIN_DIR=/path/to/FULU/runtime/payload
297
+ BAMBU_MODEL=p1s
298
+ ```
299
+
300
+ Accepted aliases include `fulu_orca`, `fulu-orca`, `orca-studio`, and `orca_bambulab`. For Bambu printers, this is the default slicer family when `SLICER_TYPE` is not set.
301
+
302
+ What the integration does:
303
+
304
+ - `slice_stl` uses the FULU/Orca project CLI shape (`--slice 0 --export-3mf`) to produce a sliced Bambu-compatible 3MF.
305
+ - `print_3mf` can auto-slice an unsliced 3MF through FULU OrcaSlicer-bambulab, then upload and start the sliced project through this server's Bambu print path.
306
+ - `check_fulu_orca_setup` verifies the FULU executable, platform runtime payload, setup commands, and optional BambuNetwork bridge handshake.
307
+ - `fulu_bambu_network_rpc` can call the FULU bridge protocol for diagnostics and development. Read-only methods are allowed by default; mutating methods require `allow_mutating_method=true`; FULU print methods still require `bambu_model`.
308
+
309
+ What stays deliberately explicit:
310
+
311
+ - This MCP server's existing Bambu print path is local MQTT plus FTPS and still needs `BAMBU_SERIAL`, `BAMBU_TOKEN`, and `PRINTER_HOST`.
312
+ - FULU's BambuNetwork bridge is a separate runtime. The MCP can inspect it, probe it, and issue guarded bridge RPC calls, but it will not silently switch a print from local LAN control to cloud/BambuNetwork control.
313
+ - `BAMBU_MODEL` remains mandatory for Bambu print operations because wrong machine presets can produce dangerous G-code.
314
+
315
+ #### Current Bench Test Status
316
+
317
+ This integration has been tested against the current FULU macOS release artifacts and a local Benchy smoke test. The MCP-side bug found during that bench was real: Bambu-family project slicers must use Orca/Bambu preset JSON with `--load-settings`, not the invalid `--load-machine` flag. That is fixed here.
318
+
319
+ The old Bambu Studio fallback still works. Set:
320
+
321
+ ```env
322
+ SLICER_TYPE=bambustudio
323
+ SLICER_PATH=/Applications/BambuStudio.app/Contents/MacOS/BambuStudio
324
+ ```
325
+
326
+ With that fallback, the same Benchy 3MF sliced successfully through Bambu Studio's CLI into a Bambu-compatible project 3MF. This is the known-good path while FULU platform packaging settles.
327
+
328
+ macOS is not proven green yet. On this Mac, the FULU arm64 and x86_64 macOS release bundles hit the same CLI slice problem during Benchy testing: one path crashed with `SIGSEGV` inside OrcaSlicer CLI processing, and repeated attempts left uninterruptible macOS `UE` processes that ignored `SIGKILL`. The MCP now avoids pretending that is solved. `check_fulu_orca_setup` can inspect the bundle and bridge payload, but macOS users should treat FULU CLI slicing as active feedback territory until FULU ships a stable macOS CLI/runtime combination.
329
+
330
+ We need Windows testers. The WSL 2 setup path, payload checks, and bridge command shape are represented in this MCP, but the full Windows path still needs real reports from people who can validate `install_runtime.ps1`, `verify_runtime.ps1`, bridge probing, CLI slicing, and a known-safe print workflow on their own machine.
331
+
332
+ We will keep iterating with user and contributor feedback. Please report the OS, CPU architecture, FULU release asset name, `check_fulu_orca_setup` result, slicer command stderr, and whether the Bambu Studio fallback works on the same model.
333
+
334
+ #### FULU Runtime Setup By Platform
335
+
336
+ The FULU README currently says macOS is work in progress, but the source tree already ships macOS Lima runtime scripts and Windows WSL runtime scripts. This MCP knows those file layouts and returns the exact commands through `check_fulu_orca_setup`.
337
+
338
+ Windows:
339
+
340
+ ```bat
341
+ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
342
+ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
343
+ ```
344
+
345
+ Restart Windows, then run the FULU package scripts from the directory that contains `install_runtime.ps1`:
346
+
347
+ ```powershell
348
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\install_runtime.ps1 -PackageDir . -PluginDir .
349
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\verify_runtime.ps1 -PackageDir . -PluginDir .
350
+ ```
351
+
352
+ Linux:
353
+
354
+ Install the FULU OrcaSlicer-bambulab build normally, set `SLICER_TYPE=orcaslicer-bambulab`, and point `SLICER_PATH` at the executable. If you want bridge-level diagnostics, set `FULU_BAMBU_BRIDGE_COMMAND` to the packaged `pjarczak_bambu_linux_host`.
355
+
356
+ macOS:
357
+
358
+ Set the app payload directory, then run the scripts that FULU copies into the app bundle:
359
+
360
+ ```bash
361
+ export FULU_ORCA_PLUGIN_DIR="/Applications/OrcaSlicer.app/Contents/MacOS"
362
+ bash "$FULU_ORCA_PLUGIN_DIR/install_runtime_macos.sh" -PackageDir "$FULU_ORCA_PLUGIN_DIR" -PluginDir "$FULU_ORCA_PLUGIN_DIR"
363
+ bash "$FULU_ORCA_PLUGIN_DIR/verify_runtime_macos.sh" -PackageDir "$FULU_ORCA_PLUGIN_DIR" -PluginDir "$FULU_ORCA_PLUGIN_DIR"
364
+ ```
365
+
366
+ The default installed runtime is:
367
+
368
+ ```text
369
+ ~/Library/Application Support/OrcaSlicer/macos-bridge/runtime
370
+ ```
371
+
372
+ The bridge command shape is:
373
+
374
+ ```bash
375
+ "/Applications/OrcaSlicer.app/Contents/MacOS/pjarczak-bambu-linux-host-wrapper" "$HOME/Library/Application Support/OrcaSlicer/macos-bridge/runtime/pjarczak_bambu_linux_host"
376
+ ```
377
+
378
+ If your app is named `Orca Studio.app` or lives somewhere else, pass its real `Contents/MacOS` path as `plugin_dir` or `FULU_ORCA_PLUGIN_DIR`.
379
+
380
+ #### Check The Setup Through MCP
381
+
382
+ Ask your MCP client to call `check_fulu_orca_setup`, or call it from an agent with arguments like:
262
383
 
263
384
  ```json
264
385
  {
265
- "mcpServers": {
266
- "3dprint": {
267
- "command": "mcp-3d-printer-server",
268
- "env": {
269
- "PRINTER_HOST": "your_printer_ip",
270
- "PRINTER_TYPE": "bambu",
271
- "BAMBU_SERIAL": "your_printer_serial",
272
- "BAMBU_TOKEN": "your_access_token",
273
- "BAMBU_MODEL": "p1s"
274
- }
386
+ "platform": "darwin",
387
+ "slicer_path": "/Applications/OrcaSlicer.app/Contents/MacOS/OrcaSlicer",
388
+ "plugin_dir": "/Applications/OrcaSlicer.app/Contents/MacOS",
389
+ "run_bridge_probe": true,
390
+ "bridge_command": "\"/Applications/OrcaSlicer.app/Contents/MacOS/pjarczak-bambu-linux-host-wrapper\" \"$HOME/Library/Application Support/OrcaSlicer/macos-bridge/runtime/pjarczak_bambu_linux_host\""
391
+ }
392
+ ```
393
+
394
+ The result reports missing payload files, install/verify commands, the MCP env values to use, and bridge handshake/capability/runtime info when probing is enabled.
395
+
396
+ #### FULU Bridge RPC
397
+
398
+ `fulu_bambu_network_rpc` speaks the FULU bridge frame protocol from the MCP side. The protocol is little-endian binary frames with JSON bodies, using methods such as `bridge.handshake`, `bridge.capabilities`, `bridge.runtime_info`, and `net.get_user_print_info`.
399
+
400
+ Safe diagnostic example:
401
+
402
+ ```json
403
+ {
404
+ "method": "bridge.runtime_info",
405
+ "bridge_command": "\"/Applications/OrcaSlicer.app/Contents/MacOS/pjarczak-bambu-linux-host-wrapper\" \"$HOME/Library/Application Support/OrcaSlicer/macos-bridge/runtime/pjarczak_bambu_linux_host\""
406
+ }
407
+ ```
408
+
409
+ Mutating methods are intentionally gated:
410
+
411
+ ```json
412
+ {
413
+ "method": "net.start_print",
414
+ "allow_mutating_method": true,
415
+ "bambu_model": "p1s",
416
+ "payload": {
417
+ "client_job_id": 1,
418
+ "params": {
419
+ "dev_id": "YOUR_PRINTER_ID"
275
420
  }
276
421
  }
277
422
  }
278
423
  ```
279
424
 
280
- 3. Restart Claude Desktop
281
- 4. Connect to your printer through Claude
425
+ That second example is intentionally incomplete because real BambuNetwork print calls need the full FULU/Bambu print parameter payload. The important part is that the MCP exposes the bridge without pretending a cloud print can be safely inferred from a local filename.
426
+
427
+ Where this config lives depends on your client and OS:
428
+
429
+ | Client / scope | macOS / Linux location | Windows location |
430
+ |----------------|------------------------|------------------|
431
+ | Claude Desktop (macOS / Windows) | `~/Library/Application Support/Claude/claude_desktop_config.json` | `%APPDATA%\Claude\claude_desktop_config.json` |
432
+ | Claude Desktop (Linux) | Not officially supported for local MCP yet; Claude Desktop docs still list Linux support as coming soon. | N/A |
433
+ | Claude Code (project-shared MCP) | `.mcp.json` in the project root | `.mcp.json` in the project root |
434
+ | Claude Code (user/local MCP) | `~/.claude.json` | `%USERPROFILE%\.claude.json` |
435
+ | Claude Code settings (not MCP server definitions) | `~/.claude/settings.json` | `%USERPROFILE%\.claude\settings.json` |
436
+ | Cursor (project) | `.cursor/mcp.json` in the project root | `.cursor\mcp.json` in the project root |
437
+ | Cursor (global) | `~/.cursor/mcp.json` | `%USERPROFILE%\.cursor\mcp.json` |
438
+ | Codex (user; CLI, IDE extension, app) | `~/.codex/config.toml` | `%USERPROFILE%\.codex\config.toml` |
439
+ | Codex (project, trusted projects only) | `.codex/config.toml` in the project root | `.codex\config.toml` in the project root |
440
+
441
+ Codex uses TOML instead of the JSON shape above. You can manage MCP servers with `codex mcp`, or edit `config.toml` directly with a `[mcp_servers.<name>]` entry.
442
+
443
+ Restart your client after editing the config. For Codex, run `/mcp` or `codex mcp list` to confirm the server loaded.
444
+
445
+ ### Recommended: use with codemode-mcp
446
+
447
+ 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, codemode lets the agent write code against a two-tool interface (`search()` and `execute()`), loading only the tools it needs on demand.
448
+
449
+ Anthropic and Cloudflare independently demonstrated this pattern reduces MCP token costs by up to 98%:
450
+
451
+ - [Code execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp) (Anthropic)
452
+ - [Code Mode: give agents an entire API in 1,000 tokens](https://blog.cloudflare.com/code-mode-mcp/) (Cloudflare)
453
+
454
+ This applies to all MCP servers, not just this one.
282
455
 
283
456
  ## Supported Printer Management Systems
284
457
 
@@ -348,6 +521,8 @@ Prusa Connect is Prusa's own cloud-based solution for managing their printers.
348
521
  - Authentication: API key required
349
522
  - Compatible with: Prusa MK4, Prusa Mini, Prusa XL, and other Prusa printers with Prusa Connect
350
523
 
524
+ For Prusa Connect cloud, use `connect.prusa3d.com` with `PRINTER_PORT=443`, or include the scheme directly with `PRINTER_HOST=https://connect.prusa3d.com`. The server normalizes both forms to HTTPS. Local PrusaLink hosts continue to use HTTP unless you provide an `https://` host or port `443`.
525
+
351
526
  #### Setting up Prusa Connect
352
527
 
353
528
  1. Make sure your Prusa printer is updated to the latest firmware
@@ -532,12 +707,15 @@ Slice an STL file to generate G-code.
532
707
  ```json
533
708
  {
534
709
  "stl_path": "/path/to/file.stl",
535
- "slicer_type": "prusaslicer",
536
- "slicer_path": "/path/to/prusaslicer",
537
- "slicer_profile": "/path/to/profile.ini"
710
+ "slicer_type": "orcaslicer",
711
+ "slicer_path": "/path/to/orcaslicer",
712
+ "slicer_profile": "/path/to/machine.json;/path/to/process.json",
713
+ "filament_profile": "/path/to/flat-nylon-filament.json"
538
714
  }
539
715
  ```
540
716
 
717
+ For OrcaSlicer, the server uses `--slice 0 --outputdir` and returns the renamed `plate_1.gcode` output. Load filament separately with `filament_profile` (`--load-filaments`) or encode it in `slicer_profile` after a pipe, for example `/path/to/process.json|/path/to/filament.json`.
718
+
541
719
  #### confirm_temperatures
542
720
 
543
721
  Confirm temperature settings in a G-code file.
@@ -605,7 +783,7 @@ For Bambu printers, lists files in the `gcodes` directory via FTP.
605
783
 
606
784
  #### upload_gcode
607
785
 
608
- Upload a G-code file to the printer.
786
+ Upload G-code content or a local G-code file path to the printer.
609
787
 
610
788
  ```json
611
789
  {
@@ -618,6 +796,18 @@ Upload a G-code file to the printer.
618
796
  }
619
797
  ```
620
798
 
799
+ For larger files, pass a local path instead. If `filename` is omitted, the printer filename defaults to the basename of `gcode_path`.
800
+
801
+ ```json
802
+ {
803
+ "host": "192.168.1.100",
804
+ "type": "klipper",
805
+ "api_key": "YOUR_API_KEY",
806
+ "gcode_path": "/path/to/my_print.gcode",
807
+ "print": true
808
+ }
809
+ ```
810
+
621
811
  For Bambu printers, uploads to the `gcodes` directory via FTP. Cannot start print automatically.
622
812
 
623
813
  #### start_print
@@ -663,7 +853,7 @@ Set the temperature of a printer component.
663
853
  }
664
854
  ```
665
855
 
666
- **Not supported for Bambu printers** via direct MQTT commands.
856
+ For Bambu printers, this dispatches firmware G-code temperature commands (`M104` for nozzle, `M140` for bed) over MQTT.
667
857
 
668
858
  </details>
669
859
 
@@ -672,9 +862,34 @@ Set the temperature of a printer component.
672
862
 
673
863
  ### Bambu-Specific Tools
674
864
 
865
+ #### check_fulu_orca_setup
866
+
867
+ Inspects the FULU OrcaSlicer-bambulab executable, platform runtime payload, setup commands, and optional BambuNetwork bridge probe.
868
+
869
+ ```json
870
+ {
871
+ "platform": "darwin",
872
+ "slicer_path": "/Applications/OrcaSlicer.app/Contents/MacOS/OrcaSlicer",
873
+ "plugin_dir": "/Applications/OrcaSlicer.app/Contents/MacOS",
874
+ "run_bridge_probe": true,
875
+ "bridge_command": "\"/Applications/OrcaSlicer.app/Contents/MacOS/pjarczak-bambu-linux-host-wrapper\" \"$HOME/Library/Application Support/OrcaSlicer/macos-bridge/runtime/pjarczak_bambu_linux_host\""
876
+ }
877
+ ```
878
+
879
+ #### fulu_bambu_network_rpc
880
+
881
+ Calls one FULU BambuNetwork bridge JSON RPC method. Read-only methods such as `bridge.handshake`, `bridge.runtime_info`, and `net.get_user_print_info` are allowed by default. Methods that can mutate account, printer, cloud, or print state require `allow_mutating_method=true`; FULU print methods also require `bambu_model`.
882
+
883
+ ```json
884
+ {
885
+ "method": "bridge.handshake",
886
+ "bridge_command": "\"/Applications/OrcaSlicer.app/Contents/MacOS/pjarczak-bambu-linux-host-wrapper\" \"$HOME/Library/Application Support/OrcaSlicer/macos-bridge/runtime/pjarczak_bambu_linux_host\""
887
+ }
888
+ ```
889
+
675
890
  #### print_3mf
676
891
 
677
- Uploads a `.3mf` file to a Bambu printer via FTP and initiates the print job via an MQTT command. Allows overriding some print parameters like AMS mapping.
892
+ Uploads a sliced `.3mf` file to a Bambu printer via FTP and initiates the print job via an MQTT command. If the 3MF has no embedded plate G-code and a project slicer is configured, the server can auto-slice it first with FULU OrcaSlicer-bambulab or Bambu Studio. Allows overriding some print parameters like AMS mapping.
678
893
 
679
894
  **`bambu_model` is required** -- it ensures the slicer generates G-code for the correct printer. Using the wrong model can cause the bed to crash into the nozzle and damage the printer. If not provided in the tool call and `BAMBU_MODEL` is not set in the environment, the server will ask interactively via MCP elicitation (if supported by your client) or return a clear error.
680
895
 
@@ -686,6 +901,8 @@ Uploads a `.3mf` file to a Bambu printer via FTP and initiates the print job via
686
901
  "host": "your_bambu_ip",
687
902
  "bambu_serial": "YOUR_SERIAL",
688
903
  "bambu_token": "YOUR_TOKEN",
904
+ "slicer_type": "orcaslicer-bambulab",
905
+ "slicer_path": "/path/to/FULU/OrcaSlicer",
689
906
  "use_ams": true,
690
907
  "ams_mapping": [0, 1, 2, 3],
691
908
  "bed_leveling": true,
@@ -767,18 +984,20 @@ Here are some example commands you can give to Claude after connecting the MCP s
767
984
 
768
985
  Due to the nature of the Bambu Lab printer API, there are some limitations:
769
986
 
770
- 1. **Printable 3MF requirement:** `print_3mf` requires a sliced 3MF that includes at least one `Metadata/plate_<n>.gcode` entry so the server can compute MD5 and start the job correctly.
987
+ 1. **Printable 3MF requirement:** `print_3mf` ultimately needs a sliced 3MF that includes at least one `Metadata/plate_<n>.gcode` entry so the server can compute MD5 and start the job correctly. Unsliced 3MF files can be auto-sliced first when `SLICER_TYPE=orcaslicer-bambulab` or `SLICER_TYPE=bambustudio` is configured.
771
988
 
772
- 2. **AMS behavior caveat:** The current `bambu-js` project-file command path always sends `use_ams=true`; passing `use_ams=false` is treated as best-effort and surfaced with a warning.
989
+ 2. **AMS behavior caveat:** AMS mapping is passed through the MQTT project-file command, but real behavior still depends on printer firmware, loaded filament, and the sliced project's metadata.
773
990
 
774
991
  3. **Temperature control path:** Temperature updates are implemented through G-code command dispatch (`M104`/`M140`) over MQTT, so effective behavior still depends on printer firmware acceptance and current printer state.
775
992
 
776
- 4. **File transfer channel:** File operations use Bambu's FTPS path (port 990) via `bambu-js`. This is more secure than plain FTP, but still assumes a trusted local network environment and library-managed TLS behavior.
993
+ 4. **File transfer channel:** Uploads use Bambu's FTPS path (port 990) directly through `basic-ftp` with implicit TLS. Some read/list operations still use `bambu-js` helpers.
777
994
 
778
995
  5. **Direct start path scope:** `startJob` currently targets `.gcode` files on printer storage; `.3mf` jobs should be initiated through `print_3mf` so metadata and plate selection are handled.
779
996
 
780
997
  6. **Status consistency:** Status reads force a `pushall` refresh when possible, but complete real-time, event-stream status semantics across all Bambu models still need deeper hardening.
781
998
 
999
+ 7. **FULU BambuNetwork bridge scope:** The FULU bridge exposes BambuNetwork functionality through its own runtime and RPC protocol. This MCP can inspect/probe that runtime and issue guarded bridge RPC calls, but local `print_3mf` still uses the server's explicit local MQTT/FTPS path unless a future change maps a complete FULU cloud-print payload safely.
1000
+
782
1001
  ## Limitations and Considerations
783
1002
 
784
1003
  ### Memory Usage
@@ -805,56 +1024,19 @@ Due to the nature of the Bambu Lab printer API, there are some limitations:
805
1024
  - Test modifications on simple geometries before attempting complex ones
806
1025
  - Consider running on a system with at least 4GB of available RAM for larger operations
807
1026
 
808
- ## Appendix: MCP in Practice (Code Execution, Scale, and Safety)
809
-
810
- Last updated: 2026-02-24
811
-
812
- ### State of MCP Right Now
813
- MCP remains a high-value protocol for interoperability, but large tool surfaces have a real downside: tool schemas, retries, and tool-call traces can flood the context window. More tools often means more token overhead unless the execution model is disciplined.
1027
+ ## Appendix: MCP Safety Notes
814
1028
 
815
- ### Why Code Mode / Code Execution Has Become Important
816
- Recent production workflows increasingly move orchestration out of conversational turns and into executable code loops. This keeps context leaner, makes behavior easier to audit, and improves reproducibility.
1029
+ See [Recommended: use with codemode-mcp](#recommended-use-with-codemode-mcp) for reducing token overhead with large tool surfaces.
817
1030
 
818
- Core reading:
819
- - Cloudflare: https://blog.cloudflare.com/code-mode/
820
- - Cloudflare: https://blog.cloudflare.com/code-execution-with-mcp/
821
- - Anthropic: https://www.anthropic.com/engineering/code-execution-with-mcp
1031
+ ### Prompt Injection: Risks and Mitigations
822
1032
 
823
- ### Setup Guidance for Users
824
- For practical day-to-day use, start with a codemode-oriented gateway and keep direct tool exposure narrow:
825
- - `codemode-mcp`: https://github.com/jx-codes/codemode-mcp
826
- - UTCP routing guidance: https://www.utcp.io
1033
+ Prompt injection is an open problem for tool-using agents. Practical mitigations:
827
1034
 
828
- Even with strong setup, model/tool usage can still be inconsistent across client versions and model releases, so retries and deterministic fallbacks are still required.
829
-
830
- ### Peter Steinberger Workflow Pattern
831
- A high-signal pattern is converting broad MCP toolsets into targeted CLIs so the model calls fewer, better-defined commands:
832
- - MCPorter: https://github.com/steipete/mcporter
833
- - OpenClaw: https://github.com/steipete/openclaw
834
-
835
- ### What Works Best With Which Clients
836
- - Claude Code, Codex CLI, and Cursor agent modes: strong fit for direct MCP and code-execution workflows.
837
- - Thin hosted chat clients: usually better when MCP servers are wrapped behind narrower CLIs/gateways.
838
- - Large multi-tool servers: best when grouped into task-specific wrappers instead of exposing every tool directly.
839
-
840
- This ecosystem changes quickly; if you are reading this later, parts of this section may already be stale.
841
-
842
- ### Prompt Injection: Risks, Consequences, and Mitigations
843
- Prompt injection is still an open problem for tool-using agents. It is manageable, but not solved.
844
-
845
- Primary risks:
846
- - Hidden malicious instructions in remote content or tool output.
847
- - Secret exfiltration via unintended network/tool calls.
848
- - Unauthorized state changes (filesystem, infrastructure, or printer actions).
849
-
850
- Practical mitigations:
851
1035
  - Least-privilege credentials and short-lived tokens.
852
1036
  - Strict schema validation and explicit allowlists for actions/hosts.
853
1037
  - Human confirmation gates for destructive operations.
854
1038
  - Execution sandboxing with resource/time limits.
855
- - Structured logs and replayable runs for incident response.
856
-
857
- Treat tool output as untrusted input by default.
1039
+ - Treat tool output as untrusted input by default.
858
1040
 
859
1041
  ## Badges
860
1042
 
@@ -0,0 +1,20 @@
1
+ export type FuluOrcaSetupOptions = {
2
+ slicerPath?: string;
3
+ pluginDir?: string;
4
+ runtimeDir?: string;
5
+ platform?: string;
6
+ bridgeCommand?: string;
7
+ runBridgeProbe?: boolean;
8
+ probeTimeoutMs?: number;
9
+ };
10
+ export type FuluBridgeRpcOptions = {
11
+ bridgeCommand?: string;
12
+ method: string;
13
+ payload?: Record<string, unknown>;
14
+ timeoutMs?: number;
15
+ allowMutatingMethod?: boolean;
16
+ bambuModel?: string;
17
+ };
18
+ export declare function isFuluPrintRpcMethod(method: string): boolean;
19
+ export declare function invokeFuluBridgeRpc(options: FuluBridgeRpcOptions): Promise<Record<string, unknown>>;
20
+ export declare function inspectFuluOrcaSetup(options: FuluOrcaSetupOptions): Promise<Record<string, unknown>>;