Blender MCP Bridge

Blender MCP Bridge

Enables remote control of Blender via the Model Context Protocol, allowing users to execute Python scripts, query scene data, and generate 3D models from images. It provides a bridge for AI clients to interact directly with Blender's internal environment and automate 3D content creation.

Category
Visit Server

README

šŸŽØ Blender MCP Bridge

Python 3.10+ MCP Compatible Blender 4.2+ License: MIT

AI-powered Blender control via Model Context Protocol (MCP)

Send images to create 3D models with matching colors, execute Python scripts, and control Blender remotely through Antigravity or any MCP-compatible AI client.

<p align="center"> <img src="https://raw.githubusercontent.com/MITHRAN-BALACHANDER/Blender-MCP-antigravity/main/island_render.png" alt="Low-Poly Island Demo" width="600"/> </p>


✨ Features

Feature Description
šŸ–¼ļø Image to 3D Extract dominant colors from images and create 3D models with matching materials
šŸ Script Execution Run any Blender Python code remotely through MCP
šŸ“Š Scene Query Get detailed information about objects, materials, and collections
⚔ Real-time Updates Receive live progress status during script execution
šŸ”’ Thread-safe Robust architecture with guaranteed responses and no deadlocks

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”       MCP/stdio       ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│     Antigravity     │◄─────────────────────►│  antigravity_blender_   │
│   (or any MCP AI)   │                       │  server.py              │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜                       ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                                                          │
                                                          │ TCP Socket
                                                          │ (port 8081)
                                                          ā–¼
                                              ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
                                              │   blender_server.py     │
                                              │  (runs inside Blender)  │
                                              ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸ“¦ Installation

Prerequisites

  • Python 3.10+
  • Blender 4.2+ (with full path accessible)
  • pip (Python package manager)

Quick Install

# Clone the repository
git clone https://github.com/MITHRAN-BALACHANDER/Blender-MCP-antigravity.git
cd Blender-MCP-antigravity

# Create virtual environment (recommended)
python -m venv venv
.\venv\Scripts\activate      # Windows
source venv/bin/activate     # Linux/Mac

# Install dependencies
pip install -r requirements.txt

Install as Package (Optional)

pip install -e .

šŸ”Œ Antigravity Integration

Add the following to your Antigravity MCP server configuration:

Option A: Direct Path

{
  "mcpServers": {
    "blender": {
      "command": "python",
      "args": ["C:/path/to/Blender-MCP-antigravity/antigravity_blender_server.py"],
      "env": {}
    }
  }
}

Option B: Using Virtual Environment

{
  "mcpServers": {
    "blender": {
      "command": "C:/path/to/Blender-MCP-antigravity/venv/Scripts/python.exe",
      "args": ["C:/path/to/Blender-MCP-antigravity/antigravity_blender_server.py"],
      "env": {}
    }
  }
}

Note: Replace C:/path/to/ with your actual installation path.


šŸš€ Quick Start

Step 1: Start Blender Server

# Navigate to project directory
cd Blender-MCP-antigravity

# Start Blender with the socket server
# Windows (use full path if 'blender' is not in PATH)
"C:\Program Files\Blender Foundation\Blender 4.2\blender.exe" --background --python blender_server.py

# Linux/Mac
blender --background --python blender_server.py

Expected output:

==================================================
[BlenderMCP] Server running on 127.0.0.1:8081
[BlenderMCP] Waiting for connections...
==================================================

Step 2: Connect Antigravity

Once Blender is running, Antigravity will automatically connect via the MCP configuration.

Step 3: Create 3D Content

Ask Antigravity to create 3D content:

"Create a low-poly island scene in Blender"

"Create a 3D model from this image" (with attached image)


šŸ› ļø MCP Tools Reference

image_to_3d_model

Create a 3D model with colors extracted from an image.

Parameter Type Required Default Description
image_data string āœ… - Base64-encoded image
model_type string āŒ "cube" Shape: cube, sphere, cylinder
model_name string āŒ "ImageModel" Name for the object

Response:

{
  "status": "ok",
  "colors": ["#3A7D8C", "#D4C4A0", "#4A6E4A"],
  "object_name": "ImageModel"
}

blender_exec

Execute Python code inside Blender.

Parameter Type Required Description
script string āœ… Python code to execute

Script Requirements:

  • āœ… Define and call a main() function
  • āœ… Use send_status("message") for progress updates
  • āœ… Use bpy.data.* APIs (not bpy.ops.*)
  • āŒ No infinite loops or blocking operations

Example:

import bpy

def main():
    send_status("Creating cube...")
    mesh = bpy.data.meshes.new("Cube")
    obj = bpy.data.objects.new("Cube", mesh)
    bpy.context.collection.objects.link(obj)
    
    import bmesh
    bm = bmesh.new()
    bmesh.ops.create_cube(bm, size=2.0)
    bm.to_mesh(mesh)
    bm.free()
    
    send_status("Done!")

main()

get_blender_scene

Query the current Blender scene.

Response:

{
  "objects": [
    {"name": "Cube", "type": "MESH"},
    {"name": "Camera", "type": "CAMERA"}
  ],
  "meshes": ["Cube"],
  "materials": ["Material"],
  "collections": ["Collection"]
}

šŸ“ Project Structure

Blender-MCP-antigravity/
ā”œā”€ā”€ antigravity_blender_server.py   # MCP server (AI client interface)
ā”œā”€ā”€ blender_server.py               # TCP server (runs in Blender)
ā”œā”€ā”€ antigravity_blender_addon.py    # Blender UI addon (optional)
ā”œā”€ā”€ run_via_bridge.py               # Standalone script runner
ā”œā”€ā”€ generate_island.py              # Example: procedural island
ā”œā”€ā”€ create_island_from_image.py     # Example: island from reference
ā”œā”€ā”€ requirements.txt                # Dependencies
ā”œā”€ā”€ pyproject.toml                  # Package config
└── README.md

šŸ”§ Troubleshooting

Connection Refused

# Ensure Blender is running with the server
"C:\Program Files\Blender Foundation\Blender 4.2\blender.exe" --background --python blender_server.py

# Check if port 8081 is in use
netstat -an | findstr 8081   # Windows
lsof -i :8081                # Linux/Mac

Timeout Errors

  1. Check Blender's console for Python errors
  2. Ensure main() is called at the end of your script
  3. Add send_status() calls for long operations
  4. Avoid blocking calls or infinite loops

Port Already in Use

# Kill existing Blender processes
taskkill /F /IM blender.exe     # Windows
pkill blender                    # Linux/Mac

šŸŽÆ Examples

Run the Island Generator

# Activate venv first
.\venv\Scripts\activate

# Run example script
python run_via_bridge.py generate_island.py

Interactive Mode (View Output)

# Start Blender with GUI
"C:\Program Files\Blender Foundation\Blender 4.2\blender.exe" --python blender_server.py

# Then run scripts via bridge
python run_via_bridge.py your_script.py

šŸ¤ Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push: git push origin feature/amazing-feature
  5. Open a Pull Request

šŸ“„ License

MIT License - see LICENSE for details.


šŸ”— Links


<p align="center"> Made with <a href="https://github.com/MITHRAN-BALACHANDER">Mithran Balachander</a> </p>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured