BlenderMCP - Blender Model Context Protocol Integration
March 24, 2025 · View on GitHub
BlenderMCP connects Blender to Cursor through the Model Context Protocol (MCP), allowing Cursor to directly interact with and control Blender. This integration enables AI-assisted 3D modeling, scene creation, and manipulation through natural language commands.
This project is a modified version of BlenderMCP, adapted specifically for Cursor integration.
Features | Özellikler
- Two-way communication: Connect Cursor to Blender through a socket-based server
- Object manipulation: Create, modify, and delete 3D objects in Blender
- Material control: Apply and modify materials and colors
- Scene inspection: Get detailed information about the current Blender scene
- Code execution: Run Python code in Blender through Cursor commands
English Installation Guide
Prerequisites
- Blender 3.0 or newer
- Python 3.10 or newer
- Homebrew (for Mac)
- UV package manager
Installation Steps
1. Install UV Package Manager
For Mac:
brew install uv
For Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
2. Install Blender Addon
- Download
addon.pyfile - Open Blender
- Go to Edit > Preferences > Add-ons
- Click "Install..."
- Select the
addon.pyfile - Enable the addon (check the box)
3. Install Python Package
Run these commands in terminal:
# Go to project directory
cd blender-mcp
# Create virtual environment
uv venv
# Activate virtual environment
source .venv/bin/activate # For Mac/Linux
# or
.venv\Scripts\activate # For Windows
# Install package
uv pip install -e .
4. MCP Configuration
- Create
mcp.jsonfile in project directory:
{
"mcpServers": {
"blender": {
"command": "/path/to/blender-mcp/.venv/bin/python",
"args": [
"-m",
"blender_mcp.server",
"--port",
"9876"
]
}
}
}
Note: Replace /path/to/ with your actual path.
5. Cursor Setup
- Open Cursor
- Go to Settings > MCP
- Click "Add Server"
- Select your
mcp.jsonfile
Usage
Starting Connection
-
In Blender:
- Press N to open side panel
- Find "BlenderMCP" tab
- Click "Start MCP Server"
- Check console for "Server started on port 9876"
-
In Cursor:
- Verify MCP server shows "Connected"
Example Commands
- "Create a cube in Blender"
- "Add a sphere above the cube"
- "Make the cube red"
- "Rotate the sphere 45 degrees"
Troubleshooting
-
"Client closed" Error
- Restart Blender
- Disable and re-enable addon
- Click "Start MCP Server" again
- Restart Cursor
-
Port Conflict
- Check if port 9876 is in use
- Use
lsof -i :9876to check port - Restart Blender if needed
Türkçe Kurulum Rehberi
Gereksinimler
- Blender 3.0 veya daha yeni sürüm
- Python 3.10 veya daha yeni sürüm
- Homebrew (Mac için)
- UV paket yöneticisi
Kurulum Adımları
1. UV Paket Yöneticisinin Kurulumu
Mac için:
brew install uv
Windows için:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
2. Blender Eklentisinin Kurulumu
addon.pydosyasını indirin- Blender'ı açın
- Edit > Preferences > Add-ons menüsüne gidin
- "Install..." butonuna tıklayın
- İndirdiğiniz
addon.pydosyasını seçin - Eklentiyi aktif edin (onay kutusunu işaretleyin)
3. Python Paketinin Kurulumu
Terminal'de şu komutları çalıştırın:
# Proje klasörüne gidin
cd blender-mcp
# Sanal ortam oluşturun
uv venv
# Sanal ortamı aktifleştirin
source .venv/bin/activate # Mac/Linux için
# veya
.venv\Scripts\activate # Windows için
# Paketi yükleyin
uv pip install -e .
4. MCP Yapılandırması
- Proje klasöründe
mcp.jsondosyası oluşturun:
{
"mcpServers": {
"blender": {
"command": "/path/to/blender-mcp/.venv/bin/python",
"args": [
"-m",
"blender_mcp.server",
"--port",
"9876"
]
}
}
}
Not: /path/to/ kısmını kendi bilgisayarınızdaki gerçek yol ile değiştirin.
5. Cursor Ayarları
- Cursor'u açın
- Settings > MCP menüsüne gidin
- "Add Server" butonuna tıklayın
- Oluşturduğunuz
mcp.jsondosyasını seçin
Kullanım
Bağlantıyı Başlatma
-
Blender'da:
- N tuşuna basarak yan paneli açın
- "BlenderMCP" sekmesini bulun
- "Start MCP Server" butonuna tıklayın
- Konsolda "Server started on port 9876" mesajını görün
-
Cursor'da:
- MCP sunucusunun "Connected" durumunda olduğunu kontrol edin
Örnek Komutlar
- "Create a cube in Blender"
- "Add a sphere above the cube"
- "Make the cube red"
- "Rotate the sphere 45 degrees"
Sorun Giderme
-
"Client closed" Hatası
- Blender'ı yeniden başlatın
- Eklentiyi devre dışı bırakıp tekrar etkinleştirin
- "Start MCP Server" butonuna tekrar tıklayın
- Cursor'u yeniden başlatın
-
Port Çakışması
- 9876 portunun kullanımda olup olmadığını kontrol edin
lsof -i :9876komutu ile portu kontrol edin- Gerekirse Blender'ı yeniden başlatın
License | Lisans
MIT License
Contributing | Katkıda Bulunma
Feel free to submit issues and pull requests. Hata raporları ve öneriler için Issues bölümünü kullanabilirsiniz.