From "I want to print a coffee cup" to a finished print โ driven by your AI agent.
PrintMCP is a Model Context Protocol server that automates the entire 3D-printing pipeline: find a model, slice it to G-code, and print it โ all through tools an AI assistant can call.
๐ View the website โ โ interactive demo, pipeline visualization, and full documentation.
If PrintMCP is useful to you, please โญ star the repo โ it helps others find it.
๐งญ The pipeline
PrintMCP is built in three levels. Each level is a group of tools, and together they form one continuous workflow from a vague idea to plastic on the bed.
flowchart LR
Start(["๐ฃ๏ธ User request"]) --> S1
subgraph L1["1 ยท Source โ Thingiverse"]
direction TB
S1["search_models"] --> S2["get_model"] --> S3["download_model"]
end
subgraph L2["2 ยท Slice โ Cura"]
direction TB
SL["cura_slice_model"]
end
subgraph L3["3 ยท Print โ OctoPrint"]
direction TB
P1["upload_file"] --> P2["start_print"] --> P3["get_job"]
end
S3 --> SL --> P1
P3 --> Done(["โ
Finished print"])
| Level | Scope | Backend | Status |
|---|---|---|---|
| 1 ยท Source | Search for and download 3D model files | Thingiverse REST API | โ Implemented |
| 2 ยท Slice | Slice models into printer-ready G-code | Ultimaker Cura (headless CuraEngine) | โ Implemented |
| 3 ยท Print | Upload, start, monitor, and control prints | OctoPrint REST API | โ Implemented |
๐ Table of contents
- โจ Highlights
- ๐ Documentation
- ๐ก๏ธ Safety model
- ๐งฐ Tool reference
- ๐ฆ Requirements
- ๐ Quick start
- โ๏ธ Configuration
- ๐ Register with an MCP client
- ๐ก Example: coffee cup to print
- ๐๏ธ Project structure
- ๐งช Development
- ๐บ๏ธ Roadmap
- โ๏ธ Model licensing
- ๐ License
โจ Highlights
- One server, the whole pipeline. Search โ download โ slice โ print, without leaving your assistant.
- License-aware sourcing. Every model's license is surfaced before you download, so you don't misuse it.
- Real slicing, real estimates. Drives the same CuraEngine that Ultimaker Cura ships, and reports the true print time and filament usage from the engine itself.
- Safe by default. Tools that physically actuate the printer (heaters, motors) refuse to act unless you
explicitly pass
confirm=trueโ see Safety model. - Structured or human output. Every tool accepts
response_format(markdownorjson). - Zero-secret-in-output design. Credentials live in
.envand are sent only to the services they belong to.
๐ Documentation
Full guides, a per-tool reference, and step-by-step tutorials live in docs/.
| Start here | Then |
|---|---|
| ๐ Documentation hub | the index of everything below |
| ๐ Getting Started | install, configure, connect a client |
| โ๏ธ Configuration | every env var + where files are stored |
| ๐ก๏ธ Safety Model | how confirm=true protects your machine |
| ๐ง Troubleshooting | common errors โ fixes |
| ๐๏ธ Architecture | how it's built (for contributors) |
Tutorials โ learn to 3D print by chatting with your assistant:
For developers โ tool reference & API: the shared invocation contract, plus per-level details for Thingiverse, Cura, and OctoPrint.
๐ก๏ธ Safety model
[!WARNING] Level 3 drives a real machine. A bad tool call could heat a nozzle, move an axis, or abandon a print.
To prevent accidents, every physical-actuation tool defaults to a dry run. Called without confirm, it
describes exactly what would happen and sends nothing to the printer. Pass confirm=true to actually act.
octoprint_start_print(path="cup.gcode") โ ๐ก dry run: "this would start printing cup.gcode"
octoprint_start_print(path="cup.gcode", confirm=true) โ ๐ข starts the print
[!NOTE] Read-only tools (
octoprint_get_status,octoprint_list_files,octoprint_get_job) never needconfirm. Temperatures are also sanity-checked (e.g. the bed is capped at ~140 ยฐC) so a typo can't command a wild value.
๐งฐ Tool reference
All tools accept response_format (markdown or json). Tools marked ๐ physically actuate the printer and
require confirm=true; without it they return a harmless dry-run preview.
Level 1 ยท Source โ Thingiverse
| Tool | What it does |
|---|---|
thingiverse_search_models |
Keyword search for printable "things"; returns candidates with IDs. |
thingiverse_get_model |
Details for one thing: license, description, and downloadable files. |
thingiverse_download_model |
Download a thing's files (printable models by default) to local disk. |
Level 2 ยท Slice โ Cura
| Tool | What it does |
|---|---|
cura_slice_model |
Slice a local .stl/.obj/.3mf/.amf/.ply into G-code. Choose printer, layer height, infill, supports, adhesion, and temperatures; returns the G-code path plus estimated print time and filament. |
Level 3 ยท Print โ OctoPrint
| Tool | What it does | |
|---|---|---|
octoprint_get_status |
Connection state, printer state, and live tool/bed temperatures. | ๐๏ธ |
octoprint_list_files |
List G-code files on the server, with their server-side paths. | ๐๏ธ |
octoprint_get_job |
Active job: file, % complete, elapsed, and estimated time remaining. | ๐๏ธ |
octoprint_connect |
Open or close the printer's serial connection. | ๐ |
octoprint_upload_file |
Upload a local .gcode to the server (optionally select/print). |
๐ยน |
octoprint_start_print |
Select a server-side file and begin printing. | ๐ |
octoprint_control_job |
Pause, resume, or cancel the running job. | ๐ |
octoprint_set_temperature |
Set a tool (nozzle) or bed target temperature. | ๐ |
octoprint_home |
Home one or more axes. | ๐ |
octoprint_move |
Jog the print head by a relative offset. | ๐ |
๐๏ธ read-only ยท ๐ requires confirm=true ยท ยน uploading alone is safe; only starting a print needs confirm.
๐ฆ Requirements
| Needed for | Notes | |
|---|---|---|
| Python โฅ 3.10 | everything | โ |
| uv | everything | Project & dependency manager. |
| Thingiverse API token | Level 1 | Free โ register an app. |
| Ultimaker Cura | Level 2 | Its bundled CuraEngine is auto-detected on Windows. |
| An OctoPrint server + API key | Level 3 | Any printer running OctoPrint on your network. |
[!TIP] The levels are independent. You can use Level 1 with just a Thingiverse token, add Cura later for slicing, and wire up OctoPrint whenever your printer is ready.
๐ Quick start
Install from PyPI
uv tool install printmcp # or: pipx install printmcp
This puts a printmcp command on your PATH. You can also run it without installing:
uvx printmcp
Install from source
git clone https://github.com/SourceBox-LLC/PrintMCP
cd PrintMCP
uv sync # creates .venv, installs PrintMCP + dev tools
Then: configure and run
# Configure your secrets (in the working directory you'll run from)
cp .env.example .env # Windows: copy .env.example .env
# โฆthen edit .env (see Configuration below)
# Run the server (stdio โ it blocks waiting for an MCP client; that's expected)
printmcp # if installed; from source: uv run printmcp
You normally won't run the server by hand โ you register it with a client, which launches it for you.
โ๏ธ Configuration
PrintMCP reads configuration from environment variables. A .env file in the project root is loaded
automatically (and is git-ignored, so your secrets stay local).
| Variable | Required | Default | Purpose |
|---|---|---|---|
THINGIVERSE_TOKEN |
Level 1 | โ | Thingiverse REST API App Token. |
PRINTMCP_DOWNLOAD_DIR |
โ | OS Downloads folder (e.g. %USERPROFILE%\Downloads, ~/Downloads); falls back to ~/PrintMCP/downloads if not found |
Where downloaded models are saved. |
PRINTMCP_CURA_DIR |
โ | auto-detected | Ultimaker Cura install folder (e.g. C:\Program Files\UltiMaker Cura 5.11.0). Set only if auto-detection fails. |
PRINTMCP_CURAENGINE |
โ | <cura>/CuraEngine.exe |
Full path to the CuraEngine executable, if it lives outside the Cura folder. |
OCTOPRINT_URL |
Level 3 | โ | Base URL of your OctoPrint server, e.g. http://octopi.local or http://192.168.1.50:80. |
OCTOPRINT_API_KEY |
Level 3 | โ | OctoPrint API key. Sent only in the X-Api-Key header to OCTOPRINT_URL. |
Where do I get each credential?
- Thingiverse token โ Create an app at https://www.thingiverse.com/apps/create and copy its App Token.
- OctoPrint API key โ In OctoPrint: Settings โ API (global key), or generate a per-user Application Key under your user account. Either works.
๐ Register with an MCP client
Automatic
The setup script detects your installed MCP clients (Claude Code, Claude Desktop, Cursor, Windsurf, opencode), lets you pick one, and configures it for you:
# Windows (PowerShell)
.\scripts\setup-mcp.ps1
# macOS / Linux
./scripts/setup-mcp.sh
[!IMPORTANT] Close the client first. MCP clients rewrite their config when they exit, so a setup that runs while the client is open gets clobbered. If the client you choose is running, the script tells you to quit it and run again. See scripts/README.md.
Manual
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"printmcp": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\Users\\Sbuss\\Documents\\Software Development\\Projects\\PrintMCP",
"printmcp"
]
}
}
}
Claude Code CLI
claude mcp add printmcp -- uv run --directory "C:\Users\Sbuss\Documents\Software Development\Projects\PrintMCP" printmcp
[!TIP] Point
--directoryat wherever you cloned PrintMCP. The client launches the server and talks to it over stdio.
๐ก Example: coffee cup to print
You don't call tools โ you just talk to your assistant, and it drives the whole pipeline. A full run sounds like this:
๐ฌ You: "I want to 3D print a coffee cup. Find one, get it ready for my Ender 3, and start it."
๐ค Assistant: "I found a few coffee cups on Thingiverse โ here are the top threeโฆ"
๐ฌ You: "The first one."
๐ค Assistant: "Good pick โ it's licensed Creative Commons (free to print). I've downloaded and sliced it for your Ender-3 Pro: about 6h 31m and ~25.5 m of filament. Before I start the physical printer โ ready for me to begin?"
๐ฌ You: "Yes, go."
๐ค Assistant: "Printing now! ๐ Ask me any time for progress."
๐ฌ You: (later) "How's it going?"
๐ค Assistant: "About 42% done โ roughly 2h 14m left."
One request, one finished cup. The assistant handles the busywork (searching, downloading, slicing, uploading); you make the decisions that matter โ which model, and the go-ahead to start.
[!NOTE] Anything that touches the physical printer โ heating, moving, starting a print โ pauses for your confirmation first. Everything up to slicing is purely local and needs no go-ahead. See the Safety Model.
Want the step-by-step version? The tutorials walk through it in plain conversation.
๐๏ธ Project structure
PrintMCP/
โโโ src/printmcp/
โ โโโ app.py # shared FastMCP instance
โ โโโ server.py # entry point โ registers tools, runs over stdio
โ โโโ config.py # env-driven config (tokens, Cura paths, OctoPrint URL/key)
โ โโโ thingiverse.py # Level 1 โ search & download
โ โโโ cura.py # Level 2 โ slice via CuraEngine
โ โโโ octoprint.py # Level 3 โ print management
โโโ docs/ # full documentation (guides, tool reference, tutorials)
โ โโโ README.md # documentation hub
โ โโโ getting-started.md, configuration.md, safety.md, troubleshooting.md, architecture.md
โ โโโ tools/ # per-level tool reference
โ โโโ tutorials/ # step-by-step walkthroughs
โโโ tests/ # offline tests (validation + mock-transport HTTP)
โโโ .env.example
โโโ pyproject.toml
โโโ README.md
๐งช Development
uv run pytest # tests
uvx ruff check src tests # lint
uvx ruff format --check src tests # formatting
CI runs all three on every push and PR (tests across Python 3.10โ3.13).
The suite is fully offline โ it requires no token, network, or Cura install and runs in under two seconds. It covers:
- Input validation & helpers โ tool registration, filename sanitization, slice-input ranges, stats parsing.
- The Level 3 safety gate โ every actuating tool refuses to act (and sends nothing) without
confirm=true. - OctoPrint HTTP plumbing โ using a mock transport, it asserts the exact method, path, JSON body, and
X-Api-Keyheader of every request, that responses parse correctly, and that error statuses (401/409/ connection-refused) map to friendly messages โ all without a printer.
Notable changes are tracked in CHANGELOG.md; releasing is documented in docs/RELEASING.md.
๐บ๏ธ Roadmap
- More print backends โ a Moonraker/Klipper backend exposing
moonraker_*tools alongside the OctoPrint ones, so non-OctoPrint printers work too. - Slicing depth โ more printer profiles and quality presets, and surfacing CuraEngine warnings (e.g. a model larger than the build volume).
- More model sources โ Printables, MyMiniFactory, and others behind a shared search interface.
โ๏ธ Model licensing
Models on Thingiverse carry their own licenses (often Creative Commons; some are non-commercial).
thingiverse_get_model and thingiverse_download_model surface each model's license โ respect it before
reusing, remixing, or selling a print.
๐ License
Licensed under the Apache License 2.0 โ ยฉ 2026 SourceBox LLC.
You may freely use, modify, and distribute this software, including for commercial purposes, provided you retain the copyright and license notices and state any significant changes. The license also includes an express patent grant. It comes with no warranty. See the LICENSE file for the full text.
[!NOTE] This license covers PrintMCP's own code only. Third-party tools it drives (Ultimaker Cura, OctoPrint) and any 3D models you download carry their own licenses โ see Model licensing above.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file printmcp-0.1.0.tar.gz.
File metadata
- Download URL: printmcp-0.1.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c180b429e8fe052ab8d2c4086ae619b9d12d01b1eea5561ff952017ee132c14b
|
|
| MD5 |
cfd7a43f859bb0cb7b71beaffef9a634
|
|
| BLAKE2b-256 |
0d3ca9b8a812862c04c74e7f6d71a0f945d9eabe46440a06e3f6f71f58aebeac
|
File details
Details for the file printmcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: printmcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
991770c29899053165ccd602a7820ffd56bbcf4f8a6615cb62926b37a8212767
|
|
| MD5 |
2c2c354baa5e2d5e5cc7f58a85bf10fd
|
|
| BLAKE2b-256 |
72a87e70fdcf7cef5d5d20d9971efa3575630e6e1e2748ccbbfc334b70712abc
|