Skip to main content
Glama
aiconceptlab

PrintAnything MCP Server

by aiconceptlab
README.md
# 3D LAB // 004 — PrintAnything

**Describe a phone stand. Review the dimensions. Build it in Blender. Export the STL.**

![Actual Blender render](public/samples/render.png)

PrintAnything is a deliberately small AI CAD assistant: one parametric phone-stand template, editable dimensions, an embossed label, a real charging slot and support ribs. The AI returns a bounded specification. Deterministic Blender Python creates and revises the geometry. It does not generate or execute arbitrary model-written code.

## Start here

Requirements: Node.js 22.12+ and **Blender 4.5 LTS** (tested with 4.5.9). Download Blender from [blender.org](https://www.blender.org/download/lts/4-5/). A desktop GPU is useful for previewing, but the background modelling/export path does not require one.

```sh
npm ci
# Windows: copy .env.example .env
# macOS/Linux: cp .env.example .env
npm run build
npm start
```

Open **http://127.0.0.1:3017**. The included Blender render, interactive mesh, STL and scene work without API keys. To build changes, edit `BLENDER_PATH` in `.env` to your actual executable and restart the server:

```dotenv
BLENDER_PATH=C:/Program Files/Blender Foundation/Blender 4.5/blender.exe
BLENDER_MODE=background
```

macOS typically uses `/Applications/Blender.app/Contents/MacOS/Blender`; Linux can use `/usr/bin/blender` when installed there. Do not copy a path without checking it.

1. Try the preset edit, or change the dimensions directly.
2. Select **Build in Blender**. It runs real Blender in the background.
3. Inspect the result, orbit the actual exported mesh and read the checks.
4. Download `stand.stl`, open it in your slicer and review dimensions, orientation, supports and fit.

The example edit button is a preset, not an AI call. To enable natural-language interpretation, add your own `OPENAI_API_KEY` and `OPENAI_MODEL` in `.env`. The key stays on the local server. Each interpretation sends your instruction and current dimensions to OpenAI; it does not send your filesystem or Blender scene. Provider usage is billed separately. An MCP-connected agent can choose the dimensions with its own model instead, without the app's OpenAI key.

## See Blender change live / connect an agent

Read **[docs/MCP.md](docs/MCP.md)** for the complete setup: start the app, run the supplied watcher in Blender, set live mode, configure the stdio MCP server, discover the tools, build, poll and revise. It includes Windows paths, generic client JSON, troubleshooting and the distinction from the separate community Blender MCP addon.

## What is checked

- Closed manifold edges, no loose vertices, one connected component and positive signed volume.
- Exported object bounds and an explicitly documented STL millimetre convention.
- Down-facing surface area away from the first layer as an overhang heuristic.
- Declared 4 mm structural plate thickness, 16 mm cable opening and chosen phone clearance.

**These checks do not certify printability.** They do not prove minimum thickness everywhere, stability under a real phone, material strength, tolerance after shrinkage or reliable bridging. The sample has not been physically printed. Use your printer's real profile; inspect supports and do a small fit test. The project does not send jobs to a printer.

## Included

| Item | Location |
|---|---|
| App + bounded AI parser | `src/`, `server.mjs` |
| Real Blender modelling + live watcher | `blender/` |
| Three-tool MCP bridge | `mcp.mjs` |
| STL, GLB, Blender scene and render | `public/samples/` |
| Architecture and reproducibility | `BUILD.md` |
| Setup, checks and slicer guidance | `docs/` |
| 4:5 carousel, caption and recording guide | `marketing/` |

## Verify it

```sh
npm run check
# Start the app first:
node tests/mcp-smoke.mjs
# Substitute your Blender executable:
blender --background --factory-startup --python-exit-code 1 --python tests/blender_validation.py
```

The Blender test checks five parameter combinations, the identity of the revised Blender object and the actual STL's binary dimensions. Build failures block downloads for the failed job. Background builds are limited to one at a time and stop after three minutes.

See the [validation record](docs/VALIDATION.md) and [slicer handoff](docs/SLICING.md) for results and their limits. The [30-second portrait demo](marketing/printanything-demo-4x5.mp4) uses actual intermediate Blender meshes and a camera orbit. Five carousel slides are supplied at **1080 × 1350 (4:5)** with a caption and posting notes.

The polished **31-second reel** adds matched dissolves, subtle product motion and animated titles: [9:16 reel](marketing/printanything-reel-9x16.mp4), [4:5 version](marketing/printanything-reel-4x5.mp4), and [editable composition / reproduction guide](marketing/REEL.md).

The app is local-only: it binds to loopback and rejects foreign Host/Origin headers. Do not expose it through a public tunnel. `.env` and job files are ignored by Git. MIT license covers this project's code and authored assets; Blender and PrusaSlicer retain their own licenses.