BlenderBlender and AI

Blender MCP vs Python scripts: two ways AI drives Blender

AI can drive Blender with Python scripts or a direct MCP connection. How each works, a first exercise, and a safe working order.

AZTechnology12 min read

한국어English

The Scripting workspace: a Python script that builds a staircase from five cubes in the Text Editor in the middle, the result in the 3D Viewport at the top left, and the log of executed commands in the Info editor at the bottom left (Blender screenshot)

Based on: the official Blender Python API documentation and manual, and the official Model Context Protocol and Claude Code documentation, checked in September 2026.

There are two main ways to have AI do 3D work in Blender. One is for AI to write a Python script that Blender runs. The other is to connect AI and Blender directly through MCP. Both rest on the same base. Blender opens up what you can do with buttons so you can also do it with Python code, and AI writes that code or sends it on your behalf. This guide explains the difference between the two ways, the structure that the term "Blender MCP" refers to, a small first exercise, and habits for working with AI without breaking your 3D files.

There is one thing to know first. "Blender MCP" is not one program. It is a loose name for tools that connect Blender and AI through MCP. Since April 2026 there is an official MCP server made by Blender Lab at the Blender Foundation (for Blender 5.1 and later), and there are also community tools released earlier by various developers. Each tool has different features and installation steps. The steps for installing the official MCP server are in Installing the official Blender MCP. So this guide does not recommend a particular tool. It explains the principles and checks that apply to any of them. If MCP itself is new to you, start with What is MCP?.

The base: Blender driven by Python

In Blender, any setting you can change with a button can also be changed with Python. The Python API handles this. An API is a doorway through which programs call each other's features, and Python is a programming language with clear syntax.

Here is what you can do with Python.

  • Edit data such as scenes, meshes (the skeleton data of a 3D shape), and materials
  • Run Blender's tools with the settings you want
  • Create menus, panels, and new tools
  • Change preferences and shortcuts

Most areas, including animation, rendering, importing and exporting files, creating objects, and automating repetitive work, can be handled with scripts. As a comparison, Blender is a shop that, besides the remote-control buttons, has a back door that accepts "written order forms." AI is the assistant who writes those order forms for you.

There is also one useful setting. In Preferences (Edit ‣ Preferences), on the Interface tab, turn on Python Tooltips in the Display panel. When you hover over a button, the Python name for that button appears. This is handy when you ask AI to "change this setting," because you can give it the exact name.

The two ways at a glance

Way 1: scriptsWay 2: MCP connection
FlowAI writes code, and a person or the command line runs itAI calls a tool, and Blender runs it right away
ComparisonYou get a recipe and cook it yourselfThe order goes straight into the kitchen
What you needJust BlenderInstall a connection tool (an add-on and an MCP server, official or community-made)
StrengthsYou can read the code before running it, and the record stays as a fileGood for fixing things on the fly as you talk, and AI checks the scene state directly
Watch outA person goes through one more stepThe tool may have broad permissions
Official?An official Blender feature (the Python API)The connection protocol (MCP) is an open standard. There is an official connection tool from Blender Lab and there are community-made ones

The two ways suit different uses. If you repeat the same task many times or need to keep a record of the result, scripts are easier. In an exploring stage where you refine bit by bit while watching the screen, MCP is easier.

Way 1: asking with scripts

This is the simplest and most official way. Ask AI, "Write this as a Blender Python script," and run the code you get in Blender.

Three places to run it

Where to runHowGood for
Text EditorThe Scripting workspace tab at the top → paste the code → Run ScriptTrying it for the first time, seeing the result on screen right away
Python ConsoleType one line at a time, with autocompleteTesting short commands
Command lineblender --background --python script.pyRepetitive work without a screen, batch rendering

--background on the command line means running without opening a Blender window. A script that nobody needs to watch can be more efficient to run this way, without a screen. To give it a file to work on, write blender scene.blend --background --python script.py. Depending on your computer's setup, you may need to write the full path to the blender program.

First exercise: make one cube

Try asking AI this: "With Blender Python, make one cube of size 2 sitting on the floor, name it MyBox, and give it a red material. Explain each line with a comment." The code you get back looks roughly like this.

import bpy

# Add a cube 1 m above the origin
bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 1))
box = bpy.context.active_object
box.name = "MyBox"

# Create a new material and set its viewport display color to red
mat = bpy.data.materials.new(name="Red")
mat.diffuse_color = (1.0, 0.0, 0.0, 1.0)
box.data.materials.append(mat)

Know just two names and the code becomes readable.

  • bpy.data: the storeroom holding all the data in the file (objects, meshes, materials). New materials are also created in this storeroom.
  • bpy.context: the current situation, such as what is selected and what is active right now.

Click the Scripting workspace tab at the top of the screen, and in the Text Editor in the middle, click New to make an empty text. Paste the code and click Run Script (the ▶ button), and a cube appears. If the result is not what you expected, paste the error message from the screen to AI as is and ask it to fix the code.

With an agent such as Claude Code

An AI agent that works in the terminal can link this whole process in one go. As explained in Getting started with Claude Code, Claude Code can run terminal commands. So it can write a script file, run it directly with blender --background --python, and then check the output or the render. Even without MCP, you get an agent loop of "write, run, check."

Way 2: connecting directly with MCP

Tools called "Blender MCP" are usually made of two parts. The details differ by implementation, but the big picture is this.

  1. MCP server (the outer part): talks to the AI app using the MCP protocol. It tells AI the list of tools, such as "add object" and "get scene info."
  2. Blender add-on (the inner part): runs inside Blender, receives the commands the server sends, and actually executes them. An add-on is a script that adds features to Blender, and you turn it on and off in Preferences.

After a command runs, the result, scene information, or, depending on the tool, a screenshot goes back to AI. AI looks at it and decides the next step.

Compared to interpreting, the MCP server is the interpreter who turns AI's words into commands Blender understands, and the add-on is the side that receives those commands and runs them inside Blender. If the add-on is off, nothing gets through no matter how much the interpreter talks. That is why such tools usually work only with Blender open and the add-on's connection turned on.

On the AI app side, the connection is the same as for any other local MCP server. How to register one with a settings file or the claude mcp add command is in Connecting MCP servers. The official MCP site also gives "AI creating a 3D design in Blender and printing it on a 3D printer" as an example of what MCP can do.

What to check when choosing a connection tool

Whatever the tool, check these four things before installing.

What to checkWhy
Who makes and maintains it, and whether it has been updated recentlyAn abandoned tool may not work with new Blender versions
The tools (features) it gives AISome implementations give a broad tool that runs arbitrary Python code
Whether it fetches anything from the internetPulling in outside material raises risks such as prompt injection
Whether you have read the install command and the codeA local server is a program running on your computer

A local server from an untrusted source can lead to arbitrary code execution, data leaks, and data loss. Python does not limit what a script can do, so run only scripts from sources you know and trust.

Blender traits that save you some confusion

One thing at a time: Blender does not support Python threads. Threads are a way to run several jobs at the same time, and misusing them in Blender can cause crashes whose cause is hard to find. Blender is safe when it takes jobs in a single line and handles them in order. Rather than sending AI many commands at once, proceed one at a time and check each step.

Scripts inside files do not run automatically: auto-running scripts stored in a .blend file is off by default, and when a file tries to run one, a window asks whether to allow it. If someone else gave you the file, do not allow it without thinking.

A safe working order

Whether you use way 1 or way 2, these habits apply when you hand 3D work to AI.

  1. Start from a copy: leave the original .blend file alone and work on a copy. Even if the AI tool has an undo feature, changes inside Blender may be outside it.
  2. Ask small: instead of "Build a whole city," split the work into sizes you can check, such as "one floor plate" or "three building boxes." How to split requests well is in How to write good prompts.
  3. Check with your own eyes: look directly in the 3D Viewport (the 3D work area), and speak up right away if something is off. Even if AI says "done," the judgment is yours.
  4. Save versions: at each good step, save under a new name (File ‣ Save As…). If something goes wrong, go back one step.

Long tasks such as rendering can keep the computer busy while AI waits. For choosing a render engine, see Fast EEVEE, accurate Cycles.

Common misunderstandings

"Blender MCP is a feature built into Blender." No. Installing Blender does not give you an MCP connection. Whether you use the official Blender Lab add-on or a community tool, you install it separately, and all of them work on top of Blender's Python API.

"AI can only handle Blender if you attach MCP." No. Just running scripts written by AI in the Text Editor or on the command line lets you do a great deal.

"AI will finish a great scene on its own." AI is strong at turning instructions into code, but people have to decide what makes a scene good. The more you set the goal and the checks first and hand over the work in small steps, the steadier the results.

Summary

ItemSummary
How AI drives BlenderBlender's official Python API. Anything done with buttons can also be done with code
Way 1AI writes a script, run in the Text Editor or with blender --background --python
Way 2AI gives commands directly through a connection tool (MCP server + Blender add-on, official or community-made)
Official?The Python API is official. MCP connection tools come in an official Blender Lab version (since April 2026) and community versions
Watch outTrusted sources only, check tool permissions, work on copies, small steps, check by eye, save versions

References

KEEP EXPLORING

Read next