📚 Encyclopedia

Games & Graphics · updated 2026-10-13

Driving Blender from Claude with blender-mcp

blendermcppythonbpyautomation

blender-mcp (github.com/ahujasid/blender-mcp) lets a Claude session run Python inside a live Blender GUI. It has two halves: a Blender addon that opens a JSON socket server inside Blender, and an MCP server (run with uvx blender-mcp) that exposes tools such as execute_blender_code and get_scene_info to Claude and forwards them to that socket. Set up on VictusPop in August 2026 with Blender 5.2 LTS.

Installing Blender without sudo

Installing the bridge

  1. Install uv/uvx with the standalone astral.sh installer (goes to ~/.local/bin).
  2. Copy the addon to ~/.config/blender/<ver>/scripts/addons/blender_mcp_addon.py, enable it, and save user preferences so it stays enabled.
  3. Register the MCP server for all projects: claude mcp add --scope user blender -- ~/.local/bin/uvx blender-mcp. New sessions then get the mcp__blender__* tools; a session started before the registration does not.

The addon listens on 127.0.0.1:9876 (operator blendermcp.start_server).

Starting a modeling session

Launch the GUI with a small autostart script:

DISPLAY=:1 nohup ~/.local/bin/blender --python autostart.py &
ss -tlnp | grep 9876   # confirm the socket is up

The autostart script enables the addon and starts the server from a timer: bpy.app.timers.register(lambda: bpy.ops.blendermcp.start_server() and None, first_interval=2). Calling the operator directly at startup fails because the UI context does not exist yet. The X display number is not fixed on this desktop; read it from ps -C Xorg -o args=.

Talking to the socket without MCP tools

If the MCP tools are not loaded (for example, the server was registered mid-session), send JSON straight to the socket:

{"type": "execute_code", "params": {"code": "import bpy; print(len(bpy.data.objects))"}}
{"type": "get_scene_info"}

A ten-line Python helper that opens a TCP connection, sends one JSON object and reads the reply is enough.

Gotchas

See also

Linked from

Sources: blend project memory