Runoob Tutorial ArchiveEnglish

AI 3D (Blender)

AI 3D (Blender)

After the release of GPT-6 Astra, everyone started using AI for 3D:

Various applications are emerging, and current AI can truly model, adjust materials, and run code in 3D software, making it no different from a person actually operating the software at the computer.


What is Blender

Blender is a completely free and open-source 3D creation software; get to know it before discussing how to let AI take over it.

It covers the entire 3D production pipeline, including modeling, sculpting, rigging, animation, simulation, rendering, compositing, motion tracking, and video editing.

Blender is maintained by the Blender Foundation, is community-driven, and is primarily supported by donations, with thousands of contributors globally participating in its development.

Blender Open Source Project Introduction

It supports three major platforms: Windows, macOS, and Linux, and is officially supported by hardware manufacturers such as AMD, Apple, Intel, NVIDIA, and Qualcomm.

Download address:https://www.blender.org/download/

Blender Official Website Download Page


What is Blender MCP

blender-mcp is an open-source project responsible for passing commands between the AI client and Blender.

Its GitHub homepage introduces itself as: Control Blender 3D with any LLM you choose, and it currently has 27.9k Stars.

blender-mcp GitHub Repository 27.9k Star

  • Project address:https://github.com/ahujasid/blender-mcp

  • Official website:https://mcp-for-blender.com/

  • Working principle

    The entire chain is divided into four parts: you state the requirement, the client plans the steps, the blender-mcp service forwards the instructions, and the plugin inside Blender actually executes them.

    Blender MCP Architecture and Data Flow Diagram

    After executing each step, the plugin returns the viewport screenshot and scene status to the AI.

    The AI decides the next action after seeing the rendering result, and this loop continues until it believes the scene meets your requirements.

    Can it work without MCP?

    Yes, but the experience is much worse.

    Agents with computer control capabilities, such as Codex, can directly view the Blender interface and move the mouse to click menus:

    Codex directly controls the Blender interface via the computer

    A comparison of the two methods is as follows:

    Connection method Principle Advantages Applicable scenarios
    Blender MCP Directly calling Blender API through a plugin interface Fast, stable, and capable of precise parameter passing Daily modeling, batch operations, and automated image generation
    Computer control Agent Simulates mouse and keyboard after recognizing screen pixels Usable without installing plugins Interface functions that require temporary operations or cannot be covered by plugins

    When precise and repeatable operations are needed, MCP is a clearly better choice.


    Preparation

    Before starting, confirm three things: Blender is installed, the Python version meets the requirements, and you have an MCP client.

    Software Version requirements Mandatory installation Description
    Blender 3.0 or higher Mandatory 3D software core, download from the official website
    Python 3.10 or higher Required installation Used to run MCP service, can be installed on macOS using brew
    uv The latest version is sufficient Required installation Python package manager used to start blender-mcp
    MCP client Any one Choose one Supports Claude Code, Codex, Claude Desktop, Cursor, etc.

    Just install one MCP client; the commands below use Claude Code and Codex as examples, and the configuration method for other clients is similar.


    Quick Start: Four steps to connect to Blender

    The entire installation process has only four steps: install uv, configure the client, install the Blender plugin, and click connect.

    Step 1: Install uv

    uv is the tool to start the blender-mcp service, and the installation commands for the three platforms are as follows:

    Instance

    macOS (requires Homebrew to be installed first)

    brew

    install

    uv

    Linux, install using the official script

    curl

    -LsSf

    https:

    //

    astral.sh

    /

    uv

    /

    install.sh

    |

    sh

    Windows, execute in PowerShell

    powershell

    -ExecutionPolicy

    ByPass

    -c

    "irm https://astral.sh/uv/install.ps1 | iex"

    After installation, verify it; if it outputs the version number, it was successful:

    
    
    $ uvx --version
    
    uvx 0.9.5
    
    

    You must use the official method above, do not usepip install uvThe pip method might not install the uvx command, and the client will not find it later.

    Step two: Add the MCP service to the client

    Tell your AI client: there is an MCP service called blender, and the startup method is uvx blender-mcp.

    Claude Code users execute in the terminal:

    Instance

    Register the blender service into Claude Code, -- is the startup command

    claude mcp add blender

    --

    uvx blender-mcp

    Command executed by Codex user:

    Instance

    Codex registration command, same format

    codex mcp add blender

    --

    uvx blender-mcp

    Claude Desktop users edit the configuration file. The file path on macOS is ~/Library/Application Support/Claude/claude_desktop_config.json:

    Instance

    {

      "mcpServers": {

        "blender": {

    "command": "uvx",

    "args": ["blender-mcp"]

    }

    }

    }

    After registration, check with claude mcp list; if the status is connected, it means the service started normally:

    
    
    $ claude mcp list
    
    blender: uvx blender-mcp - Connected
    
    

    Step 3: Install Blender plugin

    Blender side requires a plugin to receive commands, which can be automatically installed with one command:

    Instance

    Download and install the Blender plugin once

    uvx blender-mcp install-addon

    Then open Blender and go to Edit → Preferences:

    Preferences in the Blender Edit menu

    Search for and check "MCP for Blender" on the "Add-ons" page:

    Enable MCP for Blender in the plugin list

    The client connects to this plugin, not the Blender application itself, so the plugin must be enabled first.

    Step four: Connect

    Return to the Blender 3D View, press N to open the right sidebar, and find the "MCP for Blender" tab:

    Open the MCP for Blender tab in the sidebar by pressing the N key

    When the status changes to connected after clicking "Connect to MCP Server," everything is connected:

    Click Connect to MCP Server to complete the connection

    Now you can directly tell the AI what you want to do.


    Practical application: A one-stop guard for a pot of gold

    This is the example prompt provided by the official documentation and the fastest way to check if the installation was successful.

    Original prompt (Chinese, left untranslated)

    
    
    在地牢里做一个低多边形场景,一条龙守着一罐金币
    
    

    After receiving the prompt, Claude Code first checks the scene status and then lists an execution plan to build step-by-step:

    Claude Code's execution plan for building a dungeon dragon scene via Blender MCP

    Codex's execution process is similar, also a loop of planning, execution, and screenshot verification:

    Codex testing the same prompt via Blender MCP

    After a few minutes, the AI will deliver the project files and render images; the completed effect is shown below:

    Engineering files and render images of the dungeon dragon scene delivered by AI

    Zoom in on the final render: the stone brick dungeon, torches, low-poly dragon, and pot of gold are all present:

    Final render image of the low-poly dungeon dragon guarding coins scene

    You only said one sentence throughout the entire process; the rest of the planning, modeling, lighting, and verification are all done by the AI.

    The AI executes real Python code and will directly modify the currently open .blend file; it is recommended to save a copy before experimenting.


    Common commands and techniques

    After connecting, these prompts can be copied and used directly.

    Goal Example prompts Description
    Build a scene from scratch Create a low-poly scene in a dungeon with a dragon guarding a pot of gold Just describe the scene in one sentence, and the AI will plan it itself
    Understand the current state of the scene See what objects are currently in the scene Use this first when taking over someone else's project files
    Add real assets Add a medieval-style wooden chair to the scene You need to enable the PolyHaven asset library in the plugin panel first
    Adjust material Change the floor to a wet stone tile texture PolyHaven provides free PBR textures
    Render the image Adjust the camera angle to clearly see the dragon's front and render a sample image Let the AI take screenshots and check before delivery

    In practice, there are three techniques that can significantly increase the success rate.

    First, only set one goal at a time; completing one dragon before adding a dungeon is easier to succeed than doing everything at once.

    Second, it requires step-by-step self-checking screenshots, allowing the AI to see the viewport screenshot at each step to promptly detect issues like collapse or clipping.

    Third, for complex scenarios, planning is necessary; it should first list the setup steps and only proceed after confirmation.


    Common Issues

    Categorize by error symptoms to easily pinpoint the problem when it occurs.

    The client cannot connect, showing "Connection refused".

    In the vast majority of cases, it is an order issue—Blender is not open or the plugin is not connected.

    The correct sequence is: first open Blender, then click Connect to MCP Server in the plugin panel, and finally send commands from the client.

    If that doesn't work, check if port 9876 is being used by another program, as the plugin defaults to listening on this port.

    Prompt cannot find uvx command

    It is likely that uv was installed using pip, and this installation method does not include uvx.

    Reinstall using the official script or brew, and then restart the terminal to apply the PATH.

    Blender service is not visible in the client

    First run claude mcp list to confirm the registration status.

    Claude Desktop users should pay close attention to whether the JSON syntax in the configuration file is correct; after modifying the configuration, restart the client.

    If you only want to enable it in a specific project, note that the command defaults to writing to the current project scope; use the --scope user parameter for global use.

    What to do if AI messes up the scene

    First, use Ctrl + Z to undo in Blender; most operations can be reverted.

    A more reliable approach is to have the AI state what it is going to do before each step, provide a screenshot for confirmation after execution, and immediately stop if it is incorrect.

    Saving a copy before working on an important project is the lowest-cost insurance.