mcp-3d-printer-server 1.2.1 → 1.2.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 +39 -67
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
- [Running with Docker](#running-with-docker)
|
|
58
58
|
- [Using Slicers with Docker](#using-slicers-with-docker)
|
|
59
59
|
- [Configuration](#configuration)
|
|
60
|
-
- [Usage
|
|
60
|
+
- [Usage](#usage)
|
|
61
61
|
- [Supported Printer Management Systems](#supported-printer-management-systems)
|
|
62
62
|
- [OctoPrint](#octoprint)
|
|
63
63
|
- [Klipper (via Moonraker)](#klipper-via-moonraker)
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
- [Visualization Limitations](#visualization-limitations)
|
|
86
86
|
- [Performance Considerations](#performance-considerations)
|
|
87
87
|
- [Testing Recommendations](#testing-recommendations)
|
|
88
|
-
- [Appendix: MCP
|
|
88
|
+
- [Appendix: MCP Safety Notes](#appendix-mcp-safety-notes)
|
|
89
89
|
- [Badges](#badges)
|
|
90
90
|
- [License](#license)
|
|
91
91
|
|
|
@@ -239,46 +239,55 @@ MCP_HTTP_ALLOWED_ORIGINS=http://localhost
|
|
|
239
239
|
BLENDER_MCP_BRIDGE_COMMAND=
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
## Usage
|
|
242
|
+
## Usage
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
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:
|
|
245
245
|
|
|
246
246
|
```json
|
|
247
247
|
{
|
|
248
248
|
"mcpServers": {
|
|
249
249
|
"3dprint": {
|
|
250
|
-
"command": "
|
|
251
|
-
"
|
|
252
|
-
"API_KEY": "your_api_key_here",
|
|
253
|
-
"PRINTER_HOST": "your_printer_ip",
|
|
254
|
-
"PRINTER_TYPE": "octoprint"
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
2. For Bambu Labs printers:
|
|
262
|
-
|
|
263
|
-
```json
|
|
264
|
-
{
|
|
265
|
-
"mcpServers": {
|
|
266
|
-
"3dprint": {
|
|
267
|
-
"command": "mcp-3d-printer-server",
|
|
250
|
+
"command": "npx",
|
|
251
|
+
"args": ["-y", "mcp-3d-printer-server"],
|
|
268
252
|
"env": {
|
|
269
253
|
"PRINTER_HOST": "your_printer_ip",
|
|
270
254
|
"PRINTER_TYPE": "bambu",
|
|
271
255
|
"BAMBU_SERIAL": "your_printer_serial",
|
|
272
256
|
"BAMBU_TOKEN": "your_access_token",
|
|
273
|
-
"BAMBU_MODEL": "p1s"
|
|
257
|
+
"BAMBU_MODEL": "p1s",
|
|
258
|
+
"SLICER_TYPE": "bambustudio",
|
|
259
|
+
"SLICER_PATH": "/Applications/BambuStudio.app/Contents/MacOS/BambuStudio"
|
|
274
260
|
}
|
|
275
261
|
}
|
|
276
262
|
}
|
|
277
263
|
}
|
|
278
264
|
```
|
|
279
265
|
|
|
280
|
-
|
|
281
|
-
|
|
266
|
+
For non-Bambu printers, replace the Bambu-specific env vars with `API_KEY` and the appropriate `PRINTER_TYPE` (see [Supported Printer Management Systems](#supported-printer-management-systems)).
|
|
267
|
+
|
|
268
|
+
Where this config lives depends on your client:
|
|
269
|
+
|
|
270
|
+
| Client | Config location |
|
|
271
|
+
|--------|----------------|
|
|
272
|
+
| Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
273
|
+
| Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
274
|
+
| Claude Code (project) | `.mcp.json` in project root |
|
|
275
|
+
| Claude Code (global) | `~/.claude/settings.json` |
|
|
276
|
+
| Cursor | MCP settings in Cursor preferences |
|
|
277
|
+
| Codex CLI | MCP config per Codex docs |
|
|
278
|
+
|
|
279
|
+
Restart your client after editing the config.
|
|
280
|
+
|
|
281
|
+
### Recommended: use with codemode-mcp
|
|
282
|
+
|
|
283
|
+
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, codemode lets the agent write code against a two-tool interface (`search()` and `execute()`), loading only the tools it needs on demand.
|
|
284
|
+
|
|
285
|
+
Anthropic and Cloudflare independently demonstrated this pattern reduces MCP token costs by up to 98%:
|
|
286
|
+
|
|
287
|
+
- [Code execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp) (Anthropic)
|
|
288
|
+
- [Code Mode: give agents an entire API in 1,000 tokens](https://blog.cloudflare.com/code-mode-mcp/) (Cloudflare)
|
|
289
|
+
|
|
290
|
+
This applies to all MCP servers, not just this one.
|
|
282
291
|
|
|
283
292
|
## Supported Printer Management Systems
|
|
284
293
|
|
|
@@ -805,56 +814,19 @@ Due to the nature of the Bambu Lab printer API, there are some limitations:
|
|
|
805
814
|
- Test modifications on simple geometries before attempting complex ones
|
|
806
815
|
- Consider running on a system with at least 4GB of available RAM for larger operations
|
|
807
816
|
|
|
808
|
-
## Appendix: MCP
|
|
809
|
-
|
|
810
|
-
Last updated: 2026-02-24
|
|
811
|
-
|
|
812
|
-
### State of MCP Right Now
|
|
813
|
-
MCP remains a high-value protocol for interoperability, but large tool surfaces have a real downside: tool schemas, retries, and tool-call traces can flood the context window. More tools often means more token overhead unless the execution model is disciplined.
|
|
817
|
+
## Appendix: MCP Safety Notes
|
|
814
818
|
|
|
815
|
-
|
|
816
|
-
Recent production workflows increasingly move orchestration out of conversational turns and into executable code loops. This keeps context leaner, makes behavior easier to audit, and improves reproducibility.
|
|
819
|
+
See [Recommended: use with codemode-mcp](#recommended-use-with-codemode-mcp) for reducing token overhead with large tool surfaces.
|
|
817
820
|
|
|
818
|
-
|
|
819
|
-
- Cloudflare: https://blog.cloudflare.com/code-mode/
|
|
820
|
-
- Cloudflare: https://blog.cloudflare.com/code-execution-with-mcp/
|
|
821
|
-
- Anthropic: https://www.anthropic.com/engineering/code-execution-with-mcp
|
|
821
|
+
### Prompt Injection: Risks and Mitigations
|
|
822
822
|
|
|
823
|
-
|
|
824
|
-
For practical day-to-day use, start with a codemode-oriented gateway and keep direct tool exposure narrow:
|
|
825
|
-
- `codemode-mcp`: https://github.com/jx-codes/codemode-mcp
|
|
826
|
-
- UTCP routing guidance: https://www.utcp.io
|
|
823
|
+
Prompt injection is an open problem for tool-using agents. Practical mitigations:
|
|
827
824
|
|
|
828
|
-
Even with strong setup, model/tool usage can still be inconsistent across client versions and model releases, so retries and deterministic fallbacks are still required.
|
|
829
|
-
|
|
830
|
-
### Peter Steinberger Workflow Pattern
|
|
831
|
-
A high-signal pattern is converting broad MCP toolsets into targeted CLIs so the model calls fewer, better-defined commands:
|
|
832
|
-
- MCPorter: https://github.com/steipete/mcporter
|
|
833
|
-
- OpenClaw: https://github.com/steipete/openclaw
|
|
834
|
-
|
|
835
|
-
### What Works Best With Which Clients
|
|
836
|
-
- Claude Code, Codex CLI, and Cursor agent modes: strong fit for direct MCP and code-execution workflows.
|
|
837
|
-
- Thin hosted chat clients: usually better when MCP servers are wrapped behind narrower CLIs/gateways.
|
|
838
|
-
- Large multi-tool servers: best when grouped into task-specific wrappers instead of exposing every tool directly.
|
|
839
|
-
|
|
840
|
-
This ecosystem changes quickly; if you are reading this later, parts of this section may already be stale.
|
|
841
|
-
|
|
842
|
-
### Prompt Injection: Risks, Consequences, and Mitigations
|
|
843
|
-
Prompt injection is still an open problem for tool-using agents. It is manageable, but not solved.
|
|
844
|
-
|
|
845
|
-
Primary risks:
|
|
846
|
-
- Hidden malicious instructions in remote content or tool output.
|
|
847
|
-
- Secret exfiltration via unintended network/tool calls.
|
|
848
|
-
- Unauthorized state changes (filesystem, infrastructure, or printer actions).
|
|
849
|
-
|
|
850
|
-
Practical mitigations:
|
|
851
825
|
- Least-privilege credentials and short-lived tokens.
|
|
852
826
|
- Strict schema validation and explicit allowlists for actions/hosts.
|
|
853
827
|
- Human confirmation gates for destructive operations.
|
|
854
828
|
- Execution sandboxing with resource/time limits.
|
|
855
|
-
-
|
|
856
|
-
|
|
857
|
-
Treat tool output as untrusted input by default.
|
|
829
|
+
- Treat tool output as untrusted input by default.
|
|
858
830
|
|
|
859
831
|
## Badges
|
|
860
832
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-3d-printer-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "MCP server for connecting Claude with 3D printer management systems",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "https://github.com/DMontgomery40/mcp-3D-printer-server",
|