Remote control Blender with Python and MCP server
Project description
blender-remote
๐ฏ Control Blender from any LLM-powered IDE with zero configuration
blender-remote is a production-ready MCP (Model Context Protocol) server that enables AI coding assistants to control Blender remotely. Simply run uvx blender-remote and your LLM can inspect scenes, execute Python code, and capture screenshots directly from Blender.
โจ Key Features
- ๐ Zero Installation: Run
uvx blender-remote- no pip install needed - ๐ค LLM Integration: Works with VSCode Claude, Cursor, and other MCP-compatible IDEs
- ๐ฑ GUI + Background Mode: Unique support for both interactive and headless Blender
- ๐ง Complete Blender Control: Execute any Blender Python API code through your AI assistant
- ๐ธ Screenshot Capture: Get viewport images as base64 data for LLM analysis
- ๐ Thread-Safe: Handles concurrent requests with UUID-based file management
- โก Production Ready: Built on thoroughly tested BLD_Remote_MCP service
๐ฏ Quick Start for LLM Users
1. Install Blender Add-on
# Download and install the BLD_Remote_MCP addon
cd ~/.config/blender/4.4/scripts/addons/
wget -O bld_remote_mcp.zip https://github.com/igamenovoer/blender-remote/raw/main/blender_addon/bld_remote_mcp.zip
unzip bld_remote_mcp.zip
2. Start Blender with Auto-Service
# Set environment variables and start Blender
export BLD_REMOTE_MCP_PORT=6688
export BLD_REMOTE_MCP_START_NOW=1
blender & # or "blender --background" for headless mode
3. Configure Your LLM IDE
VSCode (with Claude/Cursor extensions):
{
"mcp": {
"servers": {
"blender-remote": {
"type": "stdio",
"command": "uvx",
"args": ["blender-remote"]
}
}
}
}
Claude Desktop:
{
"mcpServers": {
"blender-remote": {
"command": "uvx",
"args": ["blender-remote"]
}
}
}
4. Start Creating with AI! ๐
Your LLM can now:
- Inspect scenes: "What objects are in the current Blender scene?"
- Execute code: "Create a blue metallic cube at position (2, 0, 0)"
- Take screenshots: "Show me the current viewport"
- Automate workflows: "Create a donut tutorial scene with lighting"
๐๏ธ Architecture
LLM IDE (VSCode/Claude)
โ MCP Protocol
blender-remote (uvx)
โ JSON-TCP (port 6688)
BLD_Remote_MCP (Blender addon)
โ Python API
Blender (GUI or --background)
๐ Available MCP Tools
| Tool | Description | Example Use |
|---|---|---|
get_scene_info() |
List all objects, materials, and scene properties | Scene analysis |
get_object_info(name) |
Get detailed object properties | Object inspection |
execute_blender_code(code) |
Run Python code in Blender context | Any Blender operation |
get_viewport_screenshot() |
Capture viewport as base64 image | Visual feedback |
check_connection_status() |
Verify service health | Debugging |
๐ง Advanced Usage
Manual Installation (for development)
# Clone and install from source
git clone https://github.com/igamenovoer/blender-remote.git
cd blender-remote
pixi install # or pip install -e .
CLI Tools (for testing)
# Check connection to BLD_Remote_MCP service
blender-remote status
# Execute Blender Python code
blender-remote exec "bpy.ops.mesh.primitive_cube_add()"
# Get scene information
blender-remote scene
# Capture viewport screenshot
blender-remote screenshot
Python API (for custom scripts)
# Direct connection to BLD_Remote_MCP service
import socket
import json
# Connect to service
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', 6688))
# Send command
command = {"type": "execute_code", "params": {"code": "bpy.ops.mesh.primitive_cube_add()"}}
sock.sendall(json.dumps(command).encode('utf-8'))
# Get response
response = json.loads(sock.recv(4096).decode('utf-8'))
print(response)
sock.close()
๐งช Testing & Development
This project uses pixi for environment management:
# Install pixi (if not already installed)
curl -fsSL https://pixi.sh/install.sh | bash
# Create development environment
pixi install
# Run comprehensive test suite
pixi run python tests/run_dual_service_tests.py
# Quick smoke test
pixi run python tests/smoke_test.py
# Test MCP server functionality
pixi run python tests/mcp-server/test_fastmcp_server.py
๐ Project Structure
blender-remote/
โโโ blender_addon/ # Blender add-ons
โ โโโ bld_remote_mcp/ # BLD_Remote_MCP service (port 6688)
โโโ src/blender_remote/ # Python package (src layout)
โ โโโ mcp_server.py # FastMCP server implementation
โ โโโ cli.py # CLI tools
โโโ tests/ # Comprehensive test suite
โ โโโ mcp-server/ # MCP server functionality tests
โ โโโ integration/ # Service comparison tests
โ โโโ others/ # Development scripts
โโโ docs/ # Documentation
โโโ examples/ # Usage examples
โโโ context/ # AI assistant resources
โ ๏ธ Background Mode Support
Unique Advantage: Unlike other Blender MCP solutions, blender-remote supports both GUI and background modes:
- GUI Mode: Full functionality including viewport screenshots
- Background Mode: Code execution and scene inspection (screenshots unavailable)
- Automatic Detection: Service gracefully handles mode limitations
# GUI mode (recommended for development)
blender &
# Background mode (for servers/CI)
blender --background &
๐ง Troubleshooting
Common Issues
"Connection refused" error:
- Ensure Blender is running with BLD_Remote_MCP addon enabled
- Check service is listening:
netstat -tlnp | grep 6688 - Try restarting Blender with environment variables set
"No module named 'fastmcp'" error:
- Install with uvx:
uvx blender-remote(handles dependencies automatically) - For development:
pixi run pip install fastmcp>=2.0.0
Screenshots not working:
- Only available in GUI mode (
blender, notblender --background) - Service will return clear error message in background mode
Debug Mode
# Test MCP server directly
pixi run python -m blender_remote.mcp_server
# Test with FastMCP inspector
pixi run fastmcp dev src/blender_remote/mcp_server.py
๐ค Contributing
Contributions are welcome! Please see our comprehensive test suite and development workflow:
- Fork the repository and create a feature branch
- Run tests:
pixi run python tests/run_dual_service_tests.py - Add tests for new functionality
- Submit pull request with clear description
๐ License
๐ Links
- ๐ Documentation: https://igamenovoer.github.io/blender-remote/
- ๐ Issue Tracker: Report bugs and request features
- ๐ฌ Discussions: Community support
- ๐ฅ Examples: Usage examples and workflows
๐ฏ Ready to enhance your Blender workflow with AI? Start with uvx blender-remote today!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blender_remote-1.0.0.tar.gz.
File metadata
- Download URL: blender_remote-1.0.0.tar.gz
- Upload date:
- Size: 63.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae10472b34ae054ac683869a284cb5b6449fdfdf11e1869c80b00ecd26029c11
|
|
| MD5 |
f532f28a60e73ea3cbfa7c52410c7cf5
|
|
| BLAKE2b-256 |
58e8954297302e54fdf117d93e90480e726d6c48d5c0dd797ac4847590d9ed99
|
File details
Details for the file blender_remote-1.0.0-py3-none-any.whl.
File metadata
- Download URL: blender_remote-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c326facf4f63724a298441deb340baf08f89b2edcf5997d307b3f0dd28810a3d
|
|
| MD5 |
3ce279286cab594512460b440eb35141
|
|
| BLAKE2b-256 |
69e1811f3585e5c73ff446a08591e32e0263b2903e18f6008d8d3f8ac44cedda
|