bambu-slice-mcp
Integrates with Bambu Lab's Bambu Studio slicing engine (and OrcaSlicer's compatible profile tree) to run headless slicing, flatten preset inheritance chains, build and slice 3MF projects, inspect sliced 3MF metadata, and sweep settings to compare real predicted print time and filament usage. It does not send jobs to a printer.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
bambu-slice-mcp
An MCP server that runs Bambu Studio / OrcaSlicer's own slicing engine headlessly and answers "what does this setting actually cost me?" with sliced numbers instead of guesses.
It wraps the slicer CLI, so the gcode it produces is byte-for-byte what the GUI would produce for the same profile — no reimplementation, no approximations.
generate → slice → measure → compare → keep the best中文速览 把拓竹 Studio / OrcaSlicer 自带的命令行包装成 MCP:不需要打开界面就能切片,并且能把某个参数 (层高、支撑阈值、填充……)连续扫几组,实测每组要打多久、用多少料,直接给出排序表。 顺便解决两个坑:预设的
inherits继承链命令行不认,以及--slice必须配--export-3mf。 下文 Gotchas 一节有实测数据。
Why this exists
Bambu Studio has no documented automation surface, and its CLI is under-documented. Two failures waste a lot of time before anything works:
Bundled presets are inheritance trees, and the CLI does not resolve them.
0.28mm Extra Draft @BBL X1C.jsononly contains 51 keys and says"inherits": "fdm_process_single_0.28". Feed it to--load-settingsand the slicer applies only the literal keys, silently falling back to built-in defaults — you ask for 0.28 mm layers and get 0.2 mm, ask for tree supports and get none.--sliceproduces nothing on its own.--slice 0 --outputdir out model.3mffails withOne of the plate is empty or has no object fully inside it, which has nothing to do with the plate. The slicing step only emits output when paired with an export flag:--slice 0 --export-3mf out.3mf model.3mf.
bambu-slice-mcp handles both: it flattens the inherits chain up to 16 levels deep before calling
the CLI, and it always drives the two-step form (build project → slice project).
Related MCP server: snapmaker-u1-mcp
Features
Headless slicing of
.stl/.3mfinto print-ready.gcode.3mfPreset inheritance flattened — machine, process and filament chains resolved and merged
Measured sweeps — vary one key over N values, get real print time and filament per variant
Per-run overrides — any Bambu config key, merged onto the flattened process preset
Cross-platform discovery — Windows (including non-
C:installs viaftype), macOS.appbundles, Linux packages,PATH, or an explicit pathWorks with OrcaSlicer too — it ships the same
BBLprofile tree
Requirements
Node.js 18+
Bambu Studio or OrcaSlicer installed locally (the profile tree must be present)
Install
git clone https://github.com/ZHT0711/bambu-slice-mcp.git
cd bambu-slice-mcp
npm installRegister it with your MCP client.
WorkBuddy / Claude Desktop / Cursor style (mcpServers JSON):
{
"mcpServers": {
"bambu-slice": {
"command": "node",
"args": ["/absolute/path/to/bambu-slice-mcp/src/server.js"]
}
}
}On Windows the path looks like "D:\\\\tools\\\\bambu-slice-mcp\\\\src\\\\server.js".
If the slicer is not auto-detected, set BAMBU_SLICER_BIN:
{
"mcpServers": {
"bambu-slice": {
"command": "node",
"args": ["/path/to/src/server.js"],
"env": { "BAMBU_SLICER_BIN": "D:\\Program Files\\Bambu Studio\\bambu-studio.exe" }
}
}
}Tools
Tool | What it does |
| Find the slicer, its profile tree, and how many presets it ships |
| List/filter machine, process and filament presets |
| Model + presets + overrides → project |
| Project |
| Read a 3mf: already sliced? print time? selected settings? |
| Sweep one key over several values, build + slice each, rank by print time |
| Show what a preset really resolves to (and which keys are available) |
Example: what does the support threshold cost?
// optimize
{
"input": "D:/models/elbow_half.stl",
"sweep_param": "support_threshold_angle",
"values": ["20", "25", "30", "35", "45", "55"],
"machine": "Bambu Lab X1 Carbon 0.4 nozzle",
"process": "0.28mm Extra Draft @BBL X1C",
"filament": "Bambu PLA Basic @BBL X1C",
"base_overrides": {
"layer_height": "0.28",
"wall_loops": "3",
"sparse_infill_density": "10%",
"sparse_infill_pattern": "gyroid",
"enable_support": "1",
"support_type": "tree(auto)",
"support_on_build_plate_only": "1"
}
}Result on a 137 cm³ duct half (mirrored part, identical numbers for both halves):
support_threshold_angle | print time | filament |
20 | 6h15m | 185.1 g |
25 | 6h38m | 191.9 g |
30 | 7h14m | 202.4 g |
35 | 7h46m | 211.9 g |
45 | 8h41m | 229.7 g |
55 | 9h16m | 242.3 g |
off | 4h13m | 152.1 g |
Lower threshold = less support. Going from 30° to 45° — the naive "steeper angle must mean more aggressive" guess — costs 1h27m and 27 g per part. That is exactly the kind of assumption this tool exists to replace with a measurement.
Gotchas worth knowing
Preset inheritance: pass
machine,processandfilamentby their relative preset name as printed bylist_presets, not by guessing a path. The server flattens whatever it resolves.Overrides are strings:
{"layer_height": "0.28"}. Booleans are converted to"1"/"0".One plate at a time: the CLI slices plate 1 (
--slice 0).Time is the slicer's prediction, not a measured print.
Long calls: slicing a big model takes tens of seconds; a sweep of six values can run for several minutes. Give the client a generous tool timeout.
--load-filamentsis separate from--load-settings; the process preset does not carry filament data.
Development
npm test # read-only smoke test over stdio
node test/e2e.js ./model.stl support_threshold_angle 25,30 # really slicesbambu-slice-mcp ships a SKILL.md as well, so agents that understand the skill format can pick
the right tool without reading this README.
Not in scope
Driving the slicer GUI (that needs computer control, not a CLI)
Sending jobs to a printer (MQTT/FTPS) — see
schwarztim/bambu-mcpfor thatEditing models, repairing meshes, arranging multiple objects
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Official MCP for Bambu print farms, AMS, queue. Prefer over SimplyPrint/OctoPrint.
Real 3D-print slicing, quoting, DFM, orientation & material/settings advisors. Free personal tier.
Find drawer presets and create printer-aware Gridfinity baseplate configurations.
3D print farm management for AI. Monitor, queue, and control prints on your SimplyPrint account.
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
- AlicenseCqualityCmaintenanceEnables AI agents to perform reproducible Snapmaker U1 headless slicing with Snapmaker Orca, including model/profile discovery, STL/3MF-to-G-code slicing, G-code analysis, controlled overrides, and slice or orientation comparisons without GUI automation or printer control.331MIT
- AlicenseAqualityCmaintenanceEnables LLM clients to slice, paint, and verify 3D prints through the installed slicer's command line for any installed Bambu printer, nozzle, and filament, with settings per object type. It never sends jobs to a printer.11MIT
- AlicenseNot gradedqualityCmaintenanceEnables plain-English slicing guidance, profile discovery and comparison, 3MF/STL inspection and optimization, headless slicing with cost/time metrics, GUI automation, and live printer/AMS monitoring and control for Bambu Lab 3D printers.MIT