blender_exec
Execute Python scripts within Blender to automate 3D content creation, query scene data, and control the software remotely through the MCP Bridge.
Instructions
Execute a Python script inside Blender.
IMPORTANT RULES:
- The script MUST define a main() function and call it
- Use send_status("message") to report progress
- Use bpy.data.* APIs instead of bpy.ops.* when possible
- Script MUST terminate - no infinite loops
- Catch exceptions and handle errors gracefully
Args:
script: Python code to execute in Blender. Has access to 'bpy' and 'send_status()'.
Returns:
JSON string with execution results including status and any messages.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes |