Skip to main content
Glama
xiaohai-uid

Blender-Mind-MCP

by xiaohai-uid

Blender-Mind-MCP (Produktions-AI-3D-Modellierung & Blender-Bridge)

Ein produktionsreifer Model Context Protocol (MCP)-Server und Blender-Addon-Ökosystem für automatisiertes 3D-Modelling, prozedurale Asset-Generierung, Shader-Erstellung und multimodale Viewport-Inspektion.


🏗️ Vorarbeiten & Architektonische Inspiration

Dieses Projekt übernimmt architektonische Lehren und Benchmarks von führenden GitHub-Blender-AI-Projekten (wie ahujasid/blender-mcp und djeada/blender-mcp-server):

  1. Thread-sicheres Main-Thread-Dispatching: Blenders Python-C-API (bpy) ist nicht threadsicher. Wie in Community-Issue-Audits festgestellt wurde, führt die Ausführung von bpy-Aufrufen in rohen Socket-Listener-Threads zu Speicherkorruptionen und Segmentierungsfehlern. Unser Blender-Addon verwendet eine threadsichere queue.Queue in Verbindung mit bpy.app.timers, um sicherzustellen, dass alle Szenenmodifikationen ausschließlich in Blenders Haupt-Render-/GUI-Loop ausgeführt werden.

  2. Undo-Schritt-Isolation: Jede AI-Codeausführung wird mit bpy.ops.ed.undo_push() eingeklammert, was nahtlose Ctrl+Z-Rollbacks in Blender ermöglicht.

  3. Multimodale Viewport-Erfassung: Verwendet Offscreen-OpenGL-Rendering (bpy.ops.render.opengl), um Base64-kodierte PNG-Screenshots des 3D-Viewports direkt an multimodale Vision-Modelle zurückzugeben.

  4. Hexagonale Architektur (Ports & Adapters): Entkoppelt die reine 3D-Geometrieerzeugung von physischen Treibern und unterstützt sowohl Live-Socket-Verbindungen (127.0.0.1:9876), Headless-CLI-Batching (blender -b) als auch Offline-prozedurale glTF-Binärsimulation.


Related MCP server: Blender MCP Server

📦 Projektstruktur

blender-mind-mcp/
├── addon/
│   └── blender_mcp_addon.py       # Full Blender 3.x/4.x Addon (UI Sidebar Panel, Socket Server, Viewport Capture)
├── src/
│   ├── index.ts                   # stdio JSON-RPC MCP Server entry point
│   ├── bridge/
│   │   └── socket_client.ts       # Robust TCP Socket Client with reconnect & timeout handling
│   ├── core/
│   │   └── domain/
│   │       ├── types.ts           # 3D Domain Types (Scene, Mesh, Material, Modifier, Transform)
│   │       ├── scene.ts           # Pure in-memory 3D scene graph & polygon math
│   │       └── bpy_generator.ts   # Modern Blender 4.x/3.x Python code synthesizer
│   ├── ports/
│   │   └── driver.port.ts         # BlenderDriverPort interface specification
│   ├── adapters/
│   │   ├── live_socket.adapter.ts # Live Socket Adapter (talks to active Blender GUI)
│   │   ├── blender_cli.adapter.ts # Headless CLI Adapter (talks to blender.exe)
│   │   └── mock_geometry.adapter.ts # Offline Simulation Adapter (glTF & OBJ binary synthesis)
│   └── tools/
│       └── index.ts               # 10 MCP Tools registry & dispatcher
├── tests/
│   ├── unit/                      # L1: Domain math & Python code generation
│   ├── contract/                  # L2: MCP tool schemas & argument contracts
│   ├── integration/               # L3: Binary glTF headers & TCP Socket Bridge
│   └── run_tests.ts               # Complete Truth Ladder test runner
├── package.json
└── tsconfig.json

🚀 Schnellstart

1. Addon in Blender installieren

  1. Öffnen Sie Blender (3.6+ oder 4.x).

  2. Gehen Sie zu Edit > Preferences > Add-ons > Install... (oder dem Install-from-Disk-Pfeil in 4.2+).

  3. Wählen Sie addon/blender_mcp_addon.py.

  4. Aktivieren Sie Development: Blender MCP Bridge.

  5. Drücken Sie im 3D-Viewport N, um die Seitenleiste zu öffnen, klicken Sie auf den Tab Blender MCP und klicken Sie auf Start MCP Server.

2. MCP-Client konfigurieren (Antigravity / Claude / Codex)

Fügen Sie zu Ihrer Projekt- oder globalen MCP-Konfiguration hinzu (.mcp.json):

{
  "mcpServers": {
    "blender": {
      "command": "node",
      "args": [
        "--disable-warning=ExperimentalWarning",
        "--experimental-strip-types",
        "C:/Users/a1691/Documents/antigravity/noble-hypatia/src/index.ts"
      ]
    }
  }
}

🛠️ 10 Kern-MCP-Tools

Tool-Name

Beschreibung

Hauptfunktionen

blender_create_primitive

Erstellt prozedurales 3D-Mesh

cube, sphere, cylinder, torus, plane, cone, monkey

blender_apply_modifier

Hängt prozedurale Modifier an

subsurf, bevel, boolean, mirror, array, solidify

blender_procedural_material

PBR Principled BSDF Shader

base_color, metallic, roughness, transmission (Glas), emission

blender_setup_lighting

Lichtquellen positionieren & abstimmen

SUN, POINT, SPOT, AREA (Wattzahl, Radius, Farbtönung)

blender_setup_camera

Kamera-Framing & Objektiv

location, look_at-Tracking, focal_length in mm

blender_capture_viewport

Visueller Viewport-Snapshot

Gibt Base64-PNG-Bild direkt an multimodale LLMs zurück

blender_export_asset

3D-Modell-Baking & Export

.glb, .gltf, .obj, .stl, .fbx

blender_inspect_scene

Topologie- & Szenenbaum-Inspektion

Hierarchische Objektliste, Polycount, Vertexanzahl, Modifier

blender_execute_bpy

Rohe Python-Parameterausführung

Sandbox-Ausführung mit stdout/stderr-Erfassung

blender_health

Systemdiagnose

Meldet aktiven Treiber, Portstatus und Blender-Build


🧪 Truth-Ladder-Verifikation

npm test

Führt alle 6 Test-Suiten über die 4-stufige Truth Ladder aus:

  • L1 Unit: 100 % reines Domain-Modeling & Python-Code-Synthesizer-AST-Prüfungen.

  • L2 Contract: Schema-Definitionen und Dispatch-Verifikation für alle 10 Tools.

  • L3 Integration: Binärer glTF-v2-Header (0x46546C67) & OBJ-Strukturvalidierung.

  • L3 Integration: Live-TCP-Socket-Client-Server-Loopback-Test auf 127.0.0.1:9899.

  • L4 E2E: Live-stdio-JSON-RPC-Pipe-Roundtrip.

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…

  • AI visual generation agent: multi-pipeline rendering, prompt crafting, and image composition.

  • Build and run visual creative-production workflows from your AI agent.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaohai-uid/blender-mind-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server