Skip to main content
Glama
Draco Blender MCP

Draco Blender MCP

README.md
<p align="center">
  <img src="assets/banner.svg" alt="Draco Blender MCP: Draco the baby dragon juggling low-poly shapes" width="100%">
</p>

<p align="center">
  <a href="https://github.com/MirHamzaHasan/draco-blender-mcp/releases/latest"><img src="https://img.shields.io/github/v/release/MirHamzaHasan/draco-blender-mcp?color=5ED39A&label=addon&style=for-the-badge" alt="Latest addon release"></a>
  <a href="https://github.com/MirHamzaHasan/draco-blender-mcp/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/MirHamzaHasan/draco-blender-mcp/ci.yml?label=tests&style=for-the-badge&color=7EC8FF" alt="Tests"></a>
  <img src="https://img.shields.io/badge/Blender-3.0%2B-FF9A4D?style=for-the-badge&logo=blender&logoColor=white" alt="Blender 3.0 and newer">
  <img src="https://img.shields.io/badge/telemetry-none-FF6FA8?style=for-the-badge" alt="No telemetry">
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-C9B8F0?style=for-the-badge" alt="MIT license"></a>
</p>

Draco Blender MCP lets Claude, Cursor or any MCP client build things in Blender.
Instead of dozens of tools, it gives your AI two: **search** to find the right helper, and **execute** to run one Python script inside Blender.
The heavy lifting happens in Blender, and only a short summary comes back to the chat.

<p align="center"><img src="assets/tokens.svg" alt="About 6,170 tokens of tool definitions upstream versus about 430 for Draco Blender MCP" width="820"></p>

## Get started

<p align="center"><img src="assets/steps.svg" alt="Install the addon, click Connect in Blender, add the server to Claude" width="100%"></p>

You need Blender 3.0 or newer and [uv](https://docs.astral.sh/uv/) (`brew install uv` on macOS).

### 1. Install the addon

Download `draco_blender.zip` from the [latest release](https://github.com/MirHamzaHasan/draco-blender-mcp/releases/latest). In Blender open **Edit › Preferences › Add-ons**, use the ⌄ menu at the top right, pick **Install from Disk** and choose the zip. Search `draco` and tick **Draco Blender MCP**.

Prefer the terminal? This copies the addon into every Blender version it finds:

```bash
uvx --python 3.12 --from git+https://github.com/MirHamzaHasan/draco-blender-mcp draco-blender-mcp install-addon
```

### 2. Connect in Blender

<p align="center"><img src="assets/sidebar.svg" alt="Press N in the 3D Viewport, open the Draco MCP tab, click Connect" width="620"></p>

Hover the 3D view, press **N**, open the **Draco MCP** tab and click **Connect**. You should see *Connected on localhost:9876*. Keep **Auto-connect on startup** ticked and you only do this once.

### 3. Add the server to Claude

**Claude desktop app**: Settings › Developer › Edit Config, add this inside `mcpServers`, then quit Claude fully (⌘Q) and reopen it.

```json
"blender": {
  "command": "uvx",
  "args": ["--python", "3.12", "--from", "git+https://github.com/MirHamzaHasan/draco-blender-mcp", "draco-blender-mcp"]
}
```

**Claude Code**:

```bash
claude mcp add blender -- uvx --python 3.12 --from git+https://github.com/MirHamzaHasan/draco-blender-mcp draco-blender-mcp
```

Cursor, VS Code and other clients take the same command and args in their MCP settings.

> [!TIP]
> `--python 3.12` makes uv use its own Python. Without it, a conda or Intel Python on an Apple Silicon Mac can fail while building `cryptography`.
> If Claude says it can't find `uvx`, run `which uvx` and put that full path in `"command"`.

### 4. Try it

Paste this into Claude:

```text
Clear the scene, add a low-poly crate under 500 tris with a wood PBR material,
run the check, export it to ~/Desktop/crate.fbx for Unity, and show me a 512px snapshot.
```

You should see one `search`, one `execute`, a short summary and the snapshot.
Stuck? The [install guide](docs/INSTALL.md) has a troubleshooting table.

## How it works

<p align="center"><img src="assets/flow.svg" alt="Your AI calls search, then sends one script with execute; Blender runs it and returns a one-line summary" width="100%"></p>

| Tool | What it does |
|---|---|
| `search(query)` | Finds `draco.*` helpers and short guides by keyword. Give it a bpy path like `bpy.ops.mesh.primitive_cube_add` or a type like `ShaderNodeTexImage` and it reads the live API from your Blender. |
| `execute(code)` | Runs Python in Blender with `bpy`, `mathutils`, `draco` and `state` (a dict kept between calls). Returns what the script prints or puts in `result`, up to 3,000 characters. Each call is one undo step, stops after 60 seconds, and errors name the failing line. |

## Helpers

Every script gets a `draco` module made for mobile game assets, with Unity as the first target:

| Module | What you get |
|---|---|
| `draco.scene` | `summary()`, `stats()`, `objects()`, `tris()`, `clear()`, `collection()`, `move_to()` |
| `draco.mesh` | `cleanup()`, `decimate(target_tris=)`, `lod()` with Unity `_LOD0` naming, `apply_transforms()`, `triangulate()`, `origin_to_bottom()` |
| `draco.mat` | `pbr()`, `assign()`, `image_texture()`, `count()` |
| `draco.check` | `report()` flags tri budget, missing UVs, n-gons, unapplied transforms and extra materials; `fix()` repairs what it safely can |
| `draco.export` | `unity_fbx()`, `each_unity_fbx()`, `glb(draco_compression=)` |
| `draco.snap` | `viewport(512)` attaches a screenshot, only when a script asks |
| `draco.assets` | Poly Haven (no key), Sketchfab and Poly Pizza (free keys): search and import |

```python
# one execute: a prop goes mobile-ready and lands in Unity
crate = draco.scene.objects("Crate*")[0]
draco.mesh.cleanup(crate)
draco.mesh.decimate(crate, target_tris=1500)
print(draco.mesh.lod(crate, ratios=(1, .5, .25)))
print(draco.check.report())
print(draco.export.unity_fbx("/path/to/UnityProject/Assets/Models/Crate.fbx"))
```

## Settings

| Setting | Default | Where to change it |
|---|---|---|
| Host and port | `localhost:9876` | Port in the Draco MCP tab; `--host`/`--port` or `BLENDER_HOST`/`BLENDER_PORT` for the server |
| Remote connections | Off | Add-on preferences. Only on a trusted network: scripts run without a password |
| Asset library keys | None | Draco MCP tab or add-on preferences |

## Privacy

No telemetry, no account, no paid tier. Nothing leaves your machine except the asset-library downloads your scripts ask for.

## Contributing

```bash
git clone https://github.com/MirHamzaHasan/draco-blender-mcp && cd draco-blender-mcp
uv venv -p 3.13 && uv pip install -e . pytest bpy requests
uv run pytest   # runs the helpers in real Blender and a full socket round trip
```

New helpers live in `src/draco_blender_mcp/addon/draco_blender/draco/`. `search` indexes the first line of each docstring, so keep it short and specific.

## Credits

Made by [Mir Hamza Hasan](https://github.com/MirHamzaHasan) at [DracoArts](https://dracoarts.com).
Forked from [MCP for Blender](https://github.com/ahujasid/blender-mcp) 2.3.4 by Siddharth Ahuja, its last MIT release; the addon's socket server and asset-library code started there.
MIT licensed, see [LICENSE](LICENSE).

TDQS

B3.2/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: `search` retrieves documentation/helpers/API details, while `execute` runs Python inside Blender. An agent can easily choose between discovery and execution with no overlap.

Naming Consistency4/5

Both names are concise imperative verbs in a consistent style. They omit a resource noun (e.g., `search_docs`, `execute_python`), which is a minor deviation from a strict verb_noun pattern but still readable and consistent.

Tool Count3/5

Two tools is thin for a Blender automation server, though it fits the minimal code-execution bridge model. The surface relies entirely on arbitrary Python execution rather than a broader set of purpose-built operations.

Completeness4/5

The pair covers a broad lifecycle: discover helpers/API details with `search`, then perform arbitrary Blender operations with `execute`. Minor gaps exist around structured scene/object operations, state inspection, and explicit undo/transaction management, but agents can work around these via Python.

Maintenance

ActivityActive
ResponsivenessNo recent community issues