SETUP_GUIDE.mdโข5.18 kB
# Blender MCP Server Setup Guide
This guide shows you how to set up the Blender MCP (Model Context Protocol) server to connect Claude AI with Blender for 3D modeling and automation.
## โ
What's Already Done
The following has been completed for you:
1. **MCP Server Created**: A complete MCP server implementation with all Blender tools
2. **Package Installed**: The `blender-mcp` command is available system-wide
3. **Claude Code Configuration**: Your `claude_desktop_config.json` is updated
4. **Test Script**: A verification script to check the setup
## ๐ Quick Start
### Step 1: Install Blender Addon
1. **Open Blender** (version 3.5 or higher)
2. **Install the addon**:
- Go to `Edit > Preferences > Add-ons`
- Click `Install...`
- Navigate to: `D:\repos\VeFrank\VeFrank\mcp-blend\blender_addon.py`
- Select the file and click `Install Add-on`
3. **Enable the addon**:
- Search for "Blender MCP" in the add-ons list
- Check the checkbox next to "Interface: Blender MCP"
### Step 2: Start the Connection
1. **In Blender**:
- Press `N` to open the sidebar (if not visible)
- Go to the **BlenderMCP** tab
- Click **"Connect to MCP server"**
- The status should show "Running on port 9876"
2. **Restart Claude Code** to pick up the MCP server configuration
### Step 3: Verify the Setup
Run the test script to verify everything is working:
```bash
cd mcp-blend
python test_connection.py
```
You should see:
- `[PASS] blender-mcp command is available`
- `[PASS] Successfully connected to Blender addon!`
## ๐ง Configuration Details
### Claude Code Configuration
Your `claude_desktop_config.json` now includes:
```json
{
"mcpServers": {
"blender": {
"command": "blender-mcp",
"args": [
"--host", "localhost",
"--port", "9876"
]
}
}
}
```
### Available Tools
Once connected, you'll have access to these Blender tools through Claude:
#### Core Blender Operations
- `get_scene_info` - Get information about the current scene
- `get_object_info` - Get detailed object information
- `execute_code` - Execute Python code in Blender
#### PolyHaven Integration (Optional)
- `get_polyhaven_status` - Check PolyHaven integration status
- `get_polyhaven_categories` - Browse asset categories
- `search_polyhaven_assets` - Search for assets
- `download_polyhaven_asset` - Download and import assets
- `set_texture` - Apply textures to objects
#### Hyper3D Rodin Integration (Optional)
- `get_hyper3d_status` - Check Hyper3D integration status
- `create_rodin_job` - Generate 3D models from text/images
- `poll_rodin_job_status` - Check generation progress
- `import_generated_asset` - Import generated models
## ๐ฏ How to Use
### In Claude Code
Once everything is set up, you can interact with Blender directly through Claude:
```
Example commands to try:
"Show me what's in the current Blender scene"
"Create a cube and move it to position (2, 0, 0)"
"Download a brick texture from PolyHaven and apply it to the default cube"
"Generate a 3D model of a coffee mug using Hyper3D"
```
### Enable Optional Features
In Blender's BlenderMCP panel, you can enable:
1. **PolyHaven Assets**: Check "Use assets from Poly Haven"
2. **Hyper3D Generation**:
- Check "Use Hyper3D Rodin 3D model generation"
- Choose platform (hyper3d.ai or fal.ai)
- Add your API key or use "Set Free Trial API Key"
## ๐ Troubleshooting
### Connection Issues
If you see `[FAIL] Could not connect to Blender addon`:
1. Make sure Blender is running
2. Ensure the addon is installed and enabled
3. Check that the BlenderMCP server is started (green status in panel)
4. Verify port 9876 isn't blocked by firewall
### MCP Server Issues
If you see `[FAIL] blender-mcp command is available`:
```bash
cd mcp-blend
pip install -e .
```
### Claude Code Not Seeing the Server
1. Restart Claude Code completely
2. Check that `claude_desktop_config.json` is in the correct location
3. Verify the JSON syntax is valid
## ๐ File Structure
```
mcp-blend/
โโโ blender_addon.py # Blender addon file
โโโ flange_generator.py # Example parametric modeling
โโโ blender_mcp/ # MCP server package
โ โโโ __init__.py
โ โโโ server.py # Main MCP server implementation
โโโ pyproject.toml # Package configuration
โโโ test_connection.py # Setup verification script
โโโ SETUP_GUIDE.md # This guide
```
## ๐ Success!
When everything is working, you'll be able to:
- Control Blender directly through Claude Code
- Generate 3D models with natural language
- Download and apply materials from PolyHaven
- Execute complex Blender operations through conversation
- Create parametric models and animations
## ๐ Related Files
- **VeFrank Project**: This MCP server integrates with the VeFrank automotive electrical simulation project
- **3D Visualization**: Works with VeFrank's 3D visualization capabilities
- **Component Factory**: Can be used to visualize VeFrank's electrical components
Enjoy your new Blender + Claude AI workflow! ๐