DEV Community

Cover image for Controlling Blender with AI — Building an MCP Server for 3D Creation
NISHANT UNAVANE
NISHANT UNAVANE

Posted on

Controlling Blender with AI — Building an MCP Server for 3D Creation

Blender's Python API is powerful but has a steep learning curve. What if you could describe a 3D model in plain language and have an AI build it inside Blender automatically?

That is what Blender MCP does. It is an MCP server that connects AI assistants like Claude and GitHub Copilot to Blender in real-time.

The architecture is simple. The MCP server runs as a Node.js process and spawns Blender as a background subprocess. When you tell the AI to "create an Indian temple with red marble material," the server generates a Python script using Blender's bpy API and executes it in the background Blender instance.

The server includes procedural generation templates for Indian-themed models — temples with detailed pillars and shikharas, auto-rickshaws with functional wheels, traditional thalis with rice and multiple curries, and human figures in traditional attire. Each template is a parameterized Python script that generates geometry procedurally.

Managing the Blender subprocess was the hardest part. Blender takes seconds to start, and long operations can timeout. I built a connection pool that keeps Blender running in the background and automatically reconnects if it crashes.

Material generation uses Blender's node system instead of texture files. Wood grain, marble in multiple colors, metals like gold and copper — each material is a node tree created programmatically.

If you want to see the full source code or read about my other projects, visit my portfolio at nishantunavane.qzz.io.

Check out the Project
View Source Code on GitHub

Have you tried using AI for 3D modeling? What kind of scenes would you generate? Let me know in the comments!

Top comments (0)