blender-mcp
blender-mcp
MCP-сервер для создания .blend-файлов Blender. Работает с Blender двумя способами:
Headless — каждый вызов запускает новый процесс
blender --background. Детерминированно, всегда доступен и подходит для генерации файлов.Live — небольшой аддон Blender открывает локальный порт, чтобы сервер мог управлять уже открытым окном Blender, и вы наблюдаете за процессом.
Оба маршрута используют один и тот же код обработчиков, поэтому скрипт ведёт себя одинаково в любом режиме. Локальный веб-интерфейс позволяет загружать референсные изображения и запускать задачи генерации с помощью тех же инструментов.
Требования
Blender | 4.2 или новее (разрабатывалось под 5.1) |
Python | 3.12+ для сервера (Blender использует свой) |
управление зависимостями и виртуальным окружением |
Related MCP server: blender-chatgpt-mcp
Настройка
uv sync # create .venv and install
cp .env.example .env # then set BLENDER_MCP_EXECUTABLE
uv run python scripts/build_addon.py --install # build + install the Blender addonЕсли пропустить .env, сервер ищет Blender в PATH и стандартных папках
Program Files/Blender Foundation/Blender <version> на всех дисках, отдавая предпочтение
самой новой найденной версии.
Включение live-моста
Аддон установлен, но неактивен, пока вы его не запустите:
Откройте Blender.
Нажмите N в 3D-вьюпорте, чтобы показать боковую панель.
Откройте вкладку MCP и нажмите Start MCP Bridge.
Отметьте Start listening on launch в настройках аддона, чтобы пропустить этот шаг в будущем.
Подключение MCP-клиента
.cursor/mcp.json уже регистрирует сервер для этого проекта. Чтобы сделать его доступным
везде, скопируйте этот блок в ~/.cursor/mcp.json:
{
"mcpServers": {
"blender": {
"command": "uv",
"args": ["run", "--directory", "C:\\Users\\josef\\Projects\\blender-mcp", "blender-mcp"]
}
}
}Рабочий процесс для качества
Качество генерации достигается через просмотр, а не через единый скрипт:
list_references/view_reference— сначала откройте направляющие изображенияcreate_blendизstudioилиproductСтройте небольшими шагами
run_script;apply_materialдля металла/пластика/резины/стекла/дереваpreview_views— многовидовые превью EEVEE; сравните с референсами черезview_imageИсправляйте, снова просматривайте
Финальный
render/render_and_view(только CYCLES для финала; EEVEE во время итераций)
Локальный веб-интерфейс
uv run blender-mcp-web
# open http://127.0.0.1:8765Загружайте референсные изображения, вводите промпт и просматривайте задачи в output/jobs/.
С
BLENDER_MCP_LLM_API_KEYв.env— сайт запускает ограниченный мультимодальный агент, который вызывает те же инструменты Blender (совместимый с OpenAI или Anthropic черезBLENDER_MCP_LLM_PROVIDER).Без ключа — загрузка и страницы задач всё равно работают; откройте задачу в Cursor и попросите MCP-агента собрать из
output/jobs/<id>/refs.
Инструменты
Инструмент | Назначение |
| Установка, папки вывода/референсов, шаблоны, материалы, live-мост |
| Библиотека направляющих изображений в |
| Новый файл из шаблона + опциональный скрипт |
| Произвольный Python-код bpy |
| Процедурные пресеты: металл, пластик, резина, стекло, дерево |
| Граф сцены / материалы / камеры / источники света |
| Многовидовые превью EEVEE для критики |
| Статичный PNG; второй возвращает изображение для просмотра |
| Загрузка PNG для визуального анализа |
| Захват живого вьюпорта |
| Файлы в |
| Открыть |
Написание скриптов
run_script и аргумент script в create_blend выполняются в пространстве имён, где уже
доступны bpy, mathutils, math, D (bpy.data) и C (bpy.context). Отправляйте
данные обратно, присваивая значение result или вызывая emit(value).
Шаблоны
Имя | Что вы получаете |
| Вообще ничего |
| Стартовая сцена Blender: куб, камера, источник света |
| Серый пол, трёхточечное площадное освещение, камера 50 мм, 1920×1080 |
| Белый бесшовный фон, мягкий свет, кадрирование 85 мм для продуктов |
Структура
addon/blender_mcp_addon/ Blender extension + shared handlers (incl. preview_views)
src/blender_mcp/
server.py MCP tools
refs.py reference image library
materials.py procedural material presets
templates.py starter scenes
agent/ bounded multimodal generation loop
web/ FastAPI UI (templates + static)
headless.py / bridge.py Blender process / live socket
scripts/ build, install, verification
output/ .blend files, renders, refs/, jobs/Тестирование
uv run pytest -m "not blender" # fast
uv run pytest # includes real Blender runs
uv run python scripts/check_server.py
uv run python scripts/verify_live_bridge.pyПримечания и ограничения
run_scriptвыполняет произвольный Python-код внутри Blender. Держите мост на loopback.Длительный рендер блокирует живой интерфейс до завершения.
viewport_screenshotработает только в live-режиме.Cycles использует CPU, если не включить GPU-устройство в настройках Blender.
Веб-агенту нужна мультимодальная модель, поддерживающая вызовы инструментов и изображения.
Лицензия
MIT
Available Tools
16 toolsadd_referenceA
Copy an image file into the reference library under output/refs.
Args: source_path: Existing image on disk (absolute or under the output folder). name: Optional destination filename. group: Optional subfolder name for organising guides.
Inputs: source_path (required), name, group.
apply_materialA
Apply a procedural material preset (metal, plastic, rubber, glass, wood) to a mesh.
Args: object_name: Mesh object name in the scene. preset: One of the presets from blender_status.materials. color: Optional RGB or RGBA floats 0-1. blend_file: Open this file first (forces headless). save_as: Save after applying. target: "auto", "live" or "headless".
Inputs: preset (required), object_name (required), color, target, +2 more.
blender_statusC
Report the Blender install, output folder, live-bridge state, templates and materials.
Inputs: no named parameters.
create_blendA
Create a new .blend file from a starter template and save it.
Args: path: Destination, relative to the output folder unless absolute. A ".blend" suffix is added when missing. template: empty, default, studio, or product. script: Optional extra bpy code run after the template. compress: Write a compressed .blend.
Inputs: path (required), script, compress, template.
inspect_blendA
Describe a scene: objects, transforms, materials, cameras, lights and render settings.
Args: blend_file: Inspect this file. Leave empty to inspect the live session instead. include_objects: Include the per-object breakdown, not just the counts. target: Where to look when no file is given.
Inputs: target, blend_file, include_objects.
list_outputsC
List the files produced so far in the output folder.
Inputs: pattern.
list_referencesA
List reference guide images under output/refs (optionally one group folder).
Inputs: group.
open_in_live_sessionB
Load a .blend into the Blender window the user has open, so they can see it.
Inputs: blend_file (required).
preview_viewsB
Render multi-angle EEVEE previews (front, three_quarter, side, top) for critique.
Args: blend_file: .blend to open and preview. output_dir: Folder under output/ for the PNGs. width: Preview width. height: Preview height. samples: Low sample count for speed. engine: Prefer EEVEE. target: Usually headless.
Inputs: blend_file (required), width, engine, height, +3 more.
renderA
Render a still image and write it to disk. Prefer render_and_view so you see it.
Args: output: PNG destination, relative to the output folder unless absolute. blend_file: Render this file rather than the live session. Forces a headless run. engine: "EEVEE", "CYCLES" or "WORKBENCH". EEVEE for iteration; CYCLES for finals. samples: Sample count. Keep it low for previews. width: Output width in pixels. height: Output height in pixels. frame: Frame to render. Defaults to the scene's current frame. transparent: Render the world background as alpha. target: "auto", "live" or "headless".
Inputs: frame, width, engine, height, +5 more.
render_and_viewC
Render a still and return the image so you must look at it.
Args: output: PNG destination under the output folder. blend_file: Optional .blend to open first. engine: Prefer EEVEE while iterating. samples: Sample count. width: Width in pixels. height: Height in pixels. target: "auto", "live" or "headless".
Inputs: width, engine, height, output, +3 more.
run_scriptA
Run Python against Blender's bpy API.
bpy, mathutils, math, D and C are pre-bound. Assign to result or call
emit(value) to send data back; print() output is captured too.
Args: code: The Python to execute. blend_file: Open this .blend first. Supplying it forces a headless run. save_as: Save the file here when the script finishes. target: "auto", "live" or "headless".
Inputs: code (required), target, save_as, blend_file.
view_imageC
Load a rendered image so it can actually be looked at.
Args: path: Image path, relative to the output folder unless absolute.
Inputs: path (required).
viewport_screenshotB
Capture the live Blender window's 3D viewport as it currently looks.
Requires the MCP Bridge addon to be running in an open Blender session.
Inputs: output.
view_previewB
Look at one preview PNG from preview_views or a render.
Args: path: Image path relative to output or absolute.
Inputs: path (required).
view_referenceB
Look at a reference/guide image so you can match it while modeling.
Args: path: Path relative to output/refs, or absolute.
Inputs: path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool targets a distinct action: status, references (list/view/add), file creation, scripting, material application, scene inspection, rendering (with variants for preview and view), screenshot, output listing, and live session opening. Even similar tools like render and render_and_view are clearly differentiated by purpose and parameters.
All tool names use snake_case with a verb_noun pattern (e.g., list_references, create_blend, apply_material). The naming is predictable and follows a consistent structure, making it easy for an agent to infer functionality from the name.
With 16 tools, the set covers a broad range of Blender operations—file management, references, materials, rendering, scripting, and inspection—without being overwhelming. The count is well-scoped for its domain: enough to handle common tasks without unnecessary duplication.
The tool surface covers many essential tasks but lacks direct tools for object creation (e.g., adding primitives), transformation (move/rotate/scale), or animation. While run_script can fill these gaps via Python, the explicit tool set leaves notable gaps for a modeling server, forcing agents to fall back to scripting for basic operations.
Related MCP Connectors
Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.
An MCP server that provides asset auto generator
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for AI-assisted Blender automation, providing layered tools for perception, declarative and imperative writing, and fallback operations.29126 PyPI7MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants like Codex or ChatGPT to inspect and control a local Blender scene, including creating objects, editing materials, setting cameras and lights, rendering previews, and saving safe copies of .blend files.1MIT
- FlicenseBqualityDmaintenanceMCP server that controls Blender via HTTP bridge, enabling 3D modeling, animation, and export operations from Cursor agent.321-
- AlicenseAqualityDmaintenanceMCP server for Blender that connects to the official Blender Lab add-on, exposing 27 tools for scene manipulation, object editing, materials, rendering, and Python execution through the add-on's actual wire protocol.271MIT