Skip to main content
Glama
Blender Bridge MCP

Blender Bridge MCP

by ItzAbra26
README.md
<div align="center">

# Blender Bridge MCP

**Let your AI assistant build 3D scenes live in Blender — with free CC0 assets from Poly Haven, ambientCG, Kenney and Quaternius.**

[![CI](https://github.com/ItzAbra26/blender-bridge-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/ItzAbra26/blender-bridge-mcp/actions/workflows/ci.yml)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)
![Python](https://img.shields.io/badge/python-3.11%2B-3776AB?logo=python&logoColor=white)
![Blender](https://img.shields.io/badge/Blender-4.2%2B-E87D0D?logo=blender&logoColor=white)
![MCP](https://img.shields.io/badge/MCP-server-8A2BE2)
![Claude Code](https://img.shields.io/badge/Claude%20Code-plugin-D97757)

<img src="docs/img/hero.jpg" alt="Low-poly campfire diorama with a tent, trees and walking farm animals, rendered in Blender" width="100%">

<sub>Built live by an AI assistant through Blender Bridge — 100% CC0 assets (Kenney, Quaternius, Poly Haven). Reproduce it with <a href="examples/campfire_diorama.py"><code>examples/campfire_diorama.py</code></a>.</sub>

</div>

---

You describe the scene. The assistant searches free asset libraries, **asks you before downloading anything**, imports what it needs into your open Blender, models the rest with Python, checks its work with viewport screenshots, and animates it. Every step is an undo step, and you watch it happen.

<table>
<tr>
<td width="55%"><img src="docs/img/live-build.gif" alt="The scene being built step by step in Blender, with the Bridge panel showing each request"></td>
<td width="45%"><img src="docs/img/diorama.gif" alt="Animated render: cow, horse, sheep, pig and a camper walking around the campfire"></td>
</tr>
<tr>
<td align="center"><sub><b>Live:</b> the Bridge panel logs every request the AI makes</sub></td>
<td align="center"><sub><b>Animated:</b> rigged characters from two different packs, one call each</sub></td>
</tr>
</table>

## Highlights

- **Live in your Blender** — objects appear while you watch; the panel shows the last code that ran; `Ctrl+Z` undoes any step.
- **Five asset sources, no account needed** — realistic HDRIs, PBR textures and models (Poly Haven, ambientCG), stylized low-poly packs and **animated characters and animals** (Kenney, Quaternius). Sketchfab is optional, with your own account.
- **Imports that just work** — one call turns an asset into a world light, a material or a placed model. Mixed packs are rescaled to real heights, FBX quirks are fixed automatically, short animations loop.
- **Safe by design** — local-only socket with a per-session token, no telemetry, explicit consent before every download, hardened archive extraction. See [SECURITY.md](SECURITY.md).
- **Works with any MCP client** — Claude Code (one-line plugin install with a workflow skill), Claude Desktop, Cursor, VS Code, and more.

## Quick start

**Requirements:** Blender 4.2+ · [uv](https://docs.astral.sh/uv/getting-started/installation/) (fast Python installer)

**1. Install the Blender add-on** (or grab the zip from [Releases](https://github.com/ItzAbra26/blender-bridge-mcp/releases) and use *Edit → Preferences → Get Extensions → ⌄ → Install from Disk*):

```bash
uvx --from git+https://github.com/ItzAbra26/blender-bridge-mcp blender-bridge install-addon
```

**2. Connect Blender:** in the 3D viewport press **N** → **Bridge** tab → **Connect**.

**3. Add the server to your AI app:**

<details open>
<summary><b>Claude Code</b> — plugin with the MCP server + a workflow skill</summary>

```
/plugin install blender-bridge --marketplace ItzAbra26/blender-bridge-mcp
```

Or from a terminal: `claude plugin marketplace add ItzAbra26/blender-bridge-mcp && claude plugin install blender-bridge@blender-bridge-mcp`
</details>

<details>
<summary><b>Claude Desktop</b></summary>

*Settings → Developer → Edit Config*, then restart Claude:

```json
{
  "mcpServers": {
    "blender-bridge": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/ItzAbra26/blender-bridge-mcp", "blender-bridge-mcp"]
    }
  }
}
```
</details>

<details>
<summary><b>Cursor, VS Code, Windsurf and other MCP clients</b></summary>

Use the same stdio command in your client's MCP settings:

```
uvx --from git+https://github.com/ItzAbra26/blender-bridge-mcp blender-bridge-mcp
```
</details>

**4. Ask for something:**

> *"Make a cozy low-poly campfire scene on a small island, with farm animals walking around the fire."*
>
> *"Put a realistic wooden table on a parquet floor under a sunset sky and render it in 1080×1350."*
>
> *"Replace the cube with a rusty metal barrel and light it like a product shot."*

## Tools

| Tool | What it does |
|---|---|
| `blender_status` | Is Blender connected? Which file, how many objects, where assets live |
| `get_scene_info` | Objects with transforms, materials, modifiers, animation flags |
| `execute_blender_code` | Run Python (bpy) on Blender's main thread — one undo step per call |
| `get_viewport_screenshot` | See the viewport (or a clean OpenGL render), downscaled to save tokens |
| `undo` | Same as `Ctrl+Z` |
| `list_asset_sources` | What each source offers and whether it needs an account |
| `search_assets` | Search a source — never downloads anything |
| `get_asset_info` | Exact files, total size, license and attribution — shown to you before downloading |
| `download_asset` | Refuses until you approved (`user_confirmed=true`); extracts only images and models |
| `list_downloaded_assets` | Reuse what is already in your library |
| `list_pack_models` | Browse inside a pack (e.g. 329 models in Kenney's Nature Kit) |
| `import_asset` | HDRI → world · texture → PBR material · model → placed, rescaled with `height` |
| `set_animation` | Play `walk`, `run`, `idle`… on an imported rig; loops short clips automatically |

## Asset sources

| Source | What | License | Account |
|---|---|---|---|
| [Poly Haven](https://polyhaven.com) | Realistic HDRIs, PBR textures, models | CC0 | No |
| [ambientCG](https://ambientcg.com) | PBR materials, HDRIs | CC0 | No |
| [Kenney](https://kenney.nl) | ~50 low-poly 3D packs: nature, city, furniture, vehicles, characters | CC0 | No |
| [Quaternius](https://quaternius.com) | ~56 low-poly packs incl. rigged + animated characters and animals | CC0 | No |
| [Sketchfab](https://sketchfab.com) *(optional)* | Huge library, per-model Creative Commons licenses | Varies — attribution shown | Your own (free) |

<details>
<summary>Notes on each source</summary>

- **Poly Haven** — Powered by Poly Haven. Only the maps a Principled BSDF needs are downloaded, MD5-checked.
- **Kenney & Quaternius** — their sites don't allow programmatic downloads (and we don't work around that), so packs come from the authors' **official uploads on [OpenGameArt.org](https://opengameart.org)**. Before each download the page is checked: the uploader must be the author and the license must be CC0. OpenGameArt's `Crawl-delay: 10` is respected and catalogs are cached for a week. Consider supporting them: [kenney.nl/donate](https://kenney.nl/donate) · [patreon.com/quaternius](https://www.patreon.com/quaternius).
- **Sketchfab** — Sketchfab requires each user to use their own account. Run `blender-bridge sketchfab-login` once (hidden input, stored only on your machine) to enable downloads. Searches default to licenses that allow commercial use, and every download comes with ready-to-paste attribution. *Models provided by Sketchfab.*
</details>

## How it works

```mermaid
flowchart LR
    U([You]) -- prompt --> A[AI assistant<br/>Claude · Cursor · …]
    A -- MCP / stdio --> S[blender-bridge-mcp<br/>Python server]
    S -- "search · info · download<br/>(only after your OK)" --> W[(Poly Haven · ambientCG<br/>Kenney · Quaternius · Sketchfab)]
    S --> L[(Local asset library<br/>~/BlenderBridge/assets)]
    S -- "JSON over 127.0.0.1<br/>+ per-session token" --> B[Blender add-on<br/>socket thread]
    B -- queue --> M[Blender main thread<br/>bpy · undo step · panel log]
    L -. files .-> M
```

- The **add-on** never touches the internet. A background thread only moves JSON over a localhost socket; a Blender timer executes requests on the main thread (the only place `bpy` is safe) and records one undo step each.
- The **MCP server** does all networking, consent checks and archive handling, then sends small, self-contained Python snippets (from [`bpy_assets.py`](src/blender_bridge_mcp/blender_side/bpy_assets.py)) into Blender.
- Lessons baked into the importer: packs use wildly different scales (a Kenney tree is ~1.5 units, a Quaternius cow ~5), FBX animations often key the armature's own transform, some FBX materials arrive with `Alpha = 0`, glTF rigs bring helper bone-shape meshes, and node names are translated in non-English Blender UIs — all handled.

## Command line

Everything the MCP server can do is also a command, handy for scripts and CI:

```bash
blender-bridge install-addon                # install / update the Blender add-on
blender-bridge status
blender-bridge search kenney nature
blender-bridge info kenney nature-kit       # files, size, license
blender-bridge download kenney nature-kit --yes
blender-bridge pack-models nature-kit tree
blender-bridge import nature-kit --model tree_oak --location 0 0 0 --height 2.5
blender-bridge screenshot shot.png --max-width 800
blender-bridge sketchfab-login              # optional
```

## Development

```bash
git clone https://github.com/ItzAbra26/blender-bridge-mcp && cd blender-bridge-mcp
python -m venv .venv && .venv/Scripts/activate        # macOS/Linux: source .venv/bin/activate
pip install -e ".[dev]"
ruff check . && pytest                                # unit + MCP-over-stdio + in-Blender tests
```

The test suite covers safe extraction (path traversal, blocked file types), every source with canned API responses, the MCP server end-to-end over stdio, and two scripts that run **inside a real Blender**: the bridge protocol (token checks, undo steps, error handling) and the importer (scale normalisation, animation looping, FBX fixes). CI runs them on Windows, macOS and Linux plus Blender 4.5 LTS. See [CONTRIBUTING.md](CONTRIBUTING.md).

## Roadmap

- [ ] Background render tool (Cycles/Eevee presets for social formats) without freezing the UI
- [ ] More CC0 sources (Smithsonian Open Access 3D, Poly Pizza with user key)
- [ ] Geometry Nodes helpers (scatter, arrays) as first-class tools
- [ ] Publish to PyPI and the Blender Extensions platform

## License & credits

Code: **GPL-3.0-or-later** (required for Blender add-ons) — see [LICENSE](LICENSE).

Assets are **not** included in this repository; each one keeps its own license (recorded in its `asset.json`). The showcase uses CC0 work by [Kenney](https://kenney.nl), [Quaternius](https://quaternius.com) and [Poly Haven](https://polyhaven.com). Not affiliated with the Blender Foundation, Anthropic, Poly Haven, ambientCG, Kenney, Quaternius or Sketchfab.

Made by **[ABSolutions](https://github.com/ItzAbra26)**.

TDQS

A3.6/5.0

Scored across 13 tools

Disambiguation4/5

Each tool has a fairly distinct role: the asset pipeline is cleanly split into discover (list_asset_sources/search_assets), inspect (get_asset_info), fetch (download_asset), and consume (import_asset). The few soft overlaps are get_scene_info vs blender_status (both report session state) and the three 'list' tools (sources, downloaded library, pack contents), which are distinguishable but require reading descriptions to be sure.

Naming Consistency4/5

Almost everything follows a predictable snake_case verb_noun pattern (search_assets, download_asset, get_scene_info, import_asset). Two deviations stand out: the bare verb 'undo' and the noun-first 'blender_status', which break the pattern but remain unambiguous.

Tool Count5/5

13 tools sits squarely in the well-scoped range, and each one maps to a distinct step of the Blender-automation or asset-acquisition workflow. Nothing feels redundant or padded given the breadth of the domain.

Completeness4/5

The asset lifecycle (source -> search -> info -> download -> list -> import) and core session control (status, scene info, screenshot, undo, code execution) are fully covered, and execute_blender_code acts as a universal escape hatch. Minor gaps remain: no redo, no save/export/render output, no way to stop or inspect an animation, and no asset cleanup/removal.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues