Bambu Lab MCP Server

Full control of Bambu Lab printers through Claude AI

README.md

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.

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:

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 build

Option 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 Number

Add 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 setup

This 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 setup again 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 .3mf files via project_file command requires Developer Mode. .gcode files and all other commands (stop, pause, resume, status, speed, G-code, camera, AMS) work without it.

Tools 5

print_controlControls print operations including start, pause, resume, and stop.
get_statusRetrieves real-time printer status from MQTT reports.
set_temperatureSets nozzle or bed temperatures with safety limits.
set_ledControls chamber and work lights.
upload_fileUploads files to the printer SD card via FTPS.

Environment Variables

BAMBU_LAB_MQTT_HOSTIP address of the Bambu Lab printer
BAMBU_LAB_MQTT_PASSWORDAccess code from the printer screen
BAMBU_LAB_DEVICE_IDSerial number of the printer

Try it

What is the current status of my printer and how much time is left on the current print?
Set the nozzle temperature to 210 degrees and turn on the chamber light.
Pause the current print job.
Upload the file at ./models/bracket.gcode to the printer SD card.
Change the speed profile to Sport mode.

Frequently Asked Questions

What are the key features of Bambu Lab MCP Server?

Local MQTT control for print operations like pause, resume, and stop. Real-time printer status monitoring with cached and fresh data. FTPS file upload support for sending G-code to the SD card. X.509 certificate signing to bypass firmware authentication restrictions. Hardware management including LED control and temperature settings.

What can I use Bambu Lab MCP Server for?

Monitoring long 3D prints remotely through Claude without using the Bambu Handy app. Automating printer settings like lighting and temperature for specific filament types. Managing print queues by uploading files directly to the printer SD card via AI commands. Troubleshooting print issues by checking real-time status reports during a failure.

How do I install Bambu Lab MCP Server?

Install Bambu Lab MCP Server by running: git clone https://github.com/schwarztim/bambu-mcp.git && cd bambu-mcp && npm install && npm run build

What MCP clients work with Bambu Lab MCP Server?

Bambu Lab MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Bambu Lab MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare