Community plugin to control Blender 3D with any LLM of your choice
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 7 个月前 | ||
| 1 个月前 | ||
| 1 年前 | ||
| 1 个月前 | ||
| 1 个月前 | ||
| 1 个月前 |
BlenderMCP 通过 Model Context Protocol 将 Blender 3D 与 Claude AI(以及其他任何 LLM)相连接。它支持通过提示词驱动 3D 建模、场景创建和实时对象操控 — 直接通过您的 AI 助手实现。
目录
功能特性
| 功能 | 描述 | |
|---|---|---|
| 🔁 | 双向通信 | Claude 与 Blender 之间的实时 socket 桥接 |
| 🧊 | 对象操作 | 通过提示词创建、移动、缩放和删除 3D 对象 |
| 🎨 | 材质控制 | 应用、修改和生成材质与颜色 |
| 🔍 | 场景检查 | 完整场景状态 — 包含对象、灯光、相机 |
| 📷 | 视口截图 | 让 AI 能够查看 Blender 视口内容 |
| 🐍 | 代码执行 | 在 Blender 内部运行任意 Python 代码 |
| 🌍 | Poly Haven | 通过 API 下载 HDRI、纹理和模型 |
| 🤖 | AI 模型生成 | 通过 Hyper3D Rodin 和 Hunyuan3D 生成 3D 资产 |
| 🗂️ | Sketchfab | 搜索并导入 3D 模型 |
| 🌐 | 远程主机 | 在远程机器上运行 MCP 服务器 |
更新内容
完整更新日志:Releases
- Hunyuan3D 3D 模型生成
- 用于场景理解的视口截图功能
- Sketchfab 模型搜索与导入
- Poly Haven 资源集成
- Hyper3D Rodin AI 模型生成
- 远程主机支持
从旧版本更新:
- 下载最新的
addon.py并替换 Blender 中的旧文件 - 在客户端配置中移除并重新添加 MCP 服务器
快速入门
# macOS
brew install uv
添加到 Claude > 设置 > 开发者 > 编辑配置 > claude_desktop_config.json:
{
"mcpServers": {
"blender": {
"command": "uvx",
"args": ["blender-mcp"]
}
}
}
安装 Blender 插件,点击 连接,然后开始输入提示词。
安装
前提条件
| 要求 | 最低版本 |
|---|---|
| Blender | 3.0 |
| Python | 3.10 |
| uv | 最新版 |
安装 uv:
macOS
brew install uv
Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
添加到 PATH(之后重启您的客户端):
$localBin = "$env:USERPROFILE\.local\bin"
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$userPath;$localBin", "User")
Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
请勿使用
pip install uv— 这可能无法创建uvx命令。
客户端未找到 uvx
GUI 客户端不会继承终端的 PATH。请获取完整路径:
- 在 macOS/Linux 上使用
which uvx,在 Windows 上使用where uvx - 在配置中将其用作
"command" - Windows 系统:
"command": "cmd", "args": ["/c", "uvx", "blender-mcp"] - 修改配置后,请完全退出并重新启动客户端
Apple Silicon(M1/M2/M3/M4)架构不匹配
如果在 arm64 架构的 Mac 上,uvx 尝试为 x86_64 架构进行构建(出现 cryptography wheel 错误),请强制使用 arm64 架构的 Python:
"args": ["--python", "3.11-aarch64", "blender-mcp"]
Docker / WSL / 远程主机
Blender 必须监听 MCP 进程能够访问的位置:
"env": {
"BLENDER_HOST": "host.docker.internal",
"BLENDER_PORT": "9876"
}
在 WSL2 中与 Windows Blender 通信时,请尝试使用 BLENDER_HOST=127.0.0.1 或你的 Windows 主机 IP。截图将以 base64 格式返回(无需共享临时路径)。
Blender 版本
支持 Blender 3.0 及更高版本;推荐使用 4.x / 5.x。请使用常规的 GUI Blender 会话(而非 blender -b 后台模式),以确保 MCP 套接字和视口工具正常工作。
Claude 桌面版
Claude > 设置 > 开发者 > 编辑配置 > claude_desktop_config.json:
{
"mcpServers": {
"blender": {
"command": "uvx",
"args": ["blender-mcp"]
}
}
}
固定 Python 3.11 版本(conda / pyenv 环境)
{
"mcpServers": {
"blender": {
"command": "uvx",
"args": ["--python", "3.11", "blender-mcp"],
"env": { "UV_PYTHON_PREFERENCE": "only-managed" }
}
}
}
无 uv 安装
pipx install blender-mcp
pipx ensurepath
光标
macOS / Linux
{
"mcpServers": {
"blender": {
"command": "uvx",
"args": ["blender-mcp"]
}
}
}
Windows
{
"mcpServers": {
"blender": {
"command": "cmd",
"args": ["/c", "uvx", "blender-mcp"]
}
}
}
一次仅运行一个 MCP 服务器 —— 可以是 Cursor 或 Claude 桌面版,但不能同时运行两者。
VS Code
{
"mcpServers": {
"blender": {
"command": "uvx",
"args": ["blender-mcp"]
}
}
}
开放代码
{
"mcp": {
"blender-mcp": {
"type": "local",
"command": ["uvx", "blender-mcp"],
"enabled": true,
"environment": {
"BLENDER_HOST": "localhost",
"BLENDER_PORT": "9876"
}
}
}
}
Claude 代码命令行界面
claude mcp add blender uvx blender-mcp
Blender 插件
- 下载
addon.py - 在 Blender 中:编辑 > 偏好设置 > 插件 > 安装...
- 选择
addon.py - 启用 "界面:Blender MCP"
使用方法
建立连接

- 打开 3D 视图侧边栏(若未显示,按
N键) - 进入 BlenderMCP 选项卡
- (可选)启用 Poly Haven 以进行资源下载
- 点击 连接到 Claude
连接成功后,Claude 会显示锤子图标,确认 Blender 工具已激活:
![]()
示例提示词
| 提示词 | 演示 |
|---|---|
| "创建一个低多边形地牢,里面有一条龙守护着黄金" | 观看 |
| "使用 Poly Haven HDRI、岩石和植被创建海滩场景" | 观看 |
| "将此参考图像重建为 Blender 场景" | 观看 |
| "导出场景并从中构建 Three.js 草图" | 观看 |
| "用 Hyper3D 生成一个花园地精" | — |
| "把这辆车改成红色金属材质" | — |
| "工作室灯光,等轴测相机" | — |
集成功能
Poly Haven
下载 HDRI、纹理和 3D 模型。在 BlenderMCP 侧边栏中启用。
Hyper3D Rodin
AI 3D 模型。免费试用有每日限制 — 可在 hyper3d.ai 或 fal.ai 获取您自己的密钥。
混元3D(Hunyuan3D)
腾讯 3D 生成。在 Blender 插件偏好设置中配置凭证。
Sketchfab
搜索并将 3D 模型导入您的场景。
API 凭证
在 编辑 > 偏好设置 > 插件 > Blender MCP 中存储,以便在重启后保持:
| 凭证 | 环境变量 |
|---|---|
| Sketchfab API 密钥 | BLENDERMCP_SKETCHFAB_API_KEY |
| Hyper3D API 密钥 | BLENDERMCP_HYPER3D_API_KEY |
| 混元3D SecretId | BLENDERMCP_HUNYUAN3D_SECRET_ID |
| 混元3D SecretKey | BLENDERMCP_HUNYUAN3D_SECRET_KEY |
| 混元3D API URL | BLENDERMCP_HUNYUAN3D_API_URL |
export BLENDER_HOST=localhost
export BLENDER_PORT=9876
故障排除
连接问题
- 确认 BlenderMCP 侧边栏中的插件服务器正在运行
- 不要手动运行
uvx— 客户端会启动服务器 - 第一条命令通常会失败;请重试
spawn uvx ENOENT
which uvx # macOS / Linux
where uvx # Windows
在配置中将该完整路径用作 "command"。
超时 / 复杂操作
将请求拆分为更小的顺序提示。
Python 版本冲突
"args": ["--python", "3.11", "blender-mcp"],
"env": { "UV_PYTHON_PREFERENCE": "only-managed" }
清除缓存:uv cache clean blender-mcp && uvx --refresh blender-mcp
仍然无法运行?
重启您的 MCP 客户端和 Blender 服务器。
技术详情
LLM Client <-- MCP --> MCP Server (src/blender_mcp/server.py) <-- TCP:9876 --> Blender Addon (addon.py)
TCP 套接字上的 JSON:
{ "type": "create_object", "params": { "type": "SPHERE", "name": "Ball" } }
{ "status": "success", "result": { "name": "Ball", "location": [0, 0, 0] } }
安全性与遥测
execute_blender_code会在 Blender 中运行任意 Python 代码。使用前请保存您的工作。
为帮助改进项目,可能会发送可选的匿名使用统计数据(工具名称、成功状态/持续时间、版本/平台)。详细信息(提示词/代码/截图)需要勾选插件隐私复选框。上传前会剥离类似凭据的字符串。
完全禁用方法:
BLENDER_MCP_DISABLE_TELEMETRY=true uvx blender-mcp
或者在客户端配置中:"env": { "BLENDER_MCP_DISABLE_TELEMETRY": "true" }
在 Blender 中:编辑 → 偏好设置 → 插件 → Blender MCP → 遥测复选框。
贡献者
使用 contrib.rocks 制作
社区
| 💬 Discord | 加入社区 |
| 📝 反馈 | 分享您的想法 |
| 📞 通话 | 安排通话 |
| 🐛 问题 | GitHub Issues |
| 💖 赞助 | 支持 BlenderMCP |
支持者: CodeRabbit
贡献指南
- Fork 本仓库
- 创建分支:
git checkout -b feature/your-feature - 提交并创建 PR
详见 CONTRIBUTING.md 和 TERMS_AND_CONDITIONS.md。
许可证
MIT — 详见 LICENSE。
星标历史
MCPBlender · blendermcp.org · 与 Blender 基金会无关联
⭐ 如果本项目对您的工作流程有帮助,请为仓库点亮星标!