bambu-mcp

v0.4.2
bambu-mcp Checked 2 days ago Published 10 days ago

MCP server for Bambu Lab printers (P2S/P1S/X1 family) in LAN mode: slice, upload, print, and monitor over MQTT + FTPS

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

bambu_slice

Slice an STL/STEP/3MF into a printable .3mf via the OrcaSlicer / Bambu Studio CLI. A bare STL needs presets — export them from the slicer (Export Config) and pass via `settings` (semicolon-joined printer;process JSONs). A project .3mf already embeds presets. Returns the output path to hand to bambu_upload.

ParameterTypeDescription
inputPath *stringModel on this machine (.stl/.step/.3mf)
arrangebooleanAuto-arrange (default true)
filamentsstringSemicolon-joined filament preset JSON(s)
orientbooleanAuto-orient (default true)
outputPathstringOutput .3mf path (default: <input>.sliced.3mf)
plateinteger0 = all plates, i = plate i (default 0)
settingsstringSemicolon-joined preset JSONs, e.g. 'printer.json;process.json'

bambu_status

Current printer state: gcode_state (IDLE/RUNNING/PAUSE/FINISH/FAILED), print progress percent, remaining minutes, current/total layers, the running job name, sdcard.state (present/absent/abnormal/readonly/unknown, raw values beside it), and storage: free/total KB for the SD card and internal storage when the firmware reports them (device.cam), else null. Forces a fresh MQTT pushall.

bambu_temps

Current and target temperatures in Celsius for nozzle, bed, and chamber.

bambu_ams

AMS state: each unit's humidity + temperature and every slot's filament type, color (hex), nozzle-temp range, and which slot is currently loaded. Slot numbers feed bambu_print_file's amsMapping.

bambu_hms

Active HMS (Health Management System) entries, decoded to human-readable messages. Empty array means no faults/warnings.

bambu_list_files

List files on the printer's FTPS storage. Defaults to the cache root where uploads land. Returns files (names), entries (name, bytes, modified, dir) and totalBytes (sum of file sizes in that directory). This tool does not report free space; bambu_status storage does when the firmware sends it.

ParameterTypeDescription
dirstringAbsolute directory on the printer (default '/')

bambu_upload

Upload a sliced .3mf/.gcode from this machine to the printer over FTPS. Returns the remote filename to hand to bambu_print_file.

ParameterTypeDescription
localPath *stringPath to the sliced file on this machine
remoteNamestringName on the printer (default: the local basename)

bambu_print_file

Start printing a .3mf already on the printer (upload it first, or pick one from bambu_list_files).

ParameterTypeDescription
remoteName *stringFilename on the printer's FTPS storage
amsMappingarrayMap each filament in the plate to an AMS slot (0-based), e.g. [2] prints from slot 2, [0,3] maps filament 1→slot 0, filament 2→slot 3. Trays 0-15 (AMS 0-3), 254 = external spool, 255 = unmapped. S…
bedLevelingstringBed leveling before the print: "auto" (default, the printer decides, as Bambu Studio sends), "on" or "off"
bedTypestringPlate type, e.g. "textured_plate", "cool_plate", "hot_plate" (default "auto")
flowCalistringFlow dynamics (extrusion) calibration: "auto" (default), "on" or "off"
layerInspectbooleanFirst-layer inspection where supported (default true, as Bambu Studio)
nozzleOffsetCalistringNozzle offset calibration on printers that have it: "auto" (default), "on" or "off"
plateintegerPlate number inside a multi-plate .3mf (1-based, default 1)
timelapsebooleanRecord a timelapse to the printer's storage (default false)
useAmsbooleanPull filament from the AMS if present (default true)
vibrationCalibooleanRun the vibration (resonance) test first (default false, as Bambu Studio)

bambu_pause

Pause the running print.

bambu_resume

Resume a paused print.

bambu_stop

Stop/cancel the running print. Not resumable.

bambu_gcode

Send a raw G-code line to the printer (universal escape hatch: movement, extrusion, fans, temps, etc.). Multiple lines may be separated by newlines. Use with care while a print is running.

ParameterTypeDescription
line *stringG-code, e.g. 'G28' or 'M106 S255'

bambu_set_temps

Set target temperatures in Celsius. Provide nozzleC and/or bedC. Set to 0 to turn a heater off.

ParameterTypeDescription
bedCnumberBed target °C
nozzleCnumberNozzle target °C

bambu_home

Home all axes (G28). Do not run mid-print.

bambu_light

Control the chamber light.

ParameterTypeDescription
mode *stringLight mode

bambu_set_speed

Set the print speed profile: 1 silent, 2 standard, 3 sport, 4 ludicrous.

ParameterTypeDescription
level *integer1 silent, 2 standard, 3 sport, 4 ludicrous

bambu_snapshot

Capture a single camera frame (JPEG) and write it to disk. Returns the file path and byte size.

ParameterTypeDescription
outputPathstringWhere to save the JPEG (default: bambu-snapshot-<ts>.jpg in BAMBU_PATH_ROOT, else the working dir)

bambu_download_file

Download a file from the printer's FTPS storage to this machine.

ParameterTypeDescription
localPath *stringDestination path on this machine
remoteName *stringFile name/path on the printer

bambu_delete_file

Delete a file from the printer's FTPS storage. This is permanent. Where BAMBU_DELETE_PREFIX is set, only a top-level file whose name starts with it can be deleted.

ParameterTypeDescription
remoteName *stringFile name/path on the printer to delete

makerworld_get_design

Get a MakerWorld design and its print profiles (no login needed): each profile's instanceId, title, print time, grams, filaments and whether it needs an AMS. Pass the chosen instanceId to makerworld_download.

ParameterTypeDescription
design *string | numberDesign id or makerworld.com model URL

makerworld_download

Download one MakerWorld print profile's 3MF project to this machine (needs the one-time Bambu account login). The file is a project, not sliced G-code: slice it with bambu_slice, then bambu_upload + bambu_print_file. Personal use; one profile per call.

ParameterTypeDescription
instanceId *integerPrint profile id (instanceId from makerworld_get_design)
localPathstringDestination .3mf path (default: MakerWorld's file name in the working directory or BAMBU_PATH_ROOT)