Skip to main content
Glama

blender-mcp

Un servidor MCP que construye archivos .blend de Blender. Se conecta a Blender de dos formas:

  • Headless — cada llamada inicia un proceso blender --background nuevo. Determinista, siempre disponible, y la opción adecuada para generar archivos.

  • Live — un pequeño addon de Blender abre un puerto local para que el servidor pueda controlar la ventana de Blender que ya tienes abierta, y puedes verlo en acción.

Ambas rutas ejecutan el mismo código de manejador, por lo que un script se comporta de forma idéntica en cualquier caso. Una interfaz web local te permite subir imágenes de referencia y ejecutar trabajos de generación con las mismas herramientas.

Requisitos

Blender

4.2 o más reciente (desarrollado contra 5.1)

Python

3.12+ para el servidor (Blender trae el suyo)

uv

gestión de dependencias y entornos virtuales

Related MCP server: blender-chatgpt-mcp

Configuración

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

Si omites .env, el servidor busca en tu PATH y en las carpetas estándar Program Files/Blender Foundation/Blender <version> de cada unidad, prefiriendo la versión más nueva que encuentre.

Activando el puente en vivo

El addon está instalado pero inactivo hasta que lo inicies:

  1. Abre Blender.

  2. Presiona N en el viewport 3D para mostrar la barra lateral.

  3. Abre la pestaña MCP y haz clic en Start MCP Bridge.

Marca Start listening on launch en las preferencias del addon para omitir este paso cada vez.

Conectando un cliente MCP

.cursor/mcp.json ya registra el servidor para este proyecto. Para hacerlo disponible en todas partes, copia ese bloque en ~/.cursor/mcp.json:

{
  "mcpServers": {
    "blender": {
      "command": "uv",
      "args": ["run", "--directory", "C:\\Users\\josef\\Projects\\blender-mcp", "blender-mcp"]
    }
  }
}

Flujo de trabajo de calidad

La calidad de la generación viene de observar, no de un solo volcado de script:

  1. list_references / view_reference — abre primero las imágenes guía

  2. create_blend desde studio o product

  3. Construye en pequeños pasos con run_script; apply_material para metal/plástico/goma/vidrio/madera

  4. preview_views — previsualizaciones EEVEE multiángulo; compara con las referencias usando view_image

  5. Corrige, previsualiza de nuevo

  6. render / render_and_view final (CYCLES solo para finales; EEVEE durante la iteración)

Interfaz web local

uv run blender-mcp-web
# open http://127.0.0.1:8765

Sube imágenes de referencia, introduce un prompt y explora los trabajos en output/jobs/.

  • Con BLENDER_MCP_LLM_API_KEY en .env — el sitio ejecuta un agente multimodal acotado que llama a las mismas herramientas de Blender (compatible con OpenAI o Anthropic mediante BLENDER_MCP_LLM_PROVIDER).

  • Sin clave — las subidas y las páginas de trabajo siguen funcionando; abre el trabajo en Cursor y pídele al agente MCP que construya a partir de output/jobs/<id>/refs.

Herramientas

Herramienta

Propósito

blender_status

Instalación, directorios de salida/refs, plantillas, materiales, puente en vivo

list_references / view_reference / add_reference

Biblioteca de imágenes guía en output/refs

create_blend

Archivo nuevo a partir de una plantilla + script opcional

run_script

Cualquier código Python de bpy

apply_material

Ajustes predefinidos procedurales: metal, plástico, goma, vidrio, madera

inspect_blend

Grafo de escena / materiales / cámaras / luces

preview_views

Previsualizaciones EEVEE multiángulo para crítica

render / render_and_view

PNG fijo; el segundo devuelve la imagen para verla

view_image / view_preview

Carga un PNG para visión

viewport_screenshot

Captura del viewport en vivo

list_outputs

Archivos en output/

open_in_live_session

Abre un .blend en la ventana de Blender en vivo

Escribiendo scripts

run_script y el argumento script de create_blend se ejecutan en un espacio de nombres donde bpy, mathutils, math, D (bpy.data) y C (bpy.context) ya están vinculados. Envía datos de vuelta asignando a result o llamando a emit(value).

Plantillas

Nombre

Lo que obtienes

empty

Nada en absoluto

default

Escena de inicio de Blender: cubo, cámara, luz

studio

Suelo gris, iluminación de área de tres puntos, cámara de 50 mm, 1920×1080

product

Fondo blanco sin costuras, luces suaves, encuadre de producto de 85 mm

Estructura

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/

Pruebas

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

Notas y límites

  • run_script ejecuta código Python arbitrario dentro de Blender. Mantén el puente en la interfaz de loopback.

  • Los renders largos bloquean la interfaz en vivo hasta que terminan.

  • viewport_screenshot solo funciona en vivo.

  • Cycles usa CPU a menos que habilites un dispositivo GPU en las preferencias de Blender.

  • El agente web necesita un modelo multimodal que admita llamadas a herramientas e imágenes.

Licencia

MIT

Available Tools

16 tools
add_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

    B3.4/5.0

    Scored across 16 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness3/5

    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

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for AI-assisted Blender automation, providing layered tools for perception, declarative and imperative writing, and fallback operations.
      29
      126 PyPI
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An 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.
      1
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      MCP server that controls Blender via HTTP bridge, enabling 3D modeling, animation, and export operations from Cursor agent.
      32
      1
      -
    • A
      license
      A
      quality
      D
      maintenance
      MCP 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.
      27
      1
      MIT