bambu-printer-mcp 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -87
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
A Bambu Lab-focused MCP server for controlling Bambu printers, manipulating STL files, and managing end-to-end 3MF print workflows from Claude Desktop, Claude Code, or any MCP-compatible client.
|
|
11
11
|
|
|
12
|
-
This is a stripped-down, Bambu-only fork of [mcp-3D-printer-server](https://github.com/DMontgomery40/mcp-3D-printer-server). All OctoPrint, Klipper, Duet, Repetier, Prusa Connect, and Creality Cloud support has been removed. What remains is a focused,
|
|
12
|
+
This is a stripped-down, Bambu-only fork of [mcp-3D-printer-server](https://github.com/DMontgomery40/mcp-3D-printer-server). All OctoPrint, Klipper, Duet, Repetier, Prusa Connect, and Creality Cloud support has been removed. What remains is a focused, lean implementation for Bambu Lab hardware.
|
|
13
13
|
|
|
14
14
|
<details>
|
|
15
15
|
<summary><strong>Click to expand Table of Contents</strong></summary>
|
|
@@ -25,8 +25,7 @@ This is a stripped-down, Bambu-only fork of [mcp-3D-printer-server](https://gith
|
|
|
25
25
|
- [Install from source](#install-from-source)
|
|
26
26
|
- [Configuration](#configuration)
|
|
27
27
|
- [Environment variables reference](#environment-variables-reference)
|
|
28
|
-
- [Usage
|
|
29
|
-
- [Usage with Claude Code](#usage-with-claude-code)
|
|
28
|
+
- [Usage](#usage)
|
|
30
29
|
- [Enabling Developer Mode (Required)](#enabling-developer-mode-required)
|
|
31
30
|
- [Finding Your Bambu Printer's Serial Number and Access Token](#finding-your-bambu-printers-serial-number-and-access-token)
|
|
32
31
|
- [AMS (Automatic Material System) Setup](#ams-automatic-material-system-setup)
|
|
@@ -56,7 +55,7 @@ This is a stripped-down, Bambu-only fork of [mcp-3D-printer-server](https://gith
|
|
|
56
55
|
|
|
57
56
|
**What this is not.** This package intentionally supports only Bambu Lab printers. It does not include adapters for OctoPrint, Klipper (Moonraker), Duet, Repetier, Prusa Connect, or Creality Cloud. If you need multi-printer support, use the parent project [mcp-3D-printer-server](https://github.com/DMontgomery40/mcp-3D-printer-server) instead.
|
|
58
57
|
|
|
59
|
-
**Why a separate package?** The parent project carries all printer adapters in a single binary. When working exclusively with Bambu hardware, that breadth adds
|
|
58
|
+
**Why a separate package?** The parent project carries all printer adapters in a single binary. When working exclusively with Bambu hardware, that breadth adds unnecessary weight. This fork strips the project to its Bambu core for a smaller, faster install. Both packages share the same protocol fixes and safety features.
|
|
60
59
|
|
|
61
60
|
**Note on resource usage.** STL manipulation loads entire mesh geometry into memory. For large or complex STL files (greater than 10 MB), these operations can be memory-intensive. See [General Limitations and Considerations](#general-limitations-and-considerations) for details.
|
|
62
61
|
|
|
@@ -182,48 +181,9 @@ BLENDER_MCP_BRIDGE_COMMAND= # Shell command to invoke your Blender MCP bri
|
|
|
182
181
|
|
|
183
182
|
---
|
|
184
183
|
|
|
185
|
-
## Usage
|
|
184
|
+
## Usage
|
|
186
185
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
**Using npx (recommended -- always runs the latest version):**
|
|
190
|
-
|
|
191
|
-
```json
|
|
192
|
-
{
|
|
193
|
-
"mcpServers": {
|
|
194
|
-
"bambu-printer": {
|
|
195
|
-
"command": "npx",
|
|
196
|
-
"args": ["-y", "bambu-printer-mcp"],
|
|
197
|
-
"env": {
|
|
198
|
-
"PRINTER_HOST": "192.168.1.100",
|
|
199
|
-
"BAMBU_SERIAL": "01P00A123456789",
|
|
200
|
-
"BAMBU_TOKEN": "your_access_token",
|
|
201
|
-
"BAMBU_MODEL": "p1s"
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Using a globally installed binary:**
|
|
209
|
-
|
|
210
|
-
```json
|
|
211
|
-
{
|
|
212
|
-
"mcpServers": {
|
|
213
|
-
"bambu-printer": {
|
|
214
|
-
"command": "bambu-printer-mcp",
|
|
215
|
-
"env": {
|
|
216
|
-
"PRINTER_HOST": "192.168.1.100",
|
|
217
|
-
"BAMBU_SERIAL": "01P00A123456789",
|
|
218
|
-
"BAMBU_TOKEN": "your_access_token",
|
|
219
|
-
"BAMBU_MODEL": "p1s"
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
**With slicer configured (for auto-slice and print_3mf workflows):**
|
|
186
|
+
Add this server to your MCP client's config (Claude Desktop, Claude Code, Cursor, Codex CLI, or any MCP-compatible client). The config format is the same everywhere -- an `mcpServers` entry with the command and env vars:
|
|
227
187
|
|
|
228
188
|
```json
|
|
229
189
|
{
|
|
@@ -244,53 +204,29 @@ Edit your Claude Desktop configuration file. On macOS this is at `~/Library/Appl
|
|
|
244
204
|
}
|
|
245
205
|
```
|
|
246
206
|
|
|
247
|
-
|
|
207
|
+
Where this config lives depends on your client:
|
|
248
208
|
|
|
249
|
-
|
|
209
|
+
| Client | Config location |
|
|
210
|
+
|--------|----------------|
|
|
211
|
+
| Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
212
|
+
| Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
213
|
+
| Claude Code (project) | `.mcp.json` in project root |
|
|
214
|
+
| Claude Code (global) | `~/.claude/settings.json` |
|
|
215
|
+
| Cursor | MCP settings in Cursor preferences |
|
|
216
|
+
| Codex CLI | MCP config per Codex docs |
|
|
250
217
|
|
|
251
|
-
|
|
218
|
+
Restart your client after editing the config.
|
|
252
219
|
|
|
253
|
-
|
|
220
|
+
### Recommended: use with codemode-mcp
|
|
254
221
|
|
|
255
|
-
|
|
222
|
+
For any MCP server with a large tool surface, wrapping it behind [codemode-mcp](https://github.com/jx-codes/codemode-mcp) dramatically reduces token usage. Instead of exposing every tool definition to the model (which can consume tens of thousands of tokens per turn), codemode lets the agent write code against a two-tool interface (`search()` and `execute()`), loading only the tools it needs on demand.
|
|
256
223
|
|
|
257
|
-
|
|
258
|
-
{
|
|
259
|
-
"mcpServers": {
|
|
260
|
-
"bambu-printer": {
|
|
261
|
-
"command": "npx",
|
|
262
|
-
"args": ["-y", "bambu-printer-mcp"],
|
|
263
|
-
"env": {
|
|
264
|
-
"PRINTER_HOST": "192.168.1.100",
|
|
265
|
-
"BAMBU_SERIAL": "01P00A123456789",
|
|
266
|
-
"BAMBU_TOKEN": "your_access_token",
|
|
267
|
-
"BAMBU_MODEL": "p1s",
|
|
268
|
-
"SLICER_TYPE": "bambustudio",
|
|
269
|
-
"SLICER_PATH": "/Applications/BambuStudio.app/Contents/MacOS/BambuStudio"
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
```
|
|
224
|
+
Anthropic and Cloudflare independently demonstrated this pattern reduces MCP token costs by up to 98%:
|
|
275
225
|
|
|
276
|
-
|
|
226
|
+
- [Code execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp) (Anthropic)
|
|
227
|
+
- [Code Mode: give agents an entire API in 1,000 tokens](https://blog.cloudflare.com/code-mode-mcp/) (Cloudflare)
|
|
277
228
|
|
|
278
|
-
|
|
279
|
-
{
|
|
280
|
-
"mcpServers": {
|
|
281
|
-
"bambu-printer": {
|
|
282
|
-
"command": "npx",
|
|
283
|
-
"args": ["-y", "bambu-printer-mcp"],
|
|
284
|
-
"env": {
|
|
285
|
-
"PRINTER_HOST": "192.168.1.100",
|
|
286
|
-
"BAMBU_SERIAL": "01P00A123456789",
|
|
287
|
-
"BAMBU_TOKEN": "your_access_token",
|
|
288
|
-
"BAMBU_MODEL": "p1s"
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
```
|
|
229
|
+
This applies to all MCP servers, not just this one.
|
|
294
230
|
|
|
295
231
|
---
|
|
296
232
|
|
|
@@ -464,7 +400,7 @@ Bambu Lab printers do not use a conventional REST API. Instead, they expose two
|
|
|
464
400
|
|
|
465
401
|
### What this fork fixes
|
|
466
402
|
|
|
467
|
-
|
|
403
|
+
Both this package and the parent project (`mcp-3D-printer-server`) include fixes for two protocol-level issues in the underlying `bambu-js` library.
|
|
468
404
|
|
|
469
405
|
**Bug 1: FTP double-path error in bambu-js.**
|
|
470
406
|
|
|
@@ -489,7 +425,7 @@ private async ftpUpload(host, token, localPath, remotePath): Promise<void> {
|
|
|
489
425
|
|
|
490
426
|
**Bug 2: AMS mapping format in the project_file MQTT command.**
|
|
491
427
|
|
|
492
|
-
The `bambu-js` library's project file command hardcodes `use_ams: true` and does not support the `ams_mapping` field at all.
|
|
428
|
+
The `bambu-js` library's project file command hardcodes `use_ams: true` and does not support the `ams_mapping` field at all. Without the fix, the mapping is a simple array of slot indices (e.g., `[0, 2]`), which does not match the OpenBambuAPI specification.
|
|
493
429
|
|
|
494
430
|
According to the OpenBambuAPI spec, `ams_mapping` must be a 5-element array where each position corresponds to a filament color slot in the print file. Unused positions must be padded with `-1`. For example, a print using only AMS slot 0 sends `[-1, -1, -1, -1, 0]`.
|
|
495
431
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bambu-printer-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for Bambu Lab 3D printers with STL manipulation, slicing, and print management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "https://github.com/DMontgomery40/bambu-printer-mcp",
|