How the Blender MCP Addon Executes Commands on Blender's Main Thread
The Blender MCP addon runs a TCP server in a background thread and uses bpy.app.timers.register to schedule command execution on Blender's main UI thread, ensuring thread-safe access to Blender's Python API.
The ahujasid/blender-mcp repository implements a robust mechanism for external applications to control Blender programmatically. Since Blender's Python API (bpy) is not thread-safe, the addon must bridge the gap between its asynchronous network layer and Blender's single-threaded UI loop to prevent crashes when manipulating scene data.
Why Blender's Main Thread
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →