Metadata-Version: 2.4
Name: kiln3d
Version: 1.5.0
Summary: MCP server + CLI that gives AI agents safe access to 3D printers (compatible with Bambu Lab, Creality, Prusa Link, Elegoo, Moonraker/Klipper, OctoPrint, Duet, USB) — 902 MCP capabilities for AI-driven print workflows
Author: Kiln Contributors
License: AGPL-3.0-or-later
Project-URL: Homepage, https://kiln3d.com/?utm_source=pypi&utm_medium=package-page
Project-URL: Documentation, https://kiln3d.com/docs?utm_source=pypi&utm_medium=package-page
Project-URL: Repository, https://github.com/codeofaxel/Kiln
Project-URL: Issues, https://github.com/codeofaxel/Kiln/issues
Project-URL: Changelog, https://github.com/codeofaxel/Kiln/releases
Keywords: 3d-printing,mcp,mcp-server,model-context-protocol,ai-agent,agent,llm,automation,fabrication,manufacturing,print-farm,octoprint,moonraker,klipper,bambu,bambu-lab,prusa,prusa-link,elegoo,gcode,slicer,prusaslicer,orcaslicer,iot,smart-manufacturing
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Printing
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Home Automation
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp>=2.2.0
Requires-Dist: requests>=2.25
Requires-Dist: pyyaml>=5.4
Requires-Dist: pydantic>=2.13.5
Requires-Dist: click>=8.5.0
Requires-Dist: zeroconf>=0.151.3
Requires-Dist: rich>=12.0
Requires-Dist: paho-mqtt>=2.0
Requires-Dist: cryptography>=50.0.1
Requires-Dist: websockets>=12.0
Requires-Dist: numpy>=1.24
Requires-Dist: trimesh>=4.0
Requires-Dist: Pillow>=9.0
Requires-Dist: httpx>=0.27
Requires-Dist: python-dotenv>=1.0
Provides-Extra: bambu
Provides-Extra: elegoo
Requires-Dist: websocket-client>=1.9.2; extra == "elegoo"
Provides-Extra: postgres
Requires-Dist: psycopg2-binary>=2.9.13; extra == "postgres"
Provides-Extra: stripe
Requires-Dist: stripe>=15.6.1; extra == "stripe"
Provides-Extra: payments
Requires-Dist: stripe>=15.6.1; extra == "payments"
Requires-Dist: cryptography>=50.0.1; extra == "payments"
Provides-Extra: usb
Requires-Dist: pyserial>=3.5; extra == "usb"
Provides-Extra: serial
Requires-Dist: pyserial>=3.5; extra == "serial"
Provides-Extra: qr
Requires-Dist: qrcode[pil]>=8.2; extra == "qr"
Provides-Extra: emboss
Requires-Dist: Pillow>=9.0; extra == "emboss"
Requires-Dist: rembg>=2.0.69; extra == "emboss"
Requires-Dist: onnxruntime>=1.24.3; extra == "emboss"
Provides-Extra: mesh-diagnostics
Provides-Extra: step
Requires-Dist: cadquery-ocp-novtk<8.1,>=7.9; extra == "step"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: pytest-mock>=3.6; extra == "dev"
Requires-Dist: pytest-xdist>=3.5; extra == "dev"
Requires-Dist: responses>=0.26.3; extra == "dev"
Requires-Dist: Pillow>=9.0; extra == "dev"
Requires-Dist: networkx>=3.4; extra == "dev"
Requires-Dist: lxml>=6.1.3; extra == "dev"
Requires-Dist: manifold3d>=3.5.3; extra == "dev"

# Kiln

<!-- mcp-name: io.github.codeofaxel/kiln -->

<!-- kiln-highlights: 1.5.0
* watch your print from inside the chat: a live monitor panel opens in your AI app with your printer's camera in it, so you never leave the conversation
* ordering from a manufacturing service is rebuilt: the full price up front, payment on the service's own checkout, and status from paid to delivered
* approve a print from your phone, with the model to turn in 3D and what it costs in time and filament, once or for the next few hours
kiln-highlights:end -->
<!-- The block above is machine-read, not rendered: installed Kilns parse it
     out of the PyPI JSON description so their update nudge can say what the
     newest release adds (kiln/src/kiln/version_check.py). Update it each
     release, wording identical to kiln-pro's version_highlights.py ledger
     (its posture gate reconciles the two). -->


**Describe it or draw it. Kiln makes it real.**

Kiln turns a conversation with an AI agent into a printed object. One install, any printer, start to finish — design, slice, queue, monitor, and fulfill 3D print jobs through a unified MCP (Model Context Protocol) server and CLI.

## What Kiln Does

An agent can go from intent to physical object with zero human intervention:

```
Agent: "Print this sensor mount"
  → Kiln validates the file
  → Checks printer readiness
  → Uploads G-code
  → Starts print
  → Monitors progress
  → Reports completion
```

> **Reading this as an AI agent?** [**kiln3d.com/agents**](https://kiln3d.com/agents?utm_source=pypi&utm_medium=package-page) is written for you rather than for the person running you: install, MCP config, the design-to-print loop, and exactly what Kiln will refuse to do and why.

## Quick Start

### 1. Install

```bash
# From PyPI
pip install kiln3d

# From source (development)
pip install -e ".[dev]"
```

OS-specific walkthrough (Windows, WSL 2, Linux) at [kiln3d.com/install](https://kiln3d.com/install?utm_source=pypi&utm_medium=package-page).

### 2. Configure

```bash
# Option A: Environment variables
export KILN_PRINTER_TYPE=octoprint
export KILN_PRINTER_HOST=http://octopi.local
export KILN_PRINTER_API_KEY=your_api_key

# Option B: CLI auth (saves to ~/.kiln/config.yaml)
kiln auth --name my-printer --host http://octopi.local --type octoprint --api-key YOUR_KEY
```

### 3. Run

```bash
# CLI
kiln status
kiln print model.gcode

# MCP Server
kiln serve
```

### 4. Connect from Claude Desktop

Add to `~/.config/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "kiln": {
      "command": "kiln",
      "args": ["serve"],
      "env": {
        "KILN_PRINTER_TYPE": "octoprint",
        "KILN_PRINTER_HOST": "http://octopi.local",
        "KILN_PRINTER_API_KEY": "your_api_key"
      }
    }
  }
}
```

Full documentation: [kiln3d.com/docs](https://kiln3d.com/docs?utm_source=pypi&utm_medium=package-page).

## Supported Printers

Eight backends. The name in backticks is the `KILN_PRINTER_TYPE` value.

| Backend | Transport | Printers |
|---------|-----------|----------|
| **Bambu Lab** (`bambu`) | LAN MQTT + FTPS | X1C, X1E, P1S, P1P, P2S, A1, A1 Mini, A2L, H2S, H2D, H2D Pro, H2C, X2D |
| **Creality** (`creality`) | Moonraker HTTP API (port-probed) | K1, K1C, K1 Max, Ender-3 V3 / V3 KE, CR-10 SE; K2 family and Hi where Fluidd/Moonraker is present. Marlin-era Enders use `serial` or `octoprint` |
| **Prusa Link** (`prusalink`) | Prusa Link HTTP API | MK4, XL, Mini+ |
| **Elegoo** (`elegoo`) | SDCP over WebSocket | Centauri Carbon and other SDCP machines. Neptune 4 and OrangeStorm Giga run Klipper — use `moonraker` for those |
| **Moonraker / Klipper** (`moonraker`) | Moonraker HTTP API | Any Klipper printer — Voron, Rat Rig V-Core 3, Sovol SV07, QIDI X-Plus 3 |
| **OctoPrint** (`octoprint`) | OctoPrint REST API | Compatible with any OctoPrint-connected printer |
| **Duet / RepRapFirmware** (`duet`) | RepRapFirmware HTTP (RRF 2 and 3) | Duet 2 WiFi/Ethernet, Duet 3, and the machines built around them |
| **Direct USB** (`usb`) | Marlin G-code over USB serial | Any Marlin printer — Ender 3, Prusa MK3S, CR-10 |

Two backends need an extra: `pip install 'kiln3d[elegoo]'` and `pip install
'kiln3d[usb]'`. The rest work with a plain install. Bambu printers need LAN
Only Mode and Developer Mode turned on to start and control prints (status
works without them), plus the access code shown beside those switches on the
printer's screen. Switching either mode off and on, a firmware update, and
sometimes a restart give the printer a new code, and the old one stops working.

<!-- BEGIN SUPPORTED PRINTERS (auto-generated by scripts/generate_supported_printers.py) -->
The full searchable list of **70 tuned printer profiles across 15 brands** is at [kiln3d.com/printers](https://kiln3d.com/printers?utm_source=pypi&utm_medium=package-page).
<!-- END SUPPORTED PRINTERS -->



## Features

- **<!-- KILN_MCP_CAPABILITY_COUNT:OLD --> 902 MCP capabilities** for design intelligence, model generation, printability analysis, slicing, printing, monitoring, failure recovery, fleet management, and fulfillment
- **<!-- KILN_CLI_COUNT:OLD --> 246 CLI commands** with `--json` output for agent consumption
- **Multi-printer fleet** management with job queue and background scheduler
- **Model marketplaces** — search/download from MyMiniFactory, Cults3D (Thingiverse deprecated — acquired by MMF, Feb 2026)
- **Slicer integration** — PrusaSlicer, OrcaSlicer, and BambuStudio with auto-detection
- **Text-to-model generation** — Meshy AI, Tripo3D, Stability AI, OpenSCAD with auto-discovery registry
- **Printability analysis** — overhang detection, thin wall analysis, auto-orientation, support estimation, failure prediction, quality scorecard
- **Mesh operations** — mirror, hollow, center, scale-to-fit, merge, split, simplify, repair, non-manifold analysis — all pure Python, no external mesh libraries
- **Print DNA** — model fingerprinting, crowd-sourced print settings, intelligent settings prediction
- **Marketplace publish** — one-click publish to Thingiverse/MyMiniFactory with print "birth certificate"
- **Revenue tracking** — per-model creator analytics, 2.5% platform fee on Kiln-published models
- **Print-as-a-Service** — local vs fulfillment cost comparison, order lifecycle management
- **Failure recovery** — 9 failure types classified, automated recovery planning
- **Multi-printer splitting** — round-robin and assembly-based job distribution across fleets
- **Generation feedback loop** — failed print → improved prompt with printability constraints
- **Smart material routing** — intent-based material recommendations across 38 materials, printer capability aware; brand filament profiles for 69 brands and lines (the per-brand tune is part of Kiln Pro)
- **Decoration engine** — QR codes, photos, logos, text, SVGs, and brand assets embossed or debossed onto any model with one command (patent pending)
- **Procedural textures** — tiger stripe, marble, digital camo, snakeskin, wood grain, carbon fiber, honeycomb, lava — applied directly to any model for multicolor FDM printing (Pro)
- **Product templates** — one-command generation of coasters, keychains, ornaments, pet tags, pet bowls, bookmarks, magnets, jewelry trays, wall plaques, and ashtrays with built-in decoration support (Pro)
- **Mid-print modification** — decorate, add features, or swap material on a live print with atomic dual-artifact revert (patent pending, Pro)
- **Resume interrupted prints** — resume from the exact layer after cancel on any supported FDM printer, no wasted filament (patent pending, Pro)
- **Design provenance** — version tracking, regression detection, outcome-correlated genealogy across design iterations (patent pending, Pro)
- **Cross-printer learning** — fleet-wide outcome learning, predictive settings, closed-loop AI generation feedback where failed prints auto-improve future generations (patent pending)
- **AMS auto-routing** — automatic Bambu AMS tray detection, color/type identification, and slot routing when starting prints
- **Community print registry** — opt-in crowd-sourced settings and success rates
- **Fulfillment services** — outsource to Craftcloud's network of print services, quoted and ordered through Kiln
- **Safety first** — pre-flight checks, G-code validation, temperature limits, optional auth
- **Webhooks** — HMAC-signed event notifications for job lifecycle
- **OTA firmware updates** — check, update, and rollback printer firmware

Features marked (Pro) need a paid tier — [kiln3d.com/pricing](https://kiln3d.com/pricing?utm_source=pypi&utm_medium=package-page).

## Architecture

```
AI Agent (Claude, GPT, custom)
    |
    | CLI or MCP (Model Context Protocol)
    v
+------------------------------------------+
|                   Kiln                   |
|     design, validate, slice, monitor     |
+------------------------------------------+
    |
    | one PrinterAdapter interface, eight backends
    v
Your printer (see Supported Printers above)
```

Tools are written against that one interface rather than once per printer.
Backends differ in what the hardware exposes, so `PrinterCapabilities`
reports what a given machine actually supports.

## Development

```bash
pip install -e ".[dev]"
cd kiln && python3 -m pytest tests/ -v
```

## License

AGPL-3.0-or-later. Commercial licensing is available for companies that need proprietary use — see [kiln3d.com/pricing](https://kiln3d.com/pricing?utm_source=pypi&utm_medium=package-page).

## Trademarks

[OctoPrint is a registered trademark](https://octoprint.org). Other product and company names are trademarks of their respective owners; Kiln is not affiliated with or endorsed by them.
