bambu-studio-mcp
by alexnodeland
README.md
# bambu-studio-mcp
Drive **Bambu Studio on macOS** from a CLI or an MCP client (Claude Code, Claude Desktop, any MCP host):
open a project, slice the plate, preview the print job, send it, and read the printer's status and camera.
It works the way you do, through Bambu Studio's own window. Your printer stays on Bambu Cloud, with no
LAN-only mode, no Developer Mode and no access code. Jobs go out through Bambu Studio's own channel.
> **Unofficial.** Not made by, affiliated with or endorsed by Bambu Lab. "Bambu Lab" and "Bambu Studio"
> are their trademarks.
## Why this way
Since Bambu Lab's 2025 authorization firmware, a third-party tool can only start a print over the LAN
with the printer in LAN-only mode and Developer Mode, which takes it off Bambu Cloud. This tool asks
for neither: it automates the app you already use.
- Bambu Studio has no scripting interface, and most of its window is drawn by the app itself, so
macOS accessibility can't read it.
- This tool presses Bambu Studio's own keyboard shortcuts (⌘R to slice, ⌘⇧G to print the plate). It
takes screenshots, reads them with macOS's built-in text recognition (Vision), and clicks only at
points it has just read and verified.
- A screenshot shows only what is on screen. So before each one, the tool checks that Bambu Studio's
window is shown whole and not under another app's window. If it isn't (hidden, in Stage Manager's
side strip, covered), the tool brings it to the front.
## Safety
Sending a job starts a real machine.
- **Preview, then send.** `preview` reads the Send print job dialog and returns a token. `send` reads
the dialog again and refuses if anything changed since: job, printer, plate, time, weight, or which
AMS slot feeds which filament. It also refuses if the dialog differs from what you said to `expect`,
if it shows a problem, or if Bambu Studio has disabled Send.
- **A person confirms.** Before it clicks, a native macOS dialog asks the person at the Mac ("Only if
the bed is clear"), with Cancel as the default. An MCP client can't skip it. Only a person can: the
CLI's `--yes`, or `BAMBU_STUDIO_MCP_ALLOW_UNCONFIRMED=1` in the server's environment.
- **One click, never retried.** It then confirms on the Device tab that the job started.
- **No other controls.** It doesn't pause, stop, home, move or load anything.
## Requirements
- macOS, with Bambu Studio installed in `/Applications`, logged in, and showing your printer.
- Bambu Studio in **English**. The tool reads its labels.
- The app that runs this (your terminal, or your MCP client) allowed in **System Settings > Privacy &
Security**:
- **Accessibility**, to press keys and click;
- **Screen & System Audio Recording**, to read the window.
- Node.js 20 or later.
Tested on Bambu Studio 02.09.02.62, macOS 27.2.1, with a Bambu Lab X2D. Other versions may work:
`bambu-studio-mcp doctor` tells you what it sees.
## Use it from an MCP client
```json
{
"mcpServers": {
"bambu-studio": { "command": "npx", "args": ["-y", "bambu-studio-mcp", "serve"] }
}
}
```
With Claude Code: `claude mcp add bambu-studio -- npx -y bambu-studio-mcp serve`.
| Tool | What it does |
| ----------------- | ----------------------------------------------------------------------------------- |
| `bambu_doctor` | Versions, permissions, instances and warnings. Read-only. |
| `bambu_instances` | Running Bambu Studio instances (one per open project) and their windows. Read-only. |
| `bambu_open` | Open a `.3mf` and wait for its window. |
| `bambu_slice` | Slice the plate and wait until it can be printed. Returns a screenshot. |
| `bambu_status` | State, job, progress, layer and finish time from the Device tab. Read-only. |
| `bambu_snapshot` | The printer camera's picture. It restarts the live view if Bambu Studio paused it. |
| `bambu_preview` | Open and read the Send print job dialog. Returns a token. Sends nothing. |
| `bambu_send` | Send the previewed job, after the checks and the native confirmation. |
| `bambu_cancel` | Close the Send print job dialog without sending. |
## Use it from the shell
```sh
npx bambu-studio-mcp doctor
npx bambu-studio-mcp open ~/prints/plate.3mf
npx bambu-studio-mcp slice
npx bambu-studio-mcp preview # prints a token and the dialog's fields
npx bambu-studio-mcp send --token <t> --slot A2 --material PLA --plate PEI
npx bambu-studio-mcp status
```
Answers are JSON on stdout, and screenshots are PNG paths in them. With more than one project open,
pass `--pid` or `--project`.
## Projects sliced elsewhere
If you slice with Bambu Studio's command-line slicer, Bambu Studio will load your project's settings
only if the file names them as changes from a stock preset (`different_settings_to_system`). The CLI
doesn't write that. Without it, the app opens the file on stock settings and quietly drops your
changes.
## Development
See [CONTRIBUTING.md](CONTRIBUTING.md). In short:
- `make install`, then `make check`: lint, strict types, tests with **100 % coverage**, knip, build,
and an MCP smoke test.
- `make live` runs read-only checks against your real Bambu Studio.
## License
[MIT](LICENSE)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues