bambu-printer-mcp

Controls Bambu Lab 3D printers over the local network, with slicing, AMS and STL tools

By David Montgomery (individual) TypeScript Local · stdio Design

72 popularity score ★ 288 ↓ 12k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs PRINTER_HOST, BAMBU_SERIAL, BAMBU_TOKEN. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add bambu-printer -e PRINTER_HOST=<PRINTER_HOST> -e BAMBU_SERIAL=<BAMBU_SERIAL> -e BAMBU_TOKEN=<BAMBU_TOKEN> -- npx -y bambu-printer-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "bambu-printer": {
      "command": "npx",
      "args": [
        "-y",
        "bambu-printer-mcp"
      ],
      "env": {
        "PRINTER_HOST": "<PRINTER_HOST>",
        "BAMBU_SERIAL": "<BAMBU_SERIAL>",
        "BAMBU_TOKEN": "<BAMBU_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "bambu-printer": {
      "command": "npx",
      "args": [
        "-y",
        "bambu-printer-mcp"
      ],
      "env": {
        "PRINTER_HOST": "<PRINTER_HOST>",
        "BAMBU_SERIAL": "<BAMBU_SERIAL>",
        "BAMBU_TOKEN": "<BAMBU_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "bambu-printer": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "bambu-printer-mcp"
      ],
      "env": {
        "PRINTER_HOST": "<PRINTER_HOST>",
        "BAMBU_SERIAL": "<BAMBU_SERIAL>",
        "BAMBU_TOKEN": "<BAMBU_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.bambu-printer]
command = "npx"
args = ["-y", "bambu-printer-mcp"]

[mcp_servers.bambu-printer.env]
PRINTER_HOST = "<PRINTER_HOST>"
BAMBU_SERIAL = "<BAMBU_SERIAL>"
BAMBU_TOKEN = "<BAMBU_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e PRINTER_HOST=<PRINTER_HOST> -e BAMBU_SERIAL=<BAMBU_SERIAL> -e BAMBU_TOKEN=<BAMBU_TOKEN> bambu-printer npx -- -y bambu-printer-mcp
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs PRINTER_HOST, BAMBU_SERIAL, BAMBU_TOKEN. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/DMontgomery40/bambu-printer-mcp.git
cd bambu-printer-mcp
npm install
npm run build
Claude CodeTerminal
claude mcp add bambu-printer -e PRINTER_HOST=<PRINTER_HOST> -e BAMBU_SERIAL=<BAMBU_SERIAL> -e BAMBU_TOKEN=<BAMBU_TOKEN> -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "bambu-printer": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "PRINTER_HOST": "<PRINTER_HOST>",
        "BAMBU_SERIAL": "<BAMBU_SERIAL>",
        "BAMBU_TOKEN": "<BAMBU_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "bambu-printer": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "PRINTER_HOST": "<PRINTER_HOST>",
        "BAMBU_SERIAL": "<BAMBU_SERIAL>",
        "BAMBU_TOKEN": "<BAMBU_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "bambu-printer": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"
      ],
      "env": {
        "PRINTER_HOST": "<PRINTER_HOST>",
        "BAMBU_SERIAL": "<BAMBU_SERIAL>",
        "BAMBU_TOKEN": "<BAMBU_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.bambu-printer]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/dist/index.js"]

[mcp_servers.bambu-printer.env]
PRINTER_HOST = "<PRINTER_HOST>"
BAMBU_SERIAL = "<BAMBU_SERIAL>"
BAMBU_TOKEN = "<BAMBU_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e PRINTER_HOST=<PRINTER_HOST> -e BAMBU_SERIAL=<BAMBU_SERIAL> -e BAMBU_TOKEN=<BAMBU_TOKEN> bambu-printer node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/index.js'

Settings 12

PRINTER_HOST Required: Printer's LAN IP address; alias BAMBU_PRINTER_HOST. Default localhost.
BAMBU_SERIAL Required: Printer serial number; alias BAMBU_PRINTER_SERIAL.
BAMBU_TOKEN secret Required: LAN access code from the printer screen; alias BAMBU_PRINTER_ACCESS_TOKEN.
BAMBU_MODEL Optional: Printer model (p1s, x1c, a1, h2d, x2d and others); needed to slice and print, asked for if unset and the client supports it. For slicing and printing.
FFMPEG_PATH Optional: ffmpeg executable for RTSP camera snapshots. For camera_snapshot.
MCP_TRANSPORT Optional: stdio or streamable-http, which binds to 127.0.0.1:3000 unless MCP_HTTP_HOST or MCP_HTTP_PORT is set. Default stdio.
BLENDER_MCP_COMMAND Optional: Executable of a stdio Blender MCP server, such as the full path to uvx. For blender_mcp_edit_model.
FUSION_MCP_COMMAND Optional: Program that starts the Fusion MCP server, normally uvx. For fusion_mcp tools.
Set together: slicing
SLICER_TYPE Optional: bambustudio, orcaslicer, orcaslicer-bambulab or orca-slicer-api for remote slicing. Default bambustudio.
SLICER_PATH Optional: Full path to the slicer executable, unused with orca-slicer-api.
Set together: remote slicing
SLICER_API_URL Optional: Address of the orca-slicer-api service when SLICER_TYPE=orca-slicer-api.
BAMBU_PROFILES_ROOT Optional: Folder holding the slicer's resources/profiles tree; needed for remote slicing.

What it does

This server links an MCP client to a Bambu Lab 3D printer on your local network. It talks to the printer directly over MQTT (port 8883) and FTPS (port 990) using the LAN access code, so the default path needs no Bambu Cloud login. You can check status and progress, upload files, start a sliced 3MF with AMS tray mapping, pause or cancel a job, skip one object, and change speed, fans, lights or temperatures.

Slicing uses an installed BambuStudio, OrcaSlicer or FULU OrcaSlicer-bambulab command line with your model's exact machine preset. Set SLICER_TYPE=orca-slicer-api and jobs go to a separately hosted orca-slicer-api service. Optional bridges reach a Blender MCP server, Autodesk Fusion and FULU's BambuNetwork runtime.

The X2D is the odd one out. Status and slicing work anywhere, but printing needs a locally built helper that loads Bambu's networking plug-in, on macOS or x86-64 Linux. On Linux the package's second program, bambu-printer-mcp-native-setup, builds it.

src/index.ts registers 57 tools, well past the README's reference. The extras include start_print (an alias), a live camera stream, four counterpart tools and a Fusion bridge. Four FDM design prompts sit beside the status, file and HMS resources.

Ordinary print, heat and resume commands now go ahead without asking anyone. The code treats the client's own tool approval as the yes. A prompt (MCP elicitation) comes only when hardware errors are cleared and on the first print after that, or when a resumed file cannot be read back to check its hash. It waits 10 minutes by default (BAMBU_CONFIRMATION_TIMEOUT_MS, 1 second to an hour). BAMBU_REQUIRE_CONFIRMATION is no longer read.

camera_stream_start holds one camera connection open, at 1 frame a second by default, and closes it after 30 idle seconds. camera_frame returns a JPEG only when the picture has visibly changed. The Fusion tools run FUSION_MCP_COMMAND, usually uvx, to reach the Fusion360MCP add-in on port 9877.

What it needs

RuntimeNode.js 24+
Runs onmacOS, Windows, Linux
Bambu Lab printer (LAN mode)Your own instancePrinter IP, serial number and LAN access code; LAN Only Mode and Developer Mode on firmware that has it
Also
  • A Bambu Lab printer on the same network
  • BambuStudio, OrcaSlicer or FULU OrcaSlicer-bambulab to slice, or an orca-slicer-api service
  • ffmpeg for RTSP camera snapshots
  • C++ compiler and Bambu networking plug-in for X2D printing
  • Blender MCP server and its addon for Blender edits
  • Autodesk Fusion with the Fusion360MCP add-in for Fusion tools

Supported printers are P1S, P1P, P2S, X1C, X1E, A1, A1 mini, H2D, H2S, H2C and X2D. From firmware 01.08.05 third-party control needs Developer Mode. Remote slicing needs SLICER_API_URL plus a read-only copy of the matching Orca resources/profiles tree in BAMBU_PROFILES_ROOT. X2D printing on Linux: run npx -y -p bambu-printer-mcp bambu-printer-mcp-native-setup (needs g++ or clang++). On macOS: install Bambu Studio with its networking plug-in and Apple's command line tools, then run npm run build:native in the installed package folder. Blender edits need uvx blender-mcp with its addon running in Blender. Fusion tools need uv (FUSION_MCP_COMMAND=uvx) and Fusion running the Fusion360MCP add-in.

Limits

  • Not covered Bambu Lab printers only. OctoPrint, Klipper, Prusa and Creality machines are not supported.
  • Platform X2D printing needs the native helper on macOS or x86-64 Linux. Windows X2D printing and X2D FTPS or remote G-code starts are unsupported.
  • Not covered Slicer settings are baked into the 3MF and cannot be changed at print time.
  • Not covered Legacy .gcode.3mf jobs need a plate that uses one external spool only.
  • Not covered The orca-slicer-api backend takes one filament slot and one plate, and a timeout does not cancel the remote job.
  • Not covered CLI slicing fails for supertack_plate.
  • Limit LAN Only Mode cuts the printer off from Bambu's cloud and the Handy app.
  • Limit counterpart_print_route saves a changed route into the .env file in the working folder when that file exists.
  • Limit A tool's success reply does not confirm that the printer actually printed.
  • Size cap STL tools load the whole mesh into memory, which gets heavy above about 10 MB.

A tool's success reply does not confirm a physical print. STL tools load whole meshes into memory with no cap, and slice_stl blocks until the slicer finishes. Turning on LAN Only Mode cuts the printer off from Bambu's cloud and the Handy app.

Who it suits

Suits Bambu Lab owners who want to check on, start and steer prints from an assistant, and who can run the server on the printer's own network with LAN and Developer Mode enabled. It writes to real hardware (heaters, motion, files on the printer), and ordinary print starts no longer wait for a person, so it fits people who trust their client's own tool approval. Owners of OctoPrint, Klipper, Prusa or Creality machines should use the author's mcp-3D-printer-server, which its README names for multi-brand setups. Anyone who must keep Bambu Cloud and the Handy app working on the printer will lose them in LAN Only Mode.

Tools 57

19 only read, 36 change things, 2 can delete or overwrite. A ? marks an optional parameter.

get_printer_status
Read temperatures, progress, layer, time left and AMS slotshost?: stringbambu_serial?: stringbambu_token?: string
get_printer_filaments
List loaded AMS filaments with matched slicer profileshost?: stringbambu_serial?: stringbambu_token?: stringbambu_model?: enumnozzle_diameter?: string
resolve_3mf_ams_slots
Dry-run matching a sliced file's filaments to loaded traysthree_mf_path: stringplate_index?: numberbambu_model?: enumnozzle_diameter?: stringhost?: stringbambu_serial?: stringbambu_token?: string
list_3mf_plate_objects
List the objects on a 3MF plate with their IDsthree_mf_path: stringplate_index?: number
extend_stl_base changes
Add a solid block under an STL modelstl_path: stringextension_height: number
scale_stl changes
Scale an STL model on each axisstl_path: stringscale_x?: numberscale_y?: numberscale_z?: number
rotate_stl changes
Rotate an STL model by angles in degreesstl_path: stringangle_x?: numberangle_y?: numberangle_z?: number
get_stl_info
Report an STL model's size and mesh detailsstl_path: string
list_templates
List saved slicing templatestemplate_dir?: string
save_template changes
Save a 3MF into the local template registrysource_path: stringtemplate_name?: stringtemplate_dir?: string
get_slice_settings
Show slicer settings stored in a 3MF or profilesource_path?: stringtemplate_name?: stringtemplate_dir?: string
slice_with_template changes
Slice a model using a named saved templatestl_path: stringtemplate_name: stringtemplate_dir?: stringbambu_model: enumslicer_type?: enumslicer_path?: stringslicer_profile?: stringnozzle_diameter?: stringbed_type?: enumnozzle_type?: enumnozzle_volume_type?: enumuse_printer_filaments?: booleanhost?: stringbambu_serial?: stringbambu_token?: stringload_filaments?: stringload_filament_ids?: stringfilament_colours?: stringensure_on_bed?: booleanarrange?: boolean
slice_stl changes
Slice an STL or 3MF with the configured slicer or remote Orca APIstl_path: stringbambu_model: enumslicer_type?: enumslicer_path?: stringslicer_profile?: stringtemplate_3mf_path?: stringtemplate_name?: stringtemplate_dir?: stringnozzle_diameter?: stringbed_type?: enumnozzle_type?: enumnozzle_volume_type?: enumuse_printer_filaments?: booleanuptodate?: booleanrepetitions?: numberorient?: booleanarrange?: booleanensure_on_bed?: booleanclone_objects?: stringskip_objects?: string
list_printer_files
List files on the printer's storagehost?: stringbambu_serial?: stringbambu_token?: string
bambu_connect_import_file changes
Open a file in the signed-in Bambu Connect app without printingfile_path: stringname?: stringversion?: string
bambu_network_bridge_status
Check the optional FULU BambuNetwork bridgeconnect?: booleanbridge_command?: stringbambu_network_config_dir?: stringcountry_code?: stringuser_info?: stringtimeout_ms?: number
bambu_network_call
Run an allowed read-only probe on the BambuNetwork bridgemethod: stringpayload?: objectwith_agent?: booleanbridge_command?: stringbambu_network_config_dir?: stringcountry_code?: stringuser_info?: stringtimeout_ms?: number
print_3mf_bambu_network changes
Send a 3MF print through the BambuNetwork bridgethree_mf_path: stringbambu_model: enumconnection_type?: enumbambu_network_method?: enumdev_id?: stringdev_ip?: stringhost?: stringbambu_serial?: stringbambu_token?: stringusername?: stringpassword?: stringbed_type?: enumnozzle_type?: enumnozzle_volume_type?: enumplate_index?: numberproject_name?: stringpreset_name?: stringtask_name?: stringconfig_filename?: stringbridge_command?: string
camera_stream_start
Open one lasting camera connection that frame reads and snapshots reusehost?: stringbambu_serial?: stringbambu_token?: stringbambu_model?: stringfps?: numberidle_timeout_ms?: integer
camera_frame
Return the newest stream frame as JPEG when the picture has changedhost?: stringbambu_serial?: stringbambu_token?: stringsince_seq?: integerwait_ms?: integermax_width?: integer
camera_stream_stop
Close the camera stream and drop its cached frameshost?: stringbambu_serial?: stringbambu_token?: string
camera_snapshot
Grab one JPEG frame from the chamber camerasave_path?: stringtimeout_ms?: numberbambu_model?: stringexperimental?: booleanffmpeg_path?: stringhost?: stringbambu_serial?: stringbambu_token?: string
delete_printer_file deletes
Delete a file from the printer's storagefilename: stringconfirm?: booleanhost?: stringbambu_serial?: stringbambu_token?: string
upload_gcode changes
Upload G-code text to the printerfilename: stringgcode?: stringgcode_path?: stringbambu_model?: enumhost?: stringbambu_serial?: stringbambu_token?: string
upload_file changes
Upload a local file to the printerfile_path: stringfilename: stringprint?: booleanconnection_mode?: enumbambu_model?: enumproject_name?: stringpreset_name?: stringbed_type?: enumplate_index?: integerhost?: stringbambu_serial?: stringbambu_token?: string
start_print changes
Alias of start_print_jobfilename: stringbambu_model: enumhost?: stringbambu_serial?: stringbambu_token?: string
start_print_job changes
Start a G-code file already on the printerfilename: stringbambu_model: enumhost?: stringbambu_serial?: stringbambu_token?: string
cancel_print deletes
Cancel the running jobhost?: stringbambu_serial?: stringbambu_token?: stringconnection_mode?: enumconnection_type?: enum
pause_print changes
Pause the running jobhost?: stringbambu_serial?: stringbambu_token?: stringconnection_mode?: enumconnection_type?: enum
resume_print changes
Resume a paused jobhost?: stringbambu_serial?: stringbambu_token?: stringconnection_mode?: enumconnection_type?: enum
x2d_native_control changes
Read X2D calibration or update its AMS metadata via the plug-inmessage_json: stringqos?: numberflag?: numberhost?: stringbambu_serial?: stringbambu_token?: string
clear_hms_errors changes
Clear HMS and print errors on the printerhost?: stringbambu_serial?: stringbambu_token?: string
set_print_speed changes
Switch between silent, standard, sport and ludicrous speedmode: enumhost?: stringbambu_serial?: stringbambu_token?: string
set_airduct_mode changes
Set H2/P2 airduct to cooling or heatingmode: enumhost?: stringbambu_serial?: stringbambu_token?: string
reread_ams_rfid changes
Make the AMS re-read spool RFID tagsams_id: numberslot_id: numberhost?: stringbambu_serial?: stringbambu_token?: string
set_temperature changes
Set nozzle or bed target temperaturecomponent: stringtemperature: numberbambu_model?: enummaterial?: stringnozzle_diameter?: enumhost?: stringbambu_serial?: stringbambu_token?: string
set_fan_speed changes
Set part, auxiliary or chamber fan speedfan: stringspeed: numberconfirm_during_print?: booleanhost?: stringbambu_serial?: stringbambu_token?: string
set_light changes
Turn the chamber light on, off or flashinglight: stringmode: enumhost?: stringbambu_serial?: stringbambu_token?: string
skip_objects changes
Skip chosen objects in a running printobject_ids: arrayhost?: stringbambu_serial?: stringbambu_token?: string
set_ams_drying changes
Start or stop drying on a heated AMS unitaction: enumams_id: numberhost?: stringbambu_serial?: stringbambu_token?: string
inspect_print_file
Check a print file against the printer model before sendingfile_path: stringbambu_model: enumplate_index?: integernozzle_diameters?: enumbed_type?: enum
print_3mf changes
Upload and start a sliced 3MF, slicing first if neededthree_mf_path: stringbambu_model: enumconnection_mode?: enumtry_emmc_print?: booleanconnection_type?: enumbambu_network_method?: enumdev_id?: stringdev_ip?: stringbridge_command?: stringbambu_network_config_dir?: stringcountry_code?: stringuser_info?: stringbed_type?: enumnozzle_type?: enumnozzle_volume_type?: enumhost?: stringbambu_serial?: stringbambu_token?: stringplate_index?: numberslicer_type?: enum
print_collar_charm changes
Run a fixed two-colour collar charm print workflowsource_path?: stringtemplate_name?: stringtemplate_dir?: stringbambu_model: enumhost?: stringbambu_serial?: stringbambu_token?: stringbed_type?: enumbed_leveling?: booleanflow_calibration?: booleanvibration_calibration?: booleantimelapse?: booleanslicer_profile?: stringnozzle_diameter?: string
merge_vertices changes
Merge near-duplicate vertices in an STLstl_path: stringtolerance?: number
center_model changes
Move an STL model to the originstl_path: string
lay_flat changes
Rotate an STL so its largest flat face is downstl_path: string
blender_mcp_status
Connect to a Blender MCP server and list its toolsconnect?: booleantimeout_ms?: integer
blender_mcp_call changes
Forward a tool call to the Blender MCP servertool_name: stringarguments?: objecttimeout_ms?: integer
blender_mcp_edit_model changes
Edit an STL in Blender and export a new filestl_path?: stringoperations?: arrayoutput_path?: stringuser_prompt?: stringtimeout_ms?: integerbridge_command?: stringexecute?: boolean
counterpart_printer_info
Describe the configured printer and how it can be reached, without contacting itbambu_model?: stringhost?: stringbambu_serial?: stringbambu_token?: string
counterpart_print_route changes
Show or change which route the next print and the controls useroute?: enum
counterpart_print_progress
Report job progress from the last MQTT status report heldbambu_model?: stringhost?: stringbambu_serial?: stringbambu_token?: string
counterpart_make_3mf changes
Join STL parts into a new multi-colour 3MF, one filament per partparts: arrayout_path: string
fusion_mcp_status
Check the Fusion bridge, and on macOS optionally open Fusionlaunch?: booleantimeout_ms?: integer
fusion_mcp_call changes
Forward a tool call to the Fusion 360 MCP serverdocument_id?: stringtool_name: stringarguments?: objecttimeout_ms?: integer
fusion_mcp_new_design changes
Start a new Fusion design, optionally from an .f3d filebind_document?: booleansource_f3d?: stringtimeout_ms?: integer
fusion_mcp_export changes
Export a Fusion body to STL along with its .f3d and parametersdocument_id?: stringoutput_dir: stringname: stringbody_name?: stringtimeout_ms?: integer

Resources 4

printer://{host}/status
Latest status report from the printer
printer://{host}/files
Files stored on the printer
printer://{host}/hms
HMS and error fields from the latest status
guidance://fdm/capability-guidance
Guidance on planning bridges and overhangs for FDM

Prompts 4

fdm_design
Standing guidance for designing or editing a model so it prints well
fdm_multicolor
Extra guidance when colours or support materials share a print
fdm_assembly
Extra guidance for splits, inserts and joints
fdm_after_slice
A review pass over a sliced candidate before recommending it

Similar servers