Skip to main content
Glama
xiaohai-uid

Blender-Mind-MCP

by xiaohai-uid

Blender-Mind-MCP (Production AI 3D Modeling & Blender Bridge)

A production-grade Model Context Protocol (MCP) server and Blender Addon ecosystem for automated 3D modeling, procedural asset generation, shader authoring, and multimodal viewport inspection.


πŸ—οΈ Prior Art & Architectural Inspiration

This project incorporates architectural lessons and benchmarks from leading GitHub Blender AI projects (such as ahujasid/blender-mcp and djeada/blender-mcp-server):

  1. Thread-Safe Main-Thread Dispatching: Blender’s Python C-API (bpy) is not thread-safe. As discovered in community issue audits, executing bpy calls inside raw socket listener threads triggers memory corruptions and segmentation faults. Our Blender Addon uses a thread-safe queue.Queue coupled with bpy.app.timers to ensure all scene modifications execute strictly in Blender’s main render/GUI loop.

  2. Undo Step Isolation: Every AI code execution is bracketed with bpy.ops.ed.undo_push(), enabling seamless Ctrl+Z rollbacks inside Blender.

  3. Multimodal Viewport Capture: Uses offscreen OpenGL rendering (bpy.ops.render.opengl) to return Base64-encoded PNG screenshots of the 3D viewport directly to multimodal vision models.

  4. Hexagonal Architecture (Ports & Adapters): Decouples pure 3D geometry generation from physical drivers, supporting both Live Socket connections (127.0.0.1:9876), headless CLI batching (blender -b), and offline procedural glTF binary simulation.


Related MCP server: Blender MCP Server

πŸ“¦ Project Structure

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

πŸš€ Quick Start

1. Install Addon in Blender

  1. Open Blender (3.6+ or 4.x).

  2. Go to Edit > Preferences > Add-ons > Install... (or the Install from Disk arrow in 4.2+).

  3. Select addon/blender_mcp_addon.py.

  4. Enable Development: Blender MCP Bridge.

  5. In the 3D Viewport, press N to open the sidebar, click the Blender MCP tab, and click Start MCP Server.

2. Configure MCP Client (Antigravity / Claude / Codex)

Add to your project or global MCP configuration (.mcp.json):

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

πŸ› οΈ 10 Core MCP Tools

Tool Name

Description

Key Capabilities

blender_create_primitive

Create procedural 3D mesh

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

blender_apply_modifier

Attach procedural modifiers

subsurf, bevel, boolean, mirror, array, solidify

blender_procedural_material

PBR Principled BSDF shader

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

blender_setup_lighting

Position & tune light sources

SUN, POINT, SPOT, AREA (wattage, radius, color tint)

blender_setup_camera

Camera framing & lens

location, look_at tracking, focal_length in mm

blender_capture_viewport

Visual viewport snapshot

Returns Base64 PNG image directly to multimodal LLMs

blender_export_asset

3D model baking & export

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

blender_inspect_scene

Topology & scene tree inspection

Hierarchical object list, polycount, vertex count, modifiers

blender_execute_bpy

Raw parameter Python execution

Sandboxed execution with stdout/stderr capture

blender_health

System diagnostics

Reports active driver, port status, and Blender build


πŸ§ͺ Truth Ladder Verification

npm test

Executes all 6 test suites across the 4-level Truth Ladder:

  • L1 Unit: 100% pure domain modeling & Python code synthesizer AST checks.

  • L2 Contract: Schema definitions and dispatch verification for all 10 tools.

  • L3 Integration: Binary glTF v2 Header (0x46546C67) & OBJ structure validation.

  • L3 Integration: Live TCP Socket Client-Server loopback test on 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