An agent in Blender: MCP and Python scripts
Blender is free, open source and does everything: modeling, materials, lighting, rendering, animation. The problem is it takes years to learn. Now an agent can stand between you and Blender: you say “a box 120 by 60 by 18 millimeters with a 3 millimeter fillet, matte aluminum,” and it does it. The magic holds right up to the first object where precision matters, and from there it becomes work: a blueprint, measurements, small steps, check renders. This topic covers both ways to connect an agent to Blender and the discipline without which the result comes out expensive and “roughly similar.” Everything below was tested on three of my projects from fall 2026: a TP-7 recorder via MCP, an Emirati house with a wind tower built with scripts, and a 3D icon from an SVG packaged as a skill.
Why an agent can drive Blender at all
Everything you do with the mouse in Blender is available from Python through the bpy module: create a cube, move a vertex, assign a material, place a camera, render. Blender’s interface is itself built on these calls. So the agent doesn’t need to “see” the buttons: it writes code, and Blender runs it. That gives two ways to connect.
| MCP: live connection | Python scripts: as a file | |
|---|---|---|
| How it works | an add-on in Blender opens a socket; the MCP server passes on the agent’s commands and returns the result and viewport images | the agent writes a .py, and you run it in the Scripting tab or from the terminal: blender --background --python build.py |
| What the agent sees | the scene, objects, renders as it goes (look, get_scene_info) |
only what the script saved itself: renders and logs |
| Strength | dialogue: “move the button 2 mm to the left” happens in seconds | reproducibility: the script rebuilds the scene from scratch, lives in git, runs without an interface and on a server |
| Weakness | the state lives in the session: close Blender and the edit history is gone | slower iteration, no live image for the agent without extra renders |
| When to use | exploration, concepts, lighting and camera, in-place tweaks | final build of an object from a blueprint, batch renders, anything that will be repeated |
The best mode is both at once. You explore and tweak through MCP, and the agent carries every approved decision over into a build.py script. Then a week later the object rebuilds with one command instead of from memories of a chat. That’s how my icon project is set up: iconlib.py builds the scenes, and the README says it plainly: “a rebuild overwrites scenes and materials, so move good values from manual tweaks into iconlib.py.”

Path 1: Blender MCP
You’ll need Blender from blender.org (version 3.0 or later), Python and the uv package manager. The best-known MCP is the open source project ahujasid/blender-mcp. Setup in three steps:
- Download the
addon.pyfile from the repository and install it in Blender: Edit → Preferences → Add-ons → Install. A BlenderMCP tab with a Connect button appears in the 3D view’s sidebar. - Connect the MCP server to the agent. For Claude Code it’s one terminal command:
claude mcp add blender -- uvx blender-mcp. For Claude Desktop, Cursor and others it’s a line in the config, as in the README. - Press Connect in Blender, start the agent and ask it to show you the scene.

What this MCP can do besides running code: look at the viewport and the render from several angles, find and place HDRIs, textures and models from Poly Haven (no key needed), pull models from Sketchfab, and generate meshes through Rodin, Meshy, Tripo or Hunyuan3D right into the scene. That ties the “3D model generation” topic to this one: generate, place, light and render in one conversation.

Two limitations from practice. Complex requests time out, so ask for small steps. Only one MCP instance should run at a time, or the commands get tangled. And one detail I didn’t get right away: the add-on listens on a plain socket on port 9876 with a simple JSON protocol. That means you can connect to it without the MCP server, with a tiny script. Mine is bmcp.py, 60 lines: python3 bmcp.py exec build.py runs a file inside the live Blender and prints its output, and bmcp.py shot out.png captures the viewport. An agent with a terminal uses it just like the MCP tools, and a script like that is easier to debug.
There’s also an official experimental MCP from Blender Lab. It requires Blender 5.1 or later and is built for analysis: finding heavy objects, renaming data, explaining how materials and Geometry Nodes are set up. It isn’t meant for building objects. Blender itself has said it doesn’t plan to build generative AI into the editor. So everything described here lives outside Blender, in add-ons and agents.
Path 2: Python scripts
Without MCP, an ordinary agent with a terminal works too (the “CLI and terminal AI agents” topic). It writes a bpy script, and you run it. Two ways: open the Scripting tab in Blender, paste it in and press Run, or from the terminal without an interface:
blender --background --python build.py -- --step 3 --out renders/step3.png
The agent can run this command itself, read the logs and look at the saved renders. You get the same “do, look, fix” loop as in the “A motion video in code” topic, just without a live window. The pros: the script lives in the repository, rebuilds the scene from scratch deterministically, runs batches (ten product colors, twenty angles) and works on a server with no monitor. The cons: every iteration is a full recompute, and the agent has to render an image itself to see the result.
A script structure worth asking for from the start: dimensions and materials pulled out into a separate module at the top, the build split into functions per part, and each step with its own --step flag and its own check render. That’s exactly how my house is built: build_house.py takes --step 1…6, and next to it sit plan_data.py with the measurements, blockout.py, details.py, courtyard.py, materials.py. Then a change like “parapet 40 centimeters higher” is one number, not a new conversation.
One lesson about mixing the paths. You can rebuild a scene with a script through MCP under an open Blender window, but not while the viewport is in Rendered mode: the rebuild deletes and recreates scenes and materials right under the render, and on October 1, 2026 that crashed my Blender along with unsaved edits. The safe way is blender --background in a separate process, while the window is closed or a different file is open.
Security: the agent runs arbitrary code
Both MCP and scripts run any Python the model wrote on your computer. The MCP socket has no authentication, safe mode is off by default, and the official MCP warns outright that there’s no protection and recommends a virtual machine. Minimum hygiene: save the file before every run, keep the connection on localhost, don’t open other people’s files or prompts from sketchy sites in the same session (the prompt injection from the “CLI and terminal AI agents” topic works here too), and for serious work set up a separate user or a VM.
A blueprint brief before the first command
My first go at Blender MCP was the TP-7 recorder from Teenage Engineering: the website has beautiful renders from every angle, so all that’s left is to copy it. A request along the lines of “make it good, don’t make it bad” produced, as tradition demands, a dreadful mess. After that I led the agent step by step, like a skilled but careless specialist, hit a ceiling, and explained how to fix every millimeter of the little box. The magic was gone: this was no wave of a wand.
I took the cure from the same project: right at the start, require the agent to identify and document every part and material, measure proportions and distances on the references, and check against that document regularly. Try drawing a birch tree by eye on your first day of plein-air painting, and you’ll see why a model without dimensions can’t cope. The blueprint brief from the “3D with AI” topic is exactly this document. I started the second project, the house, with it. Here’s its skeleton: it’s a working prompt, take it and plug in your own object.
Task: build a detailed 3D model of [object] in Blender via blender-mcp based on the attached references.
References (use each one in exactly this role):
- plan_A_1.jpg, plan_A_2.jpg — plan, top view, the PRIMARY source of geometry in plan
- plan_alt.jpg — an alternative plan. DO NOT mix it with the primary one. If you take anything from it, say so explicitly
- facade_1.jpg … facade_3.jpg — facades: what goes where, which openings
- iso_1.jpg … iso_3.jpg — overall views only for checking massing and materials, NOT a source of dimensions
Elements to model: [numbered list of parts with placement and material; mark the key style details “don’t forget”]
Scale: use [a known dimension: door height ≈ 2.05–2.1 m] as the anchor and derive everything else from it. State the resulting overall dimensions in your report.
Order of work, step by step, with a render after each step, do not move on without confirmation:
1. Reference planes in the scene: the plan under the model, facades in their projections, scale from the anchor
2. Blocking with primitives, checking the silhouette against the facades and the plan
3. Detailing
4. Surroundings and decor
5. Materials
6. Export
Units are meters, Z up, origin at [corner of the object]. If the references contradict each other and this can’t be resolved, don’t make things up: report it and suggest which one to follow.
Three things in this brief do all the work. Each reference has its own role, and the agent is forbidden to mix sources. The scale is anchored to one known dimension, and everything else is derived from it. And the direct rule “don’t make things up, report it”: without it, the model will silently pick an option and draw something convincing that it invented.
Put the brief in docs/blueprint.md, the references in refs/, and the “check against the blueprint after every step” rules in CLAUDE.md (the “Terminal agents: making them yours” topic):
## Project: model of [object] in Blender
- Source of truth: docs/blueprint.md and refs/. If you diverge from them, stop and ask
- Units: millimeters. Object center at the origin, bottom at zero
- One step per message: references → blockout → details → materials → lighting → camera → render
- After each step: a 4-angle contact sheet (front, side, three-quarter, top) in reviews/, next to the same angles from refs/
- Carry every approved decision over into build.py
- Assets: HDRIs and textures only from Poly Haven, Sketchfab models only with a CC license
- Save the .blend before running any code
Measure, don’t eyeball: TP-7
The second attempt at the recorder went differently. Instead of “look at the photo and copy it,” the agent got the task of measuring. It wrote scripts that separate the object from the background with a mask, compute the scale in pixels per millimeter from the known width of the body, and then find holes, buttons and engravings with brightness scans and color masks. That produced a blueprint in numbers: a body of 84.3 × 123.7 × 21.5 mm and the position of every part. The model was built from these numbers, and it has 173 objects.
The check isn’t by eye either. The render is overlaid on the reference in red and green: the red channel from the photo, green from the render. Where the silhouettes match, you get yellow. Where red or green sticks out on its own, there’s a mismatch. The silhouettes ended up matching at 95.5%, and every mismatch is visible before you even open the two frames side by side.



The lesson is simple. The agent is good at writing code that measures and bad at judging proportions by eye. Give it measuring as a task, and it’ll make the blueprint itself. Do the check in code too: an overlay, a silhouette difference, a percentage. Then “does it look right or not” stops being an argument.
Gates in practice: a house in one day
The Emirati house with a wind tower was built with scripts in one day, from 12:42 to 17:21, following the brief above. I generated its references in Nano Banana: a plan, three facades and three overall views, all in one style and of one house. Then came six steps, each with its own --step, its own .blend and its own render.
Step 1: reference planes

Step 2: blockout

Step 3: details

Step 4: courtyard and lighting

Step 5: materials

Repeat three techniques from here in any project.
- References inside the scene. As the first step, the script puts the plan on the floor and the facades upright, at the right scale. The scale is computed in
refs.pyfrom the anchor: the door is 2.07 m, which means 132.9 pixels per meter on the facade and 105 on the plan. Every following step is rendered against these planes, and any mismatch is visible without a separate comparison. - A one-meter grid and axes in frame. While there are no materials yet, the grid shows the scale and the colored axes show where the origin is. Without them a blockout looks convincing in a render at any size.
- A file per step.
house_step1.blend,house_step2.blendand so on. If a step doesn’t work out, you roll back to the previous file instead of untangling the history.


A minimal example: one object in two stages
For this guide I built a simpler object to show the same gates in a single file: a pocket recorder, 120 × 60 × 18 mm. The script scripts/blender-demo-object.py defines the dimensions in a dictionary, builds the parts with functions and renders four angles at each stage. It runs via --background, with no interface.

Gate 1: blockout. Only the overall dimensions from the blueprint and the placement of the parts.

Gates 3–5: bevels, materials and three light sources.
Blueprint at the top of the script
body 120 × 60 × 18 mm, 3 mm edge fillet, matte anodized aluminum
disc radius 14 mm, height 2 mm, black, orange mark; center (38, 0)
six buttons 10 × 10 × 1.5 mm in two rows, 0.8 mm bevel, the first one orange
cameras: three-quarter, top, side, back; 85 mm lensThe order of steps is the same one modelers use, and the agent knows it. Your role is the gates between the steps.
- References in the scene. The plan under the model, facades or photos at the sides, scale from a known dimension.
- Blockout. Primitives at the exact overall dimensions from the blueprint. No bevels or buttons. Compare the silhouette to the reference with an overlay.
- Details. Bevels, buttons, ports, lettering, following the blueprint with dimensions. One group of details per step.
- Materials. PBR from the blueprint: color, roughness, metallic. Textures from Poly Haven.
- Lighting. An HDRI for the overall light plus key, fill and rim lights. Set up for finished materials, not earlier.
- Camera. Focal length and framing as in the reference renders. For product shots, 50–85 mm.
- Render. Eevee for check sheets, Cycles for the final. Ask the agent to name the resolution and sample count before it starts, or the whole night goes on one frame.
After each step the agent renders a contact sheet and writes down where it differs from the reference. You approve with the word “next” or send it back. These are the gates from the “A motion video in code” topic, carried over into 3D.
Export to the web: two glTF traps
The TP-7 has a web viewer in Three.js: tp7-3d.vercel.app, a 2.1 MB GLB model, mouse orbit, seven camera presets, code in the repository. On the way from Blender to the browser I ran into two bugs that are invisible in Blender itself.
Trap 2: anisotropy without tangents

Trap 1: an inside-out shell

After both fixes

- An inside-out shell. After dozens of boolean operations the body’s normals pointed inward. Cycles doesn’t notice, but a browser with back-face culling makes the body invisible. You can check it in code: the sign of the mesh volume computed from its triangles is negative on an inside-out model.
- Black faces from anisotropy. Blender exports brushed metal as the
KHR_materials_anisotropyextension. Without tangents in the geometry, Three.js paints those surfaces black. The viewer zeroes out anisotropy on load.
And one more thing: metal with metalness = 1 is lit only by reflections of the environment. In an empty scene the side walls go black, so the viewer builds a procedural studio dome with softboxes. Compression and formats for the web are covered in the “3D model generation” topic.
A skill: an icon from an SVG in one command
The third project is a dimensional icon from a flat logo. Every brand needs this sooner or later, so instead of a conversation it’s packaged as the skill svg-to-3d-icon (the “Terminal agents: making them yours” topic): a single 800-line svg3d.py script that finds Blender on its own, relaunches itself inside it and returns a JSON summary. The skill is open and installs with one command from the README into the agent’s skills folder. A ready-made set of 28 skills covering the whole 3D craft, from UV unwrapping to export, is covered in the “Skills for Blender” topic.
python3 scripts/svg3d.py logo.svg --preview # 768 px, 20 seconds, review sheet
python3 scripts/svg3d.py logo.svg --preset matte --depth 0.24 --relief 0.07
python3 scripts/svg3d.py logo.svg --turntable 96 # final 2048 px + turntable video
The working loop inside the skill is the same as throughout this topic: preview, review sheet, adjust with flags, final, check. The sheet shows three angles on a light and a dark background, and from it you can see that the silhouette matches the SVG, the bevels are clean and the shadow isn’t clipped.

Two rules in the skill were earned through mistakes, and they carry over to any product scene. First: the brand color depends on exposure. The lighting rig is calibrated so the face turned toward the camera renders exactly in the SVG’s fill color. Add 2.4 times more light, and lime #C6E800 turns into ordinary yellow. That’s why the script computes color_check itself and warns you. Second: the floor is invisible to reflections. Otherwise every glossy face reflects the lit floor, the black glyph goes grey, and the colors get muddy.
When you need to go deeper than the skill, manual work begins, and the agent helps there too, just differently. The hyperrealistic version of the same icon is a file with eleven scenes and materials whose settings are all exposed on one group node: Color, Roughness, Brushing, Sparkle. The project’s memory lives in the README: which techniques worked (the Khronos PBR Neutral view transform holds the lime, while AgX pushed it toward mustard), what broke (micro-relief smaller than a pixel produces “salt and pepper” noise) and how to rebuild everything from code. Without a README like that, a month later the project would have to be cracked open all over again.

Where it hurts and what it costs
Here’s the honest picture as of fall 2026, based on three projects. Concept renders and abstract close-ups come out fast and well. An icon from an SVG is one command. A house in an architectural style from generated references is one day of scripts, with materials and a courtyard. A precise gadget with dozens of parts hits a ceiling: even with strong models there are plenty of flaws you’ll have to catch by hand, and for that you need a trained eye and an understanding of how 3D works.
There are no public cost estimates for 3D with an agent yet, so go by your own usage meters. The TP-7 budget, up to a result I had no complaints about, ran into tens of dollars, a noticeable chunk of a subscription’s weekly limit, and it grew with every part. The most expensive part isn’t the scripts themselves but the checks: every check sheet is an image in the context, and every “fix it and re-render” iteration is a new pass over the whole scene. It’s often cheaper to buy a ready-made model on a stock site.
That said, the speed and the workflow itself are impressive in places: you write a task for the agent, and a couple of hours later it sends you renders. The right strategy: start with simple objects, keep a blueprint, measure in code, don’t skimp on check sheets, and treat tokens as a project budget (the “Plans and limits” topic).
Command examples for practice
Show me the current scene: a list of objects with dimensions, materials, lighting, camera. Don’t change anything
Here are photos of an object from four sides in refs/. Write a script that separates the object from the background, computes pixels per millimeter from the known width [X mm] and finds the positions of holes, buttons and lettering. Save the result to docs/measurements.md as a table
Read docs/blueprint.md and refs/. Place reference planes in the scene at the correct scale and build a blockout from primitives at the exact overall dimensions. Render an overlay of the blockout on the facade in an orthographic camera and list the differences in percent. Wait for my ‘next’
Render the model from the same camera as the photo refs/front.jpg and overlay it on the photo in red and green: the photo in the red channel, the render in the green. Compute the silhouette match as a percentage
Set up a studio HDRI from Poly Haven, add a key light from the upper left and a soft rim light. 85 mm camera, angle as in refs/front-34.jpg. Check render in Eevee at 1280×720
Carry everything we approved in this session over into build.py: dimensions and materials in a separate module, the build split into functions, a --step flag for each stage, and the camera and contact sheet at the end. Run it in the background and show me that the scene rebuilt one to one
Write build.py in bpy that builds [object] from docs/blueprint.md and renders four angles into renders/. Run it via blender --background, look at the renders and compare them with refs/. Fix the differences and run it again until the proportions match
Export the model to GLB and check before exporting: the volume sign of every mesh is positive, no materials have anisotropy without tangents, the total size is under 3 MB. Build a page with Three.js: orbit, auto-rotate, a studio dome for the metal
Turn build.py into a batch: ten body color variants from the palette in docs/colors.md, one three-quarter render for each, file names after the color names
Wrap the pipeline in a skill: input is a logo SVG, output is three angles on a light and a dark background, a GLB and a .blend. Preview in 20 seconds, final in the background. In the JSON summary, a brand color check on the face turned toward the cameraTake a simple object: a business card, a lighter, a book, a mug. Put the blueprint brief from the “3D with AI” topic in docs/blueprint.md, the references in refs/, the rules in CLAUDE.md. Connect Blender through MCP or work with scripts; choose for yourself and write down why. As the first step, place the references in the scene and ask the agent to measure the object in code, not by eye. Take it through the seven gates, approve the contact sheet after each one, and check the blockout with an overlay on the reference. At the end, run build.py in a clean scene: if the object rebuilds and the overlay gives over 90% silhouette match, you have a pipeline. From there you can make it more ambitious.
Sources
- Blender MCP (ahujasid)github.com
An add-on and MCP server: runs Python in Blender, views the viewport, Poly Haven, Sketchfab, generators
- Blender Lab: MCP Serverblender.org
The official experimental MCP for Blender 5.1+: scene analysis, no protection against the model’s code
- Upcoming Blender Development Fund and AI policiesblender.org
Blender doesn’t plan to build generative AI into the editor itself
- Blender Python APIdocs.blender.org
The bpy module: all of Blender’s functionality from a script
- Blender Command Line Argumentsdocs.blender.org
Running Blender with a script and no interface: --background --python
- glTF 2.0: KHR_materials_anisotropygithub.com
The extension Blender exports anisotropic metal to; without tangents in the geometry, three.js paints it black
- Poly Haven Licensepolyhaven.com
HDRIs, textures and models under CC0
Found a mistake or an outdated fact? Write to hey@iskra.guide