bambu-mcp
Monitors and controls Bambu Lab 3D printers over the local network. Provides tools for reading printer status, temperatures, AMS filament information, camera snapshots, print options, and SD files, plus control operations such as homing, axis movement, nozzle selection, fan and light control, hotend rack management, calibration, filament load/unload, print start/pause/resume/stop, file deletion, and raw G-code sending, with dry-run confirmation and safety limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bambu-mcp What's my printer doing right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bambu-mcp
An MCP server that lets Claude (or any MCP client) monitor and control a Bambu Lab 3D printer over your local network.
Unofficial. This project is not made by, affiliated with, or endorsed by Bambu Lab. "Bambu Lab" and its product names are trademarks of their owner.
It controls a machine that heats and moves. It needs the printer's Developer Mode, and you use it at your own risk. Read docs/SAFETY.md first.
Status
Tested on a real printer: Bambu Lab H2C, firmware 01.02.00.00. Status, camera, homing and jogging, nozzle switching, the hotend rack (including Read All), temperatures (nozzles, bed, chamber), fans, air management, lights, speed, every Print Option and AMS tag reading all worked.
Not yet tested on a real printer:
starting, pausing, resuming and stopping a print
deleting files
calibration
filament load, unload and extrude
Other 13 models: built from Bambu's published specs and Bambu Studio's source, and tested only against a simulated printer. Reports from real printers are welcome; see CONTRIBUTING.md.
LAN only. There is no cloud support: Developer Mode, which LAN control needs on current firmware, disconnects the printer from Bambu Cloud and Bambu Handy.
Related MCP server: bambu-printer-mcp
What it looks like
Ask your MCP client things like:
"What's my printer doing?"
"Show me the camera."
"What filament is in the AMS?"
"Preheat the bed to 60."
Read requests run straight away. Anything that changes the printer is a dry run first: the tool shows exactly what it would send, and only acts when called again with confirm=true.
Supported printers
Set BAMBU_MODEL to one of these names. The default is H2C.
get_status warns if the printer reports a different model.
| Nozzles | Max nozzle / bed / chamber (°C) | Camera | Unverified fields |
| 2 + 6-hotend rack | 350 / 120 / 65 heated | RTSPS | none (tested live) |
| 2 | 350 / 120 / 65 heated | RTSPS | — |
| 2 | 350 / 120 / 65 heated | RTSPS | build volume; nozzle, bed and chamber limits* (no spec page; H2D values used) |
| 1 | 350 / 120 / 65 heated | RTSPS | — |
| 1 + tool changer | 350 / 120 / 65 heated | RTSPS | nozzle count, tool changer, rack size, lights |
| 2 | 300 / 120 / 65 heated | RTSPS | tool changer, lights |
| 1 | 300 / 110 / sensor only | RTSPS | bed limit*, build volume, product name |
| 1 | 320 / 110 / 60 heated | RTSPS | bed limit*, build volume, product name |
| 1 | 300 / 110 / sensor only | RTSPS | — |
| 1 | 300 / 100 / none | JPEG port 6000 | nozzle and bed limits*, build volume |
| 1 | 300 / 100 / none | JPEG port 6000 | nozzle and bed limits*, build volume, fans |
| 1 | 300 / 100 / none | JPEG port 6000 | lights |
| 1 | 300 / 80 / none | JPEG port 6000 | lights |
| 1 | 300 / 80 / none | JPEG port 6000 | lights |
* Not confirmed from a Bambu spec page, but not yet listed in the unverified field that get_printer_profile returns. The other entries are listed there.
gcode_file_prefix, the path used to print plain .gcode files, is unverified on every model. Use sliced .gcode.3mf files.
Where an official figure couldn't be confirmed, the profile uses the lower, safer value and marks it unverified.
Each profile file cites its sources: bambulab.com spec pages (read 2026-11-10) and the ha-bambulab integration for protocol details.
Aliases X1, A1 mini and H2D-Pro also work.
1. Prepare the printer
Enable LAN Only Mode on the printer touchscreen (Settings > Network / WLAN).
Enable Developer Mode (it appears once LAN Only Mode is on). Current firmware has Authorization Control, which blocks third-party LAN commands unless Developer Mode is on. Developer Mode disconnects the printer from Bambu Cloud. See Bambu's guide.
Note the Access Code from the same network screen. It changes when you toggle LAN Only Mode.
Note the printer's IP address and serial number (Settings > Device). Give the printer a DHCP reservation in your router so its IP doesn't change.
For camera snapshots: enable LAN Mode Liveview (Settings > General; the label varies by firmware). Also install ffmpeg (
winget install Gyan.FFmpeg).
2. Install
You need Python 3.11 or newer and git.
git clone https://github.com/JacobJBurrell/bambu-mcp.git
cd bambu-mcp
python -m venv .venv
.venv\Scripts\pip install -e ".[dev]"
.venv\Scripts\python -m pytest # no printer neededOn Linux or macOS, use .venv/bin/pip and .venv/bin/python instead.
Two Windows notes:
Clone into a short path (for example
C:\dev\bambu-mcp). Windows' 260-character path limit breaks compiled packages inside deeply nested folders.On Windows-on-ARM, use an x64 Python.
cryptography, whichmcpneeds, has no native ARM64 build.
3. Configure credentials
The server reads only environment variables. Never put them in code.
Variable | Value |
| Printer IP, e.g. |
| Printer serial number |
| LAN access code |
| Optional, default |
| Optional. Set to |
To set them once for your Windows user (then restart your MCP client):
setx BAMBU_IP "192.168.1.50"
setx BAMBU_SERIAL "YOUR_SERIAL"For the access code, run this script. It asks for the code without showing it as you type:
powershell -ExecutionPolicy Bypass -File scripts\set_access_code.ps14. Connect to Claude
Use the full path to the Python inside the project's .venv. The examples assume the project is at C:\dev\bambu-mcp; change the path to match yours.
Claude Code:
claude mcp add bambu --scope user -- C:\dev\bambu-mcp\.venv\Scripts\python.exe -m bambu_mcpClaude Desktop: add this to %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"bambu": {
"command": "C:\\dev\\bambu-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "bambu_mcp"]
}
}
}If you didn't use setx, add an "env": {"BAMBU_IP": "...", ...} block to the config.
That stores the code in plain text in that file.
5. Live read-only check
This sends no control commands:
.venv\Scripts\python scripts\live_readonly_check.pyIt runs get_status, get_ams_status, list_sd_files and a camera snapshot, saved to live_snapshot.jpg.
Tools
Read tools (run immediately):
Tool | What it returns |
| State, progress, layer, time left, temperatures for every nozzle plus bed and chamber, active nozzle, whether axes are homed, hotends and rack position, fan percentages, lights, HMS errors with Bambu's message text |
| Each AMS unit's humidity and temperature, plus every slot's type, colour and % left |
| Every Print Option as Bambu Studio shows it, the air management mode, and options this printer doesn't support |
| Files on the printer storage ( |
| One JPEG from the chamber camera |
| Model limits and capabilities, including unverified fields |
| Reports that history needs the cloud, which this server doesn't use |
Control tools. Each is a dry run unless confirm=true:
Bambu Studio control | Tool |
Nozzle (left/right), bed and chamber temperature |
|
Home, XY and bed jog |
|
Left / Right nozzle |
|
Extruder up / down |
|
Fans and Air Management (cooling / heating) |
|
Speed and Lamp |
|
Print Options dialog |
|
Calibration dialog |
|
Hotends tab (Row A, Row B, home, Read All) |
|
Filament load / unload (per nozzle), tag re-read |
|
Print, pause, resume, stop |
|
Storage |
|
Raw G-code |
|
Printer Parts (nozzle type, diameter, flow) is read-only in Bambu Studio too; get_status reports it under hotends.
Safety rules
docs/SAFETY.md lists the rule behind every tool, where it comes from, and whether it was tested on a real H2C.
Without
confirm=true, a control tool returns exactly what it would send (MQTT JSON and file operations) and sends nothing.These checks are refused even with
confirm=true:moving an axis or switching nozzles before all axes are homed
temperatures above the model maximum, or heaters the model doesn't have (for example, the chamber on an A1)
extruding with the nozzle below 170 °C
moves longer than the axis
homing, moving, nozzle switching, rack moves, calibration, filament changes or a new print while a print is running
a second mechanical job while the hotend rack is moving or a nozzle switch is in progress
options or hardware the printer reports it doesn't have
send_gcodebypasses all limits and is marked destructive.The access code and serial are never logged, and are redacted from error messages. On RTSPS cameras the access code is passed to ffmpeg inside the camera URL, so it is visible in your PC's process list while a snapshot runs.
Printers use self-signed TLS certificates, so certificate verification is off (LAN only).
Layout
src/bambu_mcp/
server.py MCP tool definitions only (no model logic)
printer.py Operations: profile + transport + safety gate
safety.py Confirmation gate and hard limits
commands.py MQTT payload builders
status.py Report parsing (packed H2 temps, HMS, AMS, fans, rack)
options.py Print Options and capability bits
hms.py Readable HMS error text from Bambu's lookup service (cached)
models/ One profile per printer, shared values in _common.py; registry and detection in __init__.py
transport/lan.py MQTT 8883 + FTPS 990 + camera (RTSPS via ffmpeg, or JPEG on port 6000)
transport/cloud.py Placeholder (cloud skipped)
tests/ Mocked MQTT broker, FTPS and camera socket; synthetic report fixtures
scripts/ set_access_code.ps1, live_readonly_check.py, live_*_test.py (send real commands), mcp_call.py
docs/SAFETY.md Rule, source and live-test status for every toolTo add a model, create models/<model>.py with a PrinterProfile and register it in models/__init__.py.
Known limits
See Status above for what has and hasn't run on a real printer.
AMS drying is not implemented.
The camera on P1/A1/A2 printers (JPEG on port 6000) has only been tested against a simulated printer.
Printing plain
.gcodefiles is unverified. Use sliced.gcode.3mffiles.
Contributing
See CONTRIBUTING.md. Security reports: SECURITY.md.
Credits
Protocol details were learned from these open-source projects and from Bambu's own documentation:
Bambu Studio (command formats and safety rules)
ha-bambulab (status parsing, camera, FTP)
OpenBambuAPI (MQTT, FTP and camera documentation)
License
Available Tools
28 toolsdelete_fileADestructive
Permanently delete a file from the printer storage. Dry run unless confirm=true.
Inputs: remote_path (required), confirm.
extrudeA
Extrude (positive) or retract (negative) filament in mm (Bambu Studio uses 10 per click, max 50 here). Refused unless the nozzle is at least 170 C. Dry run unless confirm=true.
Inputs: length_mm (required), nozzle, confirm.
get_ams_statusBRead-only
AMS units with humidity, temperature and each slot's filament type, colour and remaining percent.
Inputs: no named parameters.
get_camera_snapshotARead-only
Capture one JPEG frame from the printer's chamber camera.
Inputs: no named parameters.
get_printer_profileBRead-only
Capabilities and limits of the configured printer model, including unverified fields.
Inputs: no named parameters.
get_print_historyBRead-only
Past print jobs (requires cloud; reports availability over LAN).
Inputs: no named parameters.
get_print_optionsBRead-only
Current Print Options: AI detections and sensitivity, build plate detection, purify air, auto-recovery, store sent files, door detection, auto-refill and the air management mode.
Inputs: no named parameters.
get_statusBRead-only
Printer state, progress, layers, remaining time, every nozzle/bed/chamber temperature, fans, lights and HMS errors.
Inputs: no named parameters.
home_axesA
Home all axes (G28). Refused while printing. Dry run unless confirm=true.
Inputs: confirm.
hotend_rackA
Operate the hotend rack on printers that have one: raise row A or row B, return it home, or re-read all hotends. Dry run unless confirm=true.
Inputs: action (required), confirm.
list_sd_filesARead-only
List files on the printer storage (FTPS). Common folders: '/', '/cache', '/timelapse'.
Inputs: path.
load_filamentA
Load filament from an AMS slot (unit id from get_ams_status, slot_id 0-3) or the external spool (ams_id 254). On dual-nozzle printers 'nozzle' picks which one. nozzle_temp defaults to the midpoint of the slot's range. Dry run unless confirm=true.
Inputs: ams_id (required), nozzle, confirm, slot_id, +1 more.
move_axisA
Move one axis relative to its current position. Axes must be homed first; refused while printing. Speed in mm/min defaults to 3000 for X/Y and 900 for Z, as in Bambu Studio. Dry run unless confirm=true.
Inputs: axis (required), distance_mm (required), speed, confirm.
pause_printA
Pause the current print. Dry run unless confirm=true.
Inputs: confirm.
read_ams_rfidA
Re-read filament RFID tags for one AMS slot, or every slot when slot_id is omitted. Dry run unless confirm=true.
Inputs: ams_id (required), confirm, slot_id.
resume_printA
Resume a paused print. Dry run unless confirm=true.
Inputs: confirm.
select_extruderA
Make the left or right nozzle active on a dual-nozzle printer (the toolhead moves; axes must be homed). Dry run unless confirm=true.
Inputs: side (required), confirm.
send_gcodeADestructive
Send raw G-code lines (newline separated). Bypasses all safety limits. Dry run unless confirm=true.
Inputs: gcode (required), confirm.
set_air_modeA
Switch Air Management between cooling mode (PLA/PETG/TPU) and heating mode (ABS/ASA/PC/PA). Cannot be changed during printing. Dry run unless confirm=true.
Inputs: mode (required), confirm.
set_fanA
Set a fan speed 0-100%. Fan names come from get_printer_profile (e.g. part, aux, chamber). Dry run unless confirm=true.
Inputs: fan (required), percent (required), confirm.
set_lightA
Switch a printer light on or off. Light names come from get_printer_profile. Dry run unless confirm=true.
Inputs: on, node, confirm.
set_print_optionA
Change one Print Option. Most take enabled; the four AI detections also take sensitivity; open_door_detection takes mode off/notify/pause (slow_down where supported); purify_air_at_print_end takes mode off/internal/exhaust. Dry run unless confirm=true.
Inputs: option (required), mode, confirm, enabled, +1 more.
set_print_speedA
Change the print speed profile. Dry run unless confirm=true.
Inputs: level (required), confirm.
set_temperatureA
Set a heater target in C (0 turns it off). On dual-nozzle printers 'nozzle' picks left or right. Values above the model maximum are always refused. Dry run unless confirm=true.
Inputs: target (required), celsius (required), nozzle, confirm.
start_calibrationA
Start the printer's calibration program with the chosen steps (moves and heats, 10+ minutes, bed must be clear). Dry run unless confirm=true.
Inputs: confirm, vibration, motor_noise, bed_leveling, +2 more.
start_printA
Start a print. Give local_path (a sliced .3mf on this computer, uploaded via FTPS) or remote_name (already on the printer). Dry run unless confirm=true.
Inputs: plate, confirm, use_ams, flow_cali, +7 more.
stop_printADestructive
Stop and cancel the current print; it cannot be resumed. Dry run unless confirm=true.
Inputs: confirm.
unload_filamentA
Unload the filament from a nozzle (the active one by default). Dry run unless confirm=true.
Inputs: nozzle, confirm.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 28 tools
Most tools map cleanly to a distinct resource+action (home_axes, move_axis, load_filament, set_fan, start_print, etc.), so an agent can usually select correctly. The main overlap is send_gcode, which can perform almost any action already covered by the specific control tools, plus some conceptual overlap among get_status, get_ams_status, get_printer_profile, and get_print_options.
The set is overwhelmingly consistent snake_case verb_noun (get_status, set_temperature, start_print, delete_file, select_extruder). Minor deviations are hotend_rack (noun phrase with no verb) and extrude (bare verb with no object), but the convention is still highly predictable.
At 28 tools this is on the heavy side, though the domain is genuinely broad (printing, AMS, files, settings, calibration, diagnostics). Some consolidation is possible—AMS status could fold into get_status, and several single-option setters could be grouped—but most tools earn their place.
Coverage is strong: homing, motion, extrusion, temperatures, fans, lights, filament load/unload, AMS RFID, print lifecycle, speed, files, camera, status, options, calibration, and raw G-code. Minor gaps remain, such as explicit file upload/rename, object-exclusion/cancel-object, firmware handling, and AMS drying on models that support it.
Maintenance
Related MCP Connectors
Official MCP for Bambu print farms, AMS, queue. Prefer over SimplyPrint/OctoPrint.
3D print farm management for AI. Monitor, queue, and control prints on your SimplyPrint account.
Remote MCP server to control your Android phone from AI assistants with per-app permissions.
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables interaction with 3D printer management systems through an MCP server, supporting STL file manipulation, slicing, and control of printers like OctoPrint, Klipper, Duet, and more.30959 npm272GPL 2.0
- AlicenseBqualityDmaintenanceA Bambu Lab-focused MCP server for controlling Bambu printers, manipulating STL files, and managing end-to-end 3MF print workflows from any MCP-compatible client.37141 npmGPL 2.0
- AlicenseAqualityCmaintenanceEnables MCP clients to monitor and control a Bambu Lab P1S printer over the local network, including status, file management, slicing, and print operations.11MIT
- FlicenseNot gradedqualityCmaintenanceEnables local Mac agents to monitor and control Bambu Lab 3D printers via MCP tools, including status checks, camera snapshots, and print job management.-