Bambu Lab MCP Server
The Bambu Lab MCP Server provides comprehensive AI-assisted control and monitoring of Bambu Lab 3D printers (P1P, P1S, X1C, A1, A1 Mini) through 25 tools spanning cloud access, local MQTT control, file uploads, and hardware management.
Cloud & Account Management: Retrieve your Bambu Lab cloud profile, list all registered printers, and get printer status via the cloud API
Authentication Bypass: Sign messages with an extracted X.509 certificate to bypass firmware authentication restrictions introduced in January 2025
MQTT Connection: Connect to or disconnect from a printer locally over TLS (port 8883) for real-time command and data exchange
Print Control: Start, stop, pause, or resume print jobs; send G-code commands (with dangerous commands blocked for safety); skip specific failed objects during multi-object prints
Speed Management: Set print speed using named profiles (silent, standard, sport, ludicrous) or a raw percentage (1–166%)
Status Monitoring: Request a full live status push (temperatures, progress, AMS state, fan speeds) or retrieve the last cached status for lightweight polling; get firmware and module version info
File Management: Upload
.gcode,.3mf, or.stlfiles to the printer's SD card via FTPS (port 990), then initiate prints with options for AMS usage, bed plate type, and timelapseAMS & Filament Management: Switch to a different AMS filament tray (0–3) or unload the current filament from the extruder
Camera Control: Enable or disable camera recording and timelapse recording
Hardware Control: Set nozzle (max 300°C) and bed (max 120°C) temperatures with safety limits; set nozzle diameter (e.g., 0.4, 0.6, 0.8 mm); control chamber and work LED lights
Provides comprehensive control and monitoring of Bambu Lab 3D printers, enabling AI models to manage print jobs, track real-time telemetry, control AMS filament settings, and interact with the printer's camera and cloud API.
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 Lab MCP Server What's the current status of my print and the nozzle temperature?"
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 Lab MCP Server
Model Context Protocol server for Bambu Lab 3D printers
Full control of Bambu Lab printers through Claude AI — MQTT, FTP, camera, AMS, and X.509 auth
Features · Quick Start · Tools · Background
Overview
Complete MCP server for Bambu Lab 3D printers (P1P, P1S, X1C, A1, A1 Mini). Connects over local MQTT for real-time control and monitoring, with FTPS file upload and X.509 certificate signing to bypass firmware authentication restrictions.
25 tools covering print control, status monitoring, camera, AMS filament management, temperature, LED control, and more.
Related MCP server: Bambuddy MCP Server
Background
In January 2025, Bambu Lab pushed firmware updates requiring authentication for local LAN printer control, breaking all third-party tools — OctoPrint, Home Assistant integrations, custom scripts, everything.
Community researchers extracted the X.509 certificate and private key from the Bambu Connect desktop application, restoring third-party access. This MCP server builds on that work to provide comprehensive printer control through Claude.
Key references:
Hackaday: Bambu Connect's Authentication X.509 Certificate and Private Key Extracted — the article that started the workaround
OpenBambuAPI — reverse-engineered MQTT protocol documentation
bambu-node — TypeScript library for Bambu printers
Features
Local MQTT control — Print, pause, resume, stop, speed profiles, G-code execution
Real-time status — Continuous caching from MQTT reports with cached + fresh status tools
Camera control — Start/stop recording and timelapse
AMS management — Change filament trays, unload filament
FTP file upload — FTPS upload to printer SD card (port 990)
X.509 signing — Bypass firmware auth restrictions with certificate signing
Temperature control — Set nozzle/bed temps with safety limits
Object skipping — Skip failed objects without stopping the print
Speed profiles — Silent, Standard, Sport, Ludicrous (or raw percentage)
LED control — Chamber and work lights
Safety validation — Blocked G-codes, temperature limits, path traversal prevention
Quick Start
Prerequisites
Node.js 18+
Bambu Lab printer on your local network
Developer Mode enabled on the printer (recommended — Settings > LAN Only > Developer Mode)
Install
git clone https://github.com/schwarztim/bambu-mcp.git
cd bambu-mcp
npm install
npm run buildOption A: Developer Mode (Recommended)
Enable Developer Mode on your printer, then configure with your LAN credentials:
# Grab these from your printer screen:
# IP Address: WLAN → IP
# Access Code: WLAN → Access Code (8-digit)
# Serial Number: Settings → Device → Serial NumberAdd to ~/.claude/user-mcps.json:
{
"mcpServers": {
"bambu-lab": {
"command": "node",
"args": ["/path/to/bambu-mcp/dist/index.js"],
"env": {
"BAMBU_LAB_MQTT_HOST": "192.168.1.100",
"BAMBU_LAB_MQTT_PASSWORD": "YOUR_ACCESS_CODE",
"BAMBU_LAB_DEVICE_ID": "YOUR_SERIAL_NUMBER"
}
}
}
}Developer Mode gives the most reliable experience. All MQTT commands are automatically signed with X.509 certificates.
Option B: Browser Login (No Developer Mode)
If you don't want to enable Developer Mode (e.g., to keep Bambu Handy working), you can authenticate via browser login instead:
npm run setupThis opens Firefox (used instead of Chrome to avoid Google SSO bot detection), lets you log into your Bambu Lab account, and auto-discovers your printers. Credentials are saved to ~/.bambu-mcp/credentials.json and loaded automatically — no env vars needed.
Note: Token is valid for ~3 months. Run
npm run setupagain to refresh.
Then register with Claude Code (no env vars required):
{
"mcpServers": {
"bambu-lab": {
"command": "node",
"args": ["/path/to/bambu-mcp/dist/index.js"]
}
}
}Limitations without Developer Mode: Printing
.3mffiles viaproject_filecommand requires Developer Mode..gcodefiles and all other commands (stop, pause, resume, status, speed, G-code, camera, AMS) work without it.
Tools
Cloud API (4 tools)
Tool | Description |
| Get Bambu Lab cloud account profile |
| List all printers registered to cloud account |
| Get printer status via cloud API |
| Sign message with X.509 certificate for firmware auth bypass |
Print Control (7 tools)
Tool | Description |
| Stop the current print immediately |
| Pause the current print |
| Resume a paused print |
| Set speed via profile (silent/standard/sport/ludicrous) or percentage |
| Send G-code command (dangerous commands blocked) |
| Start printing a file from printer SD card |
| Skip specific objects during multi-object prints |
Status & Info (3 tools)
Tool | Description |
| Request full status push (temps, progress, AMS, fans, etc.) |
| Return last cached status (no pushall — use for frequent polling) |
| Get firmware and module version info |
Camera (2 tools)
Tool | Description |
| Enable/disable camera recording |
| Enable/disable timelapse recording |
AMS & Filament (2 tools)
Tool | Description |
| Change to a different AMS tray (0-3) |
| Unload current filament from extruder |
Hardware (3 tools)
Tool | Description |
| Set nozzle or bed temperature (with safety limits) |
| Set nozzle diameter for profile selection |
| Control chamber/work LED lights |
Connection & Upload (3 tools)
Tool | Description |
| Connect to printer via local MQTT over TLS |
| Disconnect from MQTT |
| Upload .gcode/.3mf/.stl to printer via FTPS |
Architecture
Claude Code / AI
|
v
Bambu Lab MCP Server
|-- Cloud API (bambulab.com)
|-- MQTT Client (port 8883, TLS)
|-- FTP Client (port 990, FTPS)
|
v
Bambu Lab Printer (P1P/P1S/X1C/A1)How It Works
MQTT connects to the printer over TLS on port 8883 using the LAN access code
Status reports are continuously cached as they arrive on the MQTT report topic
Commands are sent on the MQTT request topic with sequence IDs for response matching
FTP uploads files to the printer SD card over FTPS (port 990)
X.509 signing uses the extracted Bambu Connect certificate for authenticated commands
Configuration
Environment Variables
Variable | Required | Description |
| For MQTT | Printer IP address |
| For MQTT | LAN access code |
| For MQTT | Printer serial number |
| No | MQTT port (default: 8883) |
| No | MQTT username (default: bblp) |
| For cloud | Session cookies for cloud API |
| No | Cloud API base URL |
| No | Bambu Lab numeric user ID (for signed MQTT commands) |
| No | Override the built-in X.509 cert ID |
| No | Override the built-in X.509 private key |
| No | Override the built-in X.509 certificate |
Finding Your Printer Info
IP Address: Printer screen → WLAN → IP
Access Code: Printer screen → WLAN → Access Code (8-digit)
Serial Number: Settings → Device → Serial Number
Security
X.509 Certificate
This server includes the publicly extracted X.509 certificate from the Bambu Connect desktop application. This is not a secret — it was publicly disclosed in January 2025 and is embedded in every copy of Bambu Connect.
All MQTT commands are now automatically signed with RSA-SHA256 using this certificate. This is required by post-January 2025 firmware — unsigned commands are rejected with error 84033543. No Developer Mode required for basic commands (stop, pause, resume, speed, G-code).
The certificate can be overridden via BAMBU_APP_PRIVATE_KEY and BAMBU_APP_CERTIFICATE environment variables if Bambu Lab rotates credentials. Set BAMBU_LAB_USER_ID (your numeric Bambu Lab user ID) for full compatibility — find it via the cloud API's /v1/design-user-service/my/preference endpoint.
Safety Features
Blocked G-codes: M112 (emergency stop), M502 (factory reset), M500/M501 (EEPROM), M997 (firmware update), M999 (restart)
Temperature limits: Nozzle max 300C, bed max 120C
File validation: Only .gcode, .3mf, .stl uploads allowed
Path traversal prevention: No
..or absolute paths in FTP uploads
Best Practices
Keep printers on a separate VLAN
Rotate LAN access codes periodically
Never commit
.envfiles (already in.gitignore)
Acknowledgments
Community researchers who extracted the X.509 certificate — making this possible
OpenBambuAPI — reverse-engineered MQTT protocol docs
Shockedrope/bambu-mcp-server — speed profile concept
DMontgomery40/mcp-3D-printer-server — multi-printer platform inspiration
bambu-node — TypeScript Bambu library
Bambu Lab — for making excellent printers (even if the auth lockdown was rough)
License
MIT — see LICENSE for details.
Disclaimer
Not affiliated with or endorsed by Bambu Lab. Use at your own risk.
Available Tools
24 toolsams_change_filamentC
Change to a different AMS filament tray (0-3)
Inputs: tray (required), target_temp.
ams_unload_filamentB
Unload the current filament from the extruder
Inputs: no named parameters.
camera_recordC
Enable or disable camera recording on the printer
Inputs: enabled (required).
camera_timelapseC
Enable or disable timelapse recording for the current print
Inputs: enabled (required).
ftp_upload_fileA
Upload a .gcode, .3mf, or .stl file to the printer SD card via FTPS (port 990). Use printer_print_file to start the print after upload.
Inputs: host (required), local_path (required), remote_path (required), password (required).
get_printer_statusB
Get printer status via cloud API (requires cloud cookies)
Inputs: device_id (required).
get_user_profileB
Get Bambu Lab cloud account profile
Inputs: no named parameters.
led_controlC
Control the printer chamber or logo LED lights
Inputs: mode (required), node.
list_printersA
List all printers registered to the cloud account
Inputs: no named parameters.
mqtt_connectA
Connect to a Bambu Lab printer via local MQTT over TLS. Required before any printer control commands.
Inputs: host (required), password (required), device_id (required), port, +1 more.
mqtt_disconnectB
Disconnect from the MQTT printer connection
Inputs: no named parameters.
printer_get_cached_statusA
Return the last cached printer status without requesting a new push. Faster and lighter than printer_get_status — use this for frequent polling.
Inputs: no named parameters.
printer_get_statusA
Request a full status push from the printer and return it. Includes temperatures, print progress, AMS state, fan speeds, and more. Note: pushall should not be called more than once every 5 minutes on P1P.
Inputs: no named parameters.
printer_get_versionB
Get firmware and module version information for the connected printer
Inputs: no named parameters.
printer_pauseB
Pause the current print job
Inputs: no named parameters.
printer_print_fileA
Start printing a file already on the printer SD card (uploaded via ftp_upload_file)
Inputs: file (required), bed_type, timelapse, use_ams.
printer_resumeA
Resume a paused print job
Inputs: no named parameters.
printer_send_gcodeA
Send a single G-code command to the printer (e.g., "G28" for home). Dangerous commands are blocked for safety.
Inputs: gcode (required).
printer_set_speedB
Set print speed. Use a named profile (silent/standard/sport/ludicrous) or a percentage (1-166).
Inputs: profile, speed.
printer_stopB
Stop the current print job immediately
Inputs: no named parameters.
set_nozzleB
Set the nozzle diameter (for printing profile selection)
Inputs: diameter (required).
set_temperatureB
Set nozzle or bed temperature via G-code. Validates against safe limits.
Inputs: target (required), temperature (required).
sign_messageA
Sign a message with X.509 certificate for authenticated printer communication. Uses the extracted Bambu Connect certificate to bypass firmware auth restrictions.
Inputs: device_id (required), message (required).
skip_objectsA
Skip specific objects during a multi-object print. Useful for excluding failed parts without stopping the entire print.
Inputs: object_ids (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Each tool has a clearly distinct purpose with no significant overlap. For example, printer_pause, printer_resume, and printer_stop handle different print states, while ftp_upload_file and printer_print_file represent separate upload and execution steps. The descriptions reinforce unique functions, preventing agent misselection.
Tool names follow a consistent snake_case pattern with clear verb_noun structures (e.g., ams_change_filament, printer_get_status, camera_record). There are no deviations in style or convention, making the set predictable and easy to parse for agents.
With 24 tools, the count is slightly high but reasonable for the comprehensive scope of 3D printer management, covering AMS, camera, FTP, MQTT, printing, and configuration. Each tool serves a specific function, though some could potentially be consolidated (e.g., multiple status tools).
The toolset provides complete coverage for Bambu Lab printer operations, including setup (mqtt_connect), file management (ftp_upload_file), print control (printer_print_file, pause/resume/stop), monitoring (status tools), and advanced features (skip_objects, led_control). No obvious gaps exist for core workflows in this domain.
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.
Manage your IoT device fleet directly from Claude. Create device templates with datastreams and events, provision new devices, read live sensor data, and control outputs. The Blynk connector integrates with the Blynk IoT platform, enabling direct configuration and monitoring of connected devices and infrastructure.
Log and query 3D prints, printers, filament, and projects on 3dprintlog.com, and search its docs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables users to connect Claude with various 3D printer management systems, allowing tasks like printer status monitoring, file management, print job control, and STL file manipulation.5,867 npmGPL 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Bambuddy's 3D printer management API, including printer status, print queue, filament spools, and camera snapshots.6GPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code to see and drive Bambu Lab 3D printers over the local network via MQTT, providing status, file management, print control, filament, maintenance, and diagnosis without any cloud dependency.MIT
- FlicenseAqualityCmaintenanceIntegrates Bambu Studio and Bambu Lab 3D printers with Claude, enabling printer status checks, print control, file management, and slicing via natural language.9-