optional-skills/creative/blender-mcp/references/pitfalls.md
All interaction goes through the blender MCP tools (hermes mcp install blender): get_scene_info, get_object_info, get_viewport_screenshot,
and execute_blender_code for arbitrary bpy Python.
The Blender MCP addon opens its local bridge socket only when you click "Connect to Claude" in the BlenderMCP sidebar tab (N-panel). If the MCP tools error with "connection refused", the addon isn't connected — fix that in Blender, don't retry the tool.
Verify the bridge is up: lsof -i :9876 -P -n | grep LISTEN
Other services may already use 9876. If the tools fail but Blender is running with the addon started, check with lsof. The port is configurable in the BlenderMCP addon UI panel.
Blender addon installation requires the GUI: Edit > Preferences > Add-ons > Install. The agent cannot automate this. Provide the addon.py path and let the user install it.
execute_blender_code)The code runs in a namespace with only bpy and math. If you need os,
json, bmesh, mathutils, etc., import them inside the code:
import bmesh
bm = bmesh.new()
...
The addon returns {"executed": true, "result": ""} for ALL code — the
eval result is not captured in Blender 5.x. To get values out:
get_scene_info or get_object_info for queriesimport json
open('/tmp/result.json', 'w').write(json.dumps([o.name for o in bpy.data.objects]))
The addon catches exceptions and returns them as error text rather than crashing. Check the tool result for an error before assuming the code ran.
Many bpy.ops functions require the right UI context, which differs when
executing through the bridge. Prefer direct data manipulation:
# Prefer data API over ops
bpy.data.objects.remove(bpy.data.objects['Cube'], do_unlink=True)
New Blender files start with a Cube at (0,0,0), a Light, and a Camera. Clear them before building.
Creating an object named "Cube" when one already exists results in
"Cube.001". Always check the actual name via get_scene_info.
The addon's own object-creation commands take degrees and convert
internally, but bpy code in execute_blender_code uses radians. Be careful
about the distinction.
Materials created by the addon use Principled BSDF. For other shader types,
build the node tree manually in execute_blender_code.
Material colors use floating-point RGBA in the 0.0-1.0 range.
Rendering is synchronous; the tool call won't return until the render finishes. Expect renders to take far longer than other calls.
In Blender 5.x, EEVEE is 'BLENDER_EEVEE' (not 'BLENDER_EEVEE_NEXT',
which was Blender 4.x). Discover available engines at runtime:
import json
open('/tmp/engines.json', 'w').write(json.dumps(
list(bpy.types.RenderSettings.bl_rna.properties['engine'].enum_items.keys())))
Known engine names: BLENDER_EEVEE, BLENDER_WORKBENCH, CYCLES
Use METAL compute device type on Apple Silicon. Use CUDA or OPTIX on NVIDIA.
Each tool call is independent — there is no session state in the bridge. Anything you need later must exist in the scene (or a file you wrote).
If Blender crashes, relaunch it, re-enable the addon, and click "Connect to
Claude" again. Save frequently (bpy.ops.wm.save_mainfile()).