bambu-mcp
You can monitor and control a single Bambu Lab printer over LAN, with writes and motion gated by safe mode and confirm.
Read printer state:
status,temps,ams, andlist_files(FTPS file listing).Upload sliced
.gcode.3mffiles via FTPS (upload), with strict filename rule{part}-{variant}-{rev}.gcode.3mf.Slice STL/STEP/mesh-only 3MF into
.gcode.3mfusing OrcaSlicer/Bambu Studio CLI (slice_hook).Start, pause, resume, or cancel prints (
print,pause,resume,stop); motion tools requireconfirm: trueafter operator agreement.Safe mode (
BAMBU_SAFE_MODE) gates these tools: when on, only reads and low-risk settings (light, camera, sound) are registered; setBAMBU_SAFE_MODE=0to unlock upload/slice/print motion.No raw gcode tool, no temperature setters, no live camera stream/snapshot, and no multi-printer control.
Provides LAN-based control and monitoring for Bambu Lab printers, including status, temperatures, AMS, file listing and upload, print/pause/resume/stop actions, and slicing STL files into printable .gcode.3mf files.
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 Check printer status and remaining time."
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
LAN MCP for one Bambu Lab printer. One process talks to one printer. It uses community bambu-js: MQTT over TLS :8883 and implicit FTPS :990. No cloud account and no private protocol.
BAMBU_MODEL is the hardware name. bambu-js 3.0.1 only has P1S and H2D dialects, so the server maps hardware onto those and keeps both. P2S has no active chamber heater.
| Hardware | bambu-js dialect |
| as set |
|
| as set |
|
|
|
|
|
|
|
| as set |
|
Anything else fails at startup and lists those names. The P2S on this LAN stays at BAMBU_IP=10.0.0.183.
Safe mode
BAMBU_SAFE_MODE defaults to on when unset. The host keeps about 10 tools in the live catalog, so while safe mode is on the server registers only the tools that are allowed to run:
Tool | What it does |
| reads |
| chamber light, or |
| recording and timelapse on or off. No live stream and no snapshot |
|
|
status includes safeMode: true. When the report already has them, it also includes chamberLight, wifiSignal, printError, errorCode, an AMS humidity summary, ipcam record/timelapse flags, and a lights array when more than one light node is present.
set_light takes { on: true } or { on: false }. Optional node is chamber_light (the default) or work_light. A missing node on this hardware returns { supported: false }. These low-risk tools work with safe mode on. They do not need confirm. They do not unlock print, pause, resume, or stop.
upload, slice_hook, print, pause, resume, and stop are left out of the safe-mode catalog. They come back when you set BAMBU_SAFE_MODE=0 and reload the server. The gate still names that variable and says motion tools need confirm: true plus an explicit human ask. confirm: true does not bypass safe mode.
Set BAMBU_SAFE_MODE=0 yourself, in the shell or the MCP env block. An agent must not change it.
After that, print, pause, resume, and stop still require confirm: true. Ask first. The server never sets confirm.
Printer Developer Mode is a different lock. It lets the machine accept third-party writes. Uploads and motion stay locked until BAMBU_SAFE_MODE=0. Light, camera settings, and sound do not.
Related MCP server: Bambu Printer MCP
Printer
P2S needs both LAN Only and Developer Mode before a third-party client can print. Telemetry can work with LAN Only alone. Steps: LAN Only, Developer Mode.
Printer screen: Settings → LAN Only. Note IP, access code, and serial.
Turn on Developer Mode and wait until the toggle stays on.
Keep this computer on the same LAN.
Leave
BAMBU_SAFE_MODEunset (or1) until you want uploads or motion. Then set it to0and reload MCP.
Environment
Copy .env.example to .env (gitignored) or export the variables. Never put the access code in tool arguments, chat, or git.
Variable | Required | Meaning |
| yes | Printer LAN address |
| yes | LAN access code (also the MQTT/FTPS password) |
| yes | Device serial |
| no | Hardware name. Default |
| no | Unset or |
| for slice | OrcaSlicer or Bambu Studio CLI |
| no |
|
npm install
npm test
npm run buildCursor MCP (~/.cursor/mcp.json). BAMBU_SAFE_MODE is 1 so uploads and motion stay unregistered. Light, camera settings, and sound still work. Change it to "0" only when you mean to unlock writes. The sample below is a template. This P2S stays on 10.0.0.183.
{
"mcpServers": {
"bambu": {
"command": "node",
"args": ["/ABS/PATH/TO/bambu-mcp/dist/index.js"],
"env": {
"BAMBU_IP": "10.0.0.183",
"BAMBU_ACCESS_CODE": "xxxxxxxx",
"BAMBU_SERIAL": "01P00A000000000",
"BAMBU_MODEL": "P2S",
"BAMBU_SAFE_MODE": "1"
}
}
}
}Web UI
npm run ui builds the page from web/src (TypeScript, SCSS, and Tailwind) and opens it at http://127.0.0.1:4173. Buttons call the same tools as the MCP. The page reads printer settings from the environment or .env, then fills any missing value from ~/.cursor/mcp.json. It does not change BAMBU_SAFE_MODE. While that is on, print, pause, resume, and stop stay disabled. Set "BAMBU_SAFE_MODE": "0" yourself and restart the page to unlock them. Motion still asks you to confirm on the page before it sends confirm: true.
macOS Local Network
macOS must allow the app that started the server to reach devices on your home network. If every LAN address, including the router, answers "No route to host", this permission is missing.
System Settings → Privacy & Security → Local Network.
Turn on Cursor. If you ran
npm run uifrom the Terminal app, turn on Terminal instead.Quit that app fully with Cmd+Q and reopen it. A window reload is not enough.
If the app is missing from the list, reopen it, try once, and click Allow on the macOS prompt.
Tools
Tool | Safe mode on | Confirm |
| allowed | no |
| allowed | no |
| not registered; gate still refuses | no |
| not registered; gate still refuses | yes, after you agree |
There is no raw gcode tool, no nozzle or bed temperature setter, no camera stream, and no control for more than one printer.
print and upload accept only {part}-{variant}-{rev}.gcode.3mf. They refuse a bare .stl, a mesh-only .3mf, a wip-* name, and any scratch/ path. A sibling {part}-{variant}-{rev}.print.json can set plate, AMS, and calibration. Tool arguments override it.
Harness
harness/SKILL.md is the shared print checklist. It ships in the repo, so a friend clones the same tree. It is not tied to one assistant.
Clone this repo,
npm install,npm test,npm run build.Register the MCP with
BAMBU_SAFE_MODEat1(the block above). They set it to0only when they mean to allow writes.Point the assistant at
harness/SKILL.md. Cursor followsAGENTS.md, which links that file. Claude and other clients can load the same file as a project skill (nameanddescriptionare in the frontmatter).
The skill will not start motion until safe mode is off and the operator agrees. Printer notes that are not the filename rule live in harness/references/printer.md. The filename rule is DESIGN.md.
Code
config.ts reads env. models.ts maps BAMBU_MODEL to a bambu-js dialect and a capability table. client.ts keeps one MQTT session and one FTPS login, and reuses the latest report for status, temps, and ams. get_version sends MQTT info.get_version and returns module hw/sw. set_light sends MQTT system.ledctrl (chamber_light or work_light), including led_on_time, led_off_time, loop_times, and interval_time. set_camera sends camera.ipcam_record_set and camera.ipcam_timelapse with control enable or disable. set_sound sends print.print_option with sound_enable only. Each tool is one file under src/tools/, named for its MCP tool, with its gate on that file: read/, settings/ (safe_write_low_risk), files/ (write), and motion/. src/tools/index.ts is the only catalog. While safe mode is on, createTools omits write and motion so the ~10-name host catalog can list the rest. server.ts registers them. index.ts starts stdio and does not connect until a tool asks. web.ts serves the local page and calls the same tools.
npm test uses MockPrinter and does not open the network.
Available Tools
10 toolsamsA
Read AMS units and per-slot filament type, color, nozzle range, and active slot.
Inputs: no named parameters.
list_filesA
List files on the printer FTPS cache (implicit TLS :990).
Inputs: dir.
pauseB
Pause the running print. Requires confirm: true.
Inputs: confirm (required).
printA
Start printing a {part}-{variant}-{rev}.gcode.3mf. Refuses bare STL, wip-*, and scratch/. Requires confirm: true after the operator agrees. Optional sibling .print.json supplies plate/AMS defaults.
Inputs: file (required), confirm (required), plate, useAms, +2 more.
resumeC
Resume a paused print. Requires confirm: true.
Inputs: confirm (required).
slice_hookA
Slice an STL or mesh-only 3MF into {part}-{variant}-{rev}.gcode.3mf via OrcaSlicer / Bambu Studio CLI. Does not upload or print. Bare STL is allowed here only.
Inputs: rev (required), part (required), variant (required), inputPath (required), +6 more.
statusA
Read Bambu LAN print state: gcode_state, progress %, remaining minutes, layer, job name.
Inputs: no named parameters.
stopA
Cancel the running print (not resumable). Requires confirm: true.
Inputs: confirm (required).
tempsA
Read nozzle / bed / chamber temperatures (°C, current + target).
Inputs: no named parameters.
uploadA
Upload a sliced Imagine artifact over FTPS. File must be {part}-{variant}-{rev}.gcode.3mf. Does not start a print.
Inputs: localPath (required), remoteName.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource or action: slicing, file management, upload, print control, and separate read-only status queries. Even pause and stop are clearly differentiated by resumability.
Tool names are readable and all lowercase, but they mix bare verbs (stop, upload, print), noun-style readouts (status, temps, ams), and compound snake_case names (slice_hook, list_files). The pattern is understandable but not uniform.
Ten tools is a well-scoped count for a printer control server. Each tool covers a meaningful part of the workflow without redundancy or unnecessary surface area.
The core workflow of slicing, uploading, listing, printing, and controlling prints is well covered. Minor gaps like file deletion or temperature setting exist, but agents can complete the primary intended tasks.
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.
Real 3D-print slicing, quoting, DFM, orientation & material/settings advisors. Free personal tier.
Connect your AI to your own devices, 3D printers, factory tools and a shared agent task pool.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables headless slicing with OrcaSlicer, preset management, G-code analysis, and printer control over LAN for Klipper, OctoPrint, Prusa, Duet, Elegoo, and Bambu printers.153MIT
- AlicenseBqualityCmaintenanceManages, monitors, slices for, and controls multiple Bambu Lab 3D printers with a privacy-focused multi-printer registry and fleet status.46GPL 2.0
- AlicenseAqualityCmaintenanceEnables remote cloud control and live LAN camera access for Bambu Lab 3D printers through 31 MCP tools.312MIT
- 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