Skip to main content
Glama
Unified Blender MCP

Unified Blender MCP

by AdikaRafi

Unified Blender MCP menghubungkan Blender ke Gemini Web, ChatGPT, Claude, Cursor, Antigravity, dan n8n sehingga AI dapat membuat objek 3D, mengatur material, memeriksa kelayakan 3D printing (760 aturan desain FDM offline), mencari asset Poly Haven/Poly Pizza/Sketchfab, hingga mengekspor model (STL/GLB/OBJ/FBX) langsung di Blender.

Proyek ini menggabungkan kapabilitas ahujasid/mcp-for-blender dan seehiong/blender-mcp-bridge dalam satu addon (addon/addon.py), satu port Blender (9876), dan nol telemetry.


Quickstart Developer

Prasyarat: Python 3.10+, uv, Blender 3.x / 4.x, dan cloudflared (hanya untuk koneksi remote web seperti Gemini Web/ChatGPT).

# 1. Clone repo
git clone https://github.com/AdikaRafi/unified-blender-mcp.git
cd unified-blender-mcp

# 2. Verifikasi server tanpa membuka Blender
uv run --with "mcp>=1.26.0,<2" unified_mcp.py --self-test
# Output: UNIFIED_SELF_TEST_OK tools=15 safe_mode=True design_rules=OK

# 3. Install addon/addon.py di Blender -> tekan N -> tab MCP for Blender -> Start MCP Server (port 9876)

# 4. Jalankan Streamable HTTP + Cloudflare Quick Tunnel (Windows)
powershell -ExecutionPolicy Bypass -File start.ps1

Untuk client lokal (stdio) seperti Claude Desktop, Cursor, atau Antigravity, langsung lompat ke Koneksi Lokal (stdio).


Related MCP server: Blender-MCP

Panduan Pemula (Windows)

Ikuti langkah 1 sampai 4 secara berurutan. Tidak perlu paham coding dan tidak wajib memasang Git.

Langkah 1: Download Proyek

  • Cara termudah (tanpa Git): klik tombol hijau Code > Download ZIP, lalu ekstrak unified-blender-mcp-main.zip ke folder mana saja (misalnya D:\BlenderMCP\).

  • Atau via Git:

    git clone https://github.com/AdikaRafi/unified-blender-mcp.git

Langkah 2: Install uv dan cloudflared (Sekali Saja)

Buka PowerShell (Start > ketik PowerShell > Enter), lalu jalankan:

winget install --id astral-sh.uv -e
winget install --id Cloudflare.cloudflared -e
  • uv menjalankan server Python dan dependensi mcp otomatis.

  • cloudflared membuat URL HTTPS sementara gratis (tanpa akun) agar Gemini Web / ChatGPT bisa terhubung ke Blender lokal.

IMPORTANT

Setelah kedua instalasi selesai,tutup jendela PowerShell lalu buka jendela PowerShell baru agar perintah uv dan cloudflared terbaca oleh Windows.

winget install --id Ngrok.Ngrok -e
ngrok config add-authtoken <TOKEN_ANDA>

Langkah 3: Pasang Addon di Blender (Sekali Saja)

Addon sudah tersedia di addon/addon.py:

  1. Buka Blender > Edit > Preferences > Add-ons.

  2. Install addon:

    • Blender 4.2+: klik ikon panah kecil di pojok kanan atas panel Add-ons > Install from Disk...

    • Blender 3.x / 4.1: klik tombol Install... di kanan atas.

  3. Pilih file addon/addon.py dari folder proyek > klik Install Add-on.

  4. Centang Interface: MCP for Blender agar aktif.

  5. Di 3D Viewport, tekan N > buka tab MCP for Blender > pastikan port 9876 > klik Start MCP Server.

Langkah 4: Jalankan Bridge & Tunnel

  1. Buka folder proyek di File Explorer, klik address bar, ketik powershell, lalu tekan Enter.

  2. Jalankan:

    powershell -ExecutionPolicy Bypass -File start.ps1
  3. Tunggu hingga muncul link Cloudflare seperti:

    https://contoh-random-kata.trycloudflare.com
  4. Biarkan jendela PowerShell tetap terbuka selama memakai AI + Blender. Tekan Ctrl + C untuk berhenti.

TIP

Untuk link publik dengan path acak (/mcp-<hex>), jalankan powershell -ExecutionPolicy Bypass -File start.ps1 -SecretPath. Untuk ngrok, gunakan -Provider ngrok.


Koneksi AI Client

A. Gemini Web (gemini.google.com)

  1. Buka gemini.google.com > Setelan / Konektor > + Kustom (Server MCP).

  2. Masukkan URL tunnel dari Langkah 4 dan tambahkan /mcp di belakangnya (tanpa garis miring di akhir):

    https://contoh-random-kata.trycloudflare.com/mcp

    (Jika memakai -SecretPath, gunakan path /mcp-xxxxxxxx persis seperti yang tercetak di PowerShell.)

  3. Selesaikan koneksi, lalu uji dengan prompt pertama:

    "Cek isi scene Blender saya sekarang, lalu buat meja kayu sederhana dengan 4 kaki dan beri warna cokelat."

B. ChatGPT, n8n, atau Remote MCP Client Lain

Gunakan URL yang sama (https://<domain-tunnel>/mcp) dengan transport Streamable HTTP.

C. Antigravity, Claude Desktop, Claude Code, Cursor, atau Codex (Lokal stdio)

Aplikasi AI di komputer yang sama tidak membutuhkan tunnel. Tambahkan konfigurasi berikut ke file pengaturan MCP client (sesuaikan path folder Anda):

{
  "mcpServers": {
    "unified-blender": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp>=1.26.0,<2",
        "D:/BlenderMCP/unified-blender-mcp-main/unified_mcp.py",
        "--transport",
        "stdio"
      ]
    }
  }
}

Perbandingan Fitur

Kemampuan

mcp-for-blender

blender-mcp-bridge

Unified Blender MCP

Eksekusi bpy/bmesh (execute_blender_code)

Ya

Tidak

Ya (safe_mode ON default)

Structured modeling, material, 3D-print & export

Tidak

Ya

Ya (lewat port 9876)

760 FDM 3D-print design rules (offline lokal)

Tidak

Ya

Ya (data/design-rules.json)

Asset library (Poly Haven, Poly Pizza, Sketchfab)

Ya

Tidak

Ya

Streamable HTTP /mcp (Gemini Web, ChatGPT, n8n)

Tidak

Ya

Ya (siap tunnel, bebas 421)

Native stdio (Antigravity, Claude, Cursor)

Ya

Tidak

Ya

Session command recording (--record)

Tidak

Ya

Ya

Jumlah port Blender dibutuhkan

1 (9876)

1 (8888)

1 (9876)

Telemetry / Supabase

Opt-in

0

0


Arsitektur

Seluruh tool terstruktur (create_primitive, transform_object, add_modifier, assign_material, check_3d_print, export_model) berjalan deterministik melalui satu socket TCP addon Blender (127.0.0.1:9876) dengan proteksi thread lock dan timeout respons 180 detik, sehingga cukup satu addon dan satu port saja.


Daftar 15 Tools

Core, Visual & Asset Libraries (berbasis mcp-for-blender)

Tool

Fungsi

get_scene_info

Ringkasan scene Blender aktif (objek, lampu, kamera, material)

get_object_info

Detail transform, mesh, dan material satu objek

execute_blender_code

Eksekusi Python bpy/bmesh (dijaga AST allowlist safe_mode default)

get_viewport_screenshot

Ambil tangkapan viewport 3D untuk verifikasi visual

search_assets

Cari asset di polyhaven, polypizza, atau sketchfab

import_asset

Unduh & impor asset dari polyhaven, polypizza, atau sketchfab

send_blender_command_raw

Pass-through ke command addon lain di port 9876

Structured Modeling, 3D-Print & Knowledge Base (berbasis blender-mcp-bridge)

Tool

Fungsi

create_primitive

Buat mesh dasar (cube, sphere, cylinder, cone, torus, plane, monkey)

transform_object

Atur location, rotation (radian), dan scale secara presisi

add_modifier

Tambah modifier (SUBSURF, BEVEL, BOOLEAN, SOLIDIFY, ARRAY, MIRROR, dll.)

assign_material

Buat atau update material Principled BSDF dan pasang ke objek

check_3d_print

Cek manifold/watertight, non-manifold edges, volume, dimensi, dan overhang

export_model

Ekspor scene atau objek tertentu ke STL, OBJ, GLB, atau FBX

query_design_rules

Cari 760 aturan desain FDM 3D printing secara lokal (tanpa membuka Blender)

list_design_topics

Daftar topik dan jumlah aturan desain 3D printing


Opsi CLI & Launcher

unified_mcp.py

Flag

Default

Fungsi

--transport {http,stdio}

http

Mode transport MCP (http untuk remote/tunnel, stdio untuk desktop/IDE)

--port PORT

9878

Port HTTP lokal saat --transport http

--path PATH

/mcp

Endpoint path HTTP MCP

--secret-path

False

Gunakan path acak /mcp-<hex> untuk tunnel publik

--blender-host HOST

127.0.0.1

Host socket addon Blender

--blender-port PORT

9876

Port socket addon Blender

--unsafe

False

Matikan AST allowlist safe_mode.py (gunakan hanya di lingkungan lokal tepercaya)

--record FILE.json

none

Rekam urutan tool call sesi ke file JSON

--self-test

False

Jalankan verifikasi mandiri tanpa membuka Blender

start.ps1 (Windows)

Parameter

Default

Fungsi

-Provider

cloudflare

Pilih cloudflare, ngrok, atau local (HTTP lokal tanpa tunnel)

-Port

9878

Port HTTP lokal unified_mcp.py

-BlenderPort

9876

Port socket addon Blender

-SecretPath

$false

Aktifkan --secret-path

-Record

""

Path file JSON untuk merekam sesi


Keamanan, Privasi & Verifikasi

  • safe_mode aktif default: execute_blender_code melewati validator AST vendor/safe_mode.py yang memblokir os, sys, subprocess, socket, numpy, dan operator eksekusi skrip.

  • 0 Telemetry: Tidak mengirim prompt, UUID, screenshot, atau data scene ke server eksternal mana pun.

  • Verifikasi cepat (tanpa Blender):

    uv run --with "mcp>=1.26.0,<2" unified_mcp.py --self-test

    Output yang diharapkan:

    Loaded 760 design rules from .../data/design-rules.json
    UNIFIED_SELF_TEST_OK tools=15 safe_mode=True design_rules=OK

Troubleshooting

Masalah

Penyebab & Solusi

'git' is not recognized

Gunakan Download ZIP pada Langkah 1.

'uv' atau 'cloudflared' is not recognized

Tutup PowerShell lalu buka ulang setelah winget install. Jika masih gagal, restart Windows.

Unable to reach the origin service ... 127.0.0.1:9878

Pastikan tidak ada proses lain memakai port 9878 dan cek log error di atas baris tunnel.

AI menjawab Blender connection error (127.0.0.1:9876)

Blender belum terbuka atau addon belum aktif. Tekan N di Blender > tab MCP for Blender > Start MCP Server.

Gemini Web gagal konek ke URL

Pastikan URL diawali https:// dan diakhiri /mcp (bukan / dan bukan /mcp/), serta jendela start.ps1 masih berjalan.

Safe mode blocked: ...

Validator safe_mode memblokir modul terlarang (os, subprocess, dll.). Minta AI menulis ulang hanya dengan bpy/bmesh.


Struktur Repositori

unified-blender-mcp/
├── addon/
│   └── addon.py             # Addon Blender siap install (TCP port 9876)
├── unified_mcp.py           # Server MCP utama (stdio + Streamable HTTP /mcp, 15 tools)
├── start.ps1                # Launcher Windows + Cloudflare Tunnel / ngrok / local
├── pyproject.toml           # Metadata paket & dependensi (mcp>=1.26.0,<2)
├── vendor/
│   ├── safe_mode.py         # AST allowlist dari ahujasid/mcp-for-blender (GPLv3)
│   └── design_rules.py      # Engine query aturan 3D-print dari seehiong/blender-mcp-bridge (MIT)
├── data/
│   └── design-rules.json    # 760 aturan desain FDM 3D printing (offline)
├── assets/readme/
│   ├── hero.svg             # Header visual README (SVG)
│   └── architecture.svg     # Diagram arsitektur 1-port dual-transport (SVG)
├── LICENSE                  # GPL-3.0-or-later
└── THIRD_PARTY_NOTICES.md   # Atribusi lisensi kedua repositori referensi

Referensi & Lisensi

Dikembangkan dengan merujuk dan menggabungkan komponen open-source dari dua repositori berikut:

  1. ahujasid/mcp-for-blender (GPL-3.0-or-later): protokol socket TCP addon Blender (port 9876), addon/addon.py, eksekusi bpy, asset library, dan validator AST safe_mode.py.

  2. seehiong/blender-mcp-bridge (MIT): pola Streamable HTTP /mcp, structured modeling & 3D-print checks, session recording, serta design_rules.py dan data/design-rules.json.

Didistribusikan di bawah lisensi GNU General Public License v3.0 (GPL-3.0-or-later). Lihat LICENSE dan THIRD_PARTY_NOTICES.md.

Available Tools

15 tools
add_modifierC

Add a Blender modifier (SUBSURF, BEVEL, BOOLEAN, SOLIDIFY, ARRAY, MIRROR, etc.) with optional JSON params.

Inputs: object_name (required), modifier_type (required), name, params_json. Returns: result

assign_materialC

Create or update a Principled BSDF material and assign it to a Blender object.

Inputs: object_name (required), material_name (required), metallic, roughness, +1 more. Returns: result

check_3d_printC

Inspect mesh printability: manifold/watertight check, non-manifold edges, volume, dimensions, and overhangs.

Inputs: object_name (required), overhang_deg. Returns: result

create_primitiveC

Create a 3D mesh primitive: cube, sphere, cylinder, cone, torus, plane, or monkey.

Inputs: primitive_type (required), name, scale, location, +1 more. Returns: result

execute_blender_codeB

Execute Python (bpy/bmesh) code inside Blender (protected by safe_mode AST allowlist by default).

Inputs: code (required). Returns: result

export_modelC

Export scene or a single named object to STL, OBJ, GLB, or FBX.

Inputs: filepath (required), file_format, object_name. Returns: result

get_object_infoB

Get detailed transform, mesh, and material info for a named Blender object.

Inputs: object_name (required). Returns: result

get_scene_infoA

Get current Blender scene summary (objects, lights, camera, materials).

Inputs: no named parameters. Returns: result

get_viewport_screenshotB

Capture current Blender 3D viewport screenshot for visual verification.

Inputs: max_size. Returns: result

import_assetC

Download and import an asset from 'polyhaven', 'polypizza', or 'sketchfab' into Blender.

Inputs: source (required), asset_id (required), asset_type, resolution. Returns: result

list_design_topicsA

List all available 3D-printing design-rule topics and rule counts.

Inputs: no named parameters. Returns: result

query_design_rulesC

Query local FDM 3D-printing design rules (clearances, walls, overhangs, threads, snap-fits).

Inputs: unit, limit, query, topic, +1 more. Returns: result

search_assetsB

Search 3D assets/textures/HDRIs on 'polyhaven', 'polypizza', or 'sketchfab'.

Inputs: query (required), source (required), limit. Returns: result

send_blender_command_rawC

Send any raw command supported by the Blender MCP addon on port 9876.

Inputs: command_type (required), params_json. Returns: result

transform_objectC

Set exact location, rotation (radians), and/or scale on a named Blender object.

Inputs: object_name (required), scale, location, rotation. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools map cleanly to a distinct resource+action (create_primitive, transform_object, add_modifier, assign_material, export_model). The one real overlap is execute_blender_code versus send_blender_command_raw, which are both generic escape hatches for arbitrary operations and could easily be misselected. get_scene_info versus get_object_info are distinguishable by scope.

    Naming Consistency5/5

    Every tool follows a consistent snake_case verb_noun pattern (get_scene_info, create_primitive, add_modifier, query_design_rules). No camelCase or bare-noun outliers, and the domain prefixes (check_3d_print, list_design_topics) read naturally.

    Tool Count5/5

    Fifteen tools for a full 3D modeling/printing server is well-scoped and each tool covers a distinct capability. Nothing appears redundant or padding.

    Completeness3/5

    Strong coverage of creation, inspection, materials, assets, and export, but the object lifecycle stops short of deletion/removal and there is no rendering tool (only a viewport screenshot). Both gaps are partially workable via execute_blender_code, but that is a fallback rather than a first-class operation.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Connects Blender to AI through the Model Context Protocol to enable prompt-assisted 3D modeling and scene manipulation. It supports object creation, material control, and arbitrary Python code execution directly within the Blender environment.
      22
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Connects Blender 3D to AI assistants via the Model Context Protocol, enabling natural language driven 3D scene creation, manipulation, and rendering.
      15
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Connects an AI agent to Blender 5.2 LTS over stdio, letting it read the scene hierarchy, create and transform primitive meshes, assign Principled BSDF materials, delete objects, save .blend files, and run raw bpy scripts through 12 tools. A two-process socket bridge keeps bpy calls on Blender's main thread, so no pip packages or admin rights are needed inside Blender.
      MIT