Blender MCP Link
Enables interactive control of Blender for 3D scene manipulation, geometry creation, material application, and viewport rendering via natural language prompts through the Model Context Protocol.
README
🚀 Blender MCP Link
An extremely robust, production-grade Model Context Protocol (MCP) server that establishes a live, interactive two-way connection with your active Blender session. Control 3D scenes, construct geometry, modify shaders, and render viewports—all directly using natural language prompts via your favorite AI assistants (such as Antigravity, Claude Desktop, Cursor, or VS Code).
🌟 Key Features
- 🐍 Main-Thread Safe Execution: Runs a background socket server in a thread and safely passes actions to Blender’s main thread via a queue and timer loop, avoiding critical API-related crashes.
- 📦 Complete Scene Inventory: Exposes structured details of all collections, geometry, cameras, point lights, dimensions, parent hierarchies, and applied materials.
- 🛠️ High-Level Mesh Generator: Create mesh primitives (Cubes, Spheres, Cylinders, Cones, Planes, Toruses) directly with customizable scale, names, and coordinates.
- 🎨 Shader & Material Control: Apply beautiful Principal BSDF materials dynamically with custom Hex color codes, roughness, metallic, and shader node linking.
- 📸 Real-time Viewport Render: Instantly trigger background renders using Blender’s EEVEE engine to see updates directly in your chat screen.
🏗️ Architecture Design
Unlike naive implementations that attempt to invoke the Blender API (bpy) from secondary socket threads (which causes immediate memory access violation crashes), Blender MCP Link employs a thread-safe Message-Queue architecture:
graph TD
subgraph AI Client
LLM[AI Client / Claude / Cursor]
end
subgraph MCP Server [Local CLI Process]
FastMCP[FastMCP Server]
SocketClient[TCP Socket Client]
end
subgraph Blender Session [Active Blender 5.1 GUI]
SocketServer[Background TCP Server Thread]
Queue[Thread-Safe Task Queue]
Timer[Blender App Timer Loop - Main Thread]
bpy[Blender Python API]
end
LLM <-->|Model Context Protocol| FastMCP
FastMCP <-->|Function Calls| SocketClient
SocketClient <-->|TCP Port 5555| SocketServer
SocketServer -->|1. Enqueue Script| Queue
Timer -->|2. Dequeue Script| Queue
Timer -->|3. Run Script| bpy
bpy -->|4. Return Output/Log| Timer
Timer -->|5. Send Response| SocketServer
SocketServer -->|6. Return JSON| SocketClient
⚡ Quick Start Setup
Step 1: Install the Blender Addon
- Open your Blender application.
- Download or copy the
addon.pyfile to a location on your computer. - In Blender, open Edit > Preferences > Add-ons.
- Click Install... in the top-right corner of the Add-on menu.
- Select
addon.pyand click Install Add-on. - Check the box next to Development: Blender MCP Link Server to enable it.
- Open the 3D Viewport sidebar (press
Non your keyboard) and navigate to the MCP Link tab. - Click Start Server. You will see the status change to "Running" (listening on
127.0.0.1:5555).
Step 2: Configure the MCP Server in your LLM Client
Ensure you have the ultra-fast Python package manager uv installed. If not, get it from astral.sh/uv.
For Claude Desktop
Add this to your claude_desktop_config.json (typically located in %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"blender-mcp-link": {
"command": "uv",
"args": [
"run",
"--directory",
"D:\\03_Projects\\AI_Projects\\Competitions\\Robotex\\blender-mcp-link",
"server.py"
]
}
}
}
For Cursor / VS Code (Cline / Roo Code)
Add a new MCP server with the following settings:
- Name:
BlenderMCP - Type:
command - Command:
uv run --directory "D:\03_Projects\AI_Projects\Competitions\Robotex\blender-mcp-link" server.py
🛠️ Expose Tools Reference
Once connected, the AI will have access to the following tools:
1. get_scene_inventory
- Purpose: Queries the Blender scene and returns structured information about all assets.
- Returns: JSON string including collections, cameras, lights, meshes, face counts, scales, and parents.
2. execute_script(code: str)
- Purpose: Runs arbitrary Blender Python code in the main execution thread.
- Returns: Captures
stdout(prints) andstderr(exceptions and tracebacks) and returns them as a clean string.
3. create_mesh_primitive(type: str, name: str, location: list, scale: list)
- Purpose: Generates high-quality shapes without writing raw Python code.
- Valid Types:
CUBE,SPHERE,CYLINDER,CONE,TORUS,PLANE.
4. apply_principled_material(object_name: str, color_hex: str, roughness: float, metallic: float)
- Purpose: Quick creation and binding of standard nodes-based BSDF materials to meshes.
5. render_viewport(output_path: str)
- Purpose: Renders the scene from the active camera view and outputs a high-resolution PNG image.
🛡️ License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
We welcome issues, feature requests, and pull requests! For major changes, please open an issue first to discuss what you would like to change.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。