首页
学习
活动
专区
圈层
工具
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
首页
学习
活动
专区
圈层
工具
MCP广场
MCP广场 >详情页
blender-mcp云托管模式2025-06-178分享
github
BlenderMCP通过模型上下文协议(MCP)将Blender与Claude AI连接起来,使Claude能够直接与Blender进行交互和控制。这一集成实现了提示辅助的3D建模、场景创建和操作。
By ahujasid
2025-06-178
github
详情内容

BlenderMCP - Blender 模型上下文协议集成

BlenderMCP 通过模型上下文协议(MCP)将 Blender 与 Claude AI 连接,使 Claude 能够直接与 Blender 交互并控制它。该集成支持通过提示辅助进行 3D 建模、场景创建和操作。

完整教程

加入社区

提供反馈、获取灵感并在 MCP 基础上进行构建:Discord

支持者

顶级支持者:

CodeRabbit

所有支持者:

支持此项目

发布说明 (1.2.0)

  • 查看 Blender 视口的截图以更好地理解场景
  • 搜索并下载 Sketchfab 模型

之前添加的功能:

  • 通过 Poly Haven API 支持 Poly Haven 资产
  • 支持使用 Hyper3D Rodin 生成 3D 模型
  • 对于新用户,可以直接跳转到安装部分。对于现有用户,请查看以下内容
  • 下载最新的 addon.py 文件并替换旧文件,然后将其添加到 Blender 中
  • 从 Claude 中删除 MCP 服务器并重新添加,然后就可以正常使用了!

功能

  • 双向通信:通过基于套接字的服务器将 Claude AI 连接到 Blender
  • 对象操作:在 Blender 中创建、修改和删除 3D 对象
  • 材质控制:应用和修改材质和颜色
  • 场景检查:获取当前 Blender 场景的详细信息
  • 代码执行:从 Claude 在 Blender 中运行任意 Python 代码

组件

系统由两个主要组件组成:

  1. Blender 插件 (addon.py):一个在 Blender 中创建套接字服务器以接收和执行命令的 Blender 插件
  2. MCP 服务器 (src/blender_mcp/server.py):一个实现模型上下文协议并连接到 Blender 插件的 Python 服务器

安装

先决条件

  • Blender 3.0 或更新版本
  • Python 3.10 或更新版本
  • uv 包管理器:

如果您在 Mac 上,请安装 uv 如下:

brew install uv

在 Windows 上

powershell -c "irm https://astral.sh/uv/install.ps1 | iex" 

然后

set Path=C:\Users\nntra\.local\bin;%Path%

否则,安装说明请访问他们的网站:安装 uv

⚠️ 在安装 UV 之前不要继续

Claude 桌面集成

观看设置说明视频(假设您已经安装了 uv)

转到 Claude > 设置 > 开发者 > 编辑配置 > claude_desktop_config.json 并包含以下内容:

{
    "mcpServers": {
        "blender": {
            "command": "uvx",
            "args": [
                "blender-mcp"
            ]
        }
    }
}

Cursor 集成

对于 Mac 用户,转到设置 > MCP 并粘贴以下内容

  • 要将其用作全局服务器,请使用“添加新的全局 MCP 服务器”按钮并粘贴
  • 要将其用作项目特定服务器,请在项目根目录中创建 .cursor/mcp.json 并粘贴
{
    "mcpServers": {
        "blender": {
            "command": "uvx",
            "args": [
                "blender-mcp"
            ]
        }
    }
}

对于 Windows 用户,转到设置 > MCP > 添加服务器,使用以下设置添加新服务器:

{
    "mcpServers": {
        "blender": {
            "command": "cmd",
            "args": [
                "/c",
                "uvx",
                "blender-mcp"
            ]
        }
    }
}

Cursor 设置视频

⚠️ 只运行一个 MCP 服务器实例(在 Cursor 或 Claude Desktop 上),不要同时运行两者

安装 Blender 插件

  1. 从此仓库下载 addon.py 文件
  2. 打开 Blender
  3. 转到编辑 > 首选项 > 插件
  4. 点击“安装...”并选择 addon.py 文件
  5. 通过勾选“界面:Blender MCP”旁边的复选框来启用插件

使用

启动连接

BlenderMCP 在侧边栏中

  1. 在 Blender 中,转到 3D 视图侧边栏(如果不可见,请按 N)
  2. 找到“BlenderMCP”选项卡
  3. 如果您想从他们的 API 获取资产,请打开 Poly Haven 复选框(可选)
  4. 点击“连接到 Claude”
  5. 确保 MCP 服务器在您的终端中运行

与 Claude 一起使用

一旦在 Claude 上设置了配置文件,并且在 Blender 上运行了插件,您将看到一个带有 Blender MCP 工具的锤子图标。

BlenderMCP 在侧边栏中

功能

  • 获取场景和对象信息
  • 创建、删除和修改形状
  • 为对象应用或创建材质
  • 在 Blender 中执行任何 Python 代码
  • 通过 Poly Haven 下载正确的模型、资产和 HDRIs
  • 通过 Hyper3D Rodin 生成 AI 生成的 3D 模型

示例命令

以下是一些您可以要求 Claude 执行的示例命令:

  • “在地牢中创建一个低多边形场景,有一条龙守护着一罐金子” 演示
  • “使用 HDRIs、纹理和来自 Poly Haven 的岩石和植被模型创建一个海滩氛围” 演示
  • 提供参考图像,并从中创建一个 Blender 场景 演示
  • “通过 Hyper3D 生成一个花园侏儒的 3D 模型”
  • “获取当前场景的信息,并从中制作一个 threejs 草图” 演示
  • “将这辆车变成红色并带有金属质感”
  • “创建一个球体并将其放置在立方体上方”
  • “让灯光像工作室一样”
  • “将相机对准场景,并使其成为等距视图”

Hyper3D 集成

Hyper3D 的免费试用密钥允许您每天生成有限数量的模型。如果达到每日限制,您可以等待第二天的重置,或者从 hyper3d.ai 和 fal.ai 获取您自己的密钥。

故障排除

  • 连接问题:确保 Blender 插件服务器正在运行,并且 MCP 服务器已在 Claude 上配置,不要在终端中运行 uvx 命令。有时,第一个命令可能无法通过,但之后它就会开始工作。
  • 超时错误:尝试简化您的请求或将其分解为更小的步骤
  • Poly Haven 集成:Claude 有时行为不稳定
  • 您是否尝试过关闭并重新打开它?:如果您仍然遇到连接错误,请尝试重新启动 Claude 和 Blender 服务器

技术细节

通信协议

系统使用基于 JSON 的简单协议通过 TCP 套接字进行通信:

  • 命令作为带有 type 和可选 params 的 JSON 对象发送
  • 响应作为带有 statusresultmessage 的 JSON 对象返回

限制和安全注意事项

  • execute_blender_code 工具允许在 Blender 中运行任意 Python 代码,这可能非常强大但也可能很危险。在生产环境中使用时要小心。在使用它之前,始终保存您的工作。
  • Poly Haven 需要下载模型、纹理和 HDRI 图像。如果您不想使用它,请在 Blender 中关闭复选框。
  • 复杂的操作可能需要分解为更小的步骤

贡献

欢迎贡献!请随时提交拉取请求。

免责声明

这是第三方集成,并非由 Blender 制作。由 Siddharth 制作

通过SSE URL连接服务
Server已在腾讯云托管,可在连接后免费调用和在线进行工具测试~
工具测试
已支持Server下的17个工具,可选择工具进行在线测试
download_polyhaven_asset
Download and import a Polyhaven asset into Blender. Parameters: - asset_id: The ID of the asset to download - asset_type: The type of asset (hdris, textures, models) - resolution: The resolution to download (e.g., 1k, 2k, 4k) - file_format: Optional file format (e.g., hdr, exr for HDRIs; jpg, png for textures; gltf, fbx for models) Returns a message indicating success or failure.
download_sketchfab_model
Download and import a Sketchfab model by its UID. Parameters: - uid: The unique identifier of the Sketchfab model Returns a message indicating success or failure. The model must be downloadable and you must have proper access rights.
execute_blender_code
Execute arbitrary Python code in Blender. Make sure to do it step-by-step by breaking it into smaller chunks. Parameters: - code: The Python code to execute
generate_hyper3d_model_via_images
Generate 3D asset using Hyper3D by giving images of the wanted asset, and import the generated asset into Blender. The 3D asset has built-in materials. The generated model has a normalized size, so re-scaling after generation can be useful. Parameters: - input_image_paths: The **absolute** paths of input images. Even if only one image is provided, wrap it into a list. Required if Hyper3D Rodin in MAIN_SITE mode. - input_image_urls: The URLs of input images. Even if only one image is provided, wrap it into a list. Required if Hyper3D Rodin in FAL_AI mode. - bbox_condition: Optional. If given, it has to be a list of ints of length 3. Controls the ratio between [Length, Width, Height] of the model. Only one of {input_image_paths, input_image_urls} should be given at a time, depending on the Hyper3D Rodin's current mode. Returns a message indicating success or failure.
generate_hyper3d_model_via_text
Generate 3D asset using Hyper3D by giving description of the desired asset, and import the asset into Blender. The 3D asset has built-in materials. The generated model has a normalized size, so re-scaling after generation can be useful. Parameters: - text_prompt: A short description of the desired model in **English**. - bbox_condition: Optional. If given, it has to be a list of floats of length 3. Controls the ratio between [Length, Width, Height] of the model. Returns a message indicating success or failure.
get_hyper3d_status
Check if Hyper3D Rodin integration is enabled in Blender. Returns a message indicating whether Hyper3D Rodin features are available. Don't emphasize the key type in the returned message, but sliently remember it.
get_object_info
Get detailed information about a specific object in the Blender scene. Parameters: - object_name: The name of the object to get information about
get_polyhaven_categories
Get a list of categories for a specific asset type on Polyhaven. Parameters: - asset_type: The type of asset to get categories for (hdris, textures, models, all)
get_polyhaven_status
Check if PolyHaven integration is enabled in Blender. Returns a message indicating whether PolyHaven features are available.
get_scene_info
Get detailed information about the current Blender scene
get_sketchfab_status
Check if Sketchfab integration is enabled in Blender. Returns a message indicating whether Sketchfab features are available.
get_viewport_screenshot
Capture a screenshot of the current Blender 3D viewport. Parameters: - max_size: Maximum size in pixels for the largest dimension (default: 800) Returns the screenshot as an Image.
import_generated_asset
Import the asset generated by Hyper3D Rodin after the generation task is completed. Parameters: - name: The name of the object in scene - task_uuid: For Hyper3D Rodin mode MAIN_SITE: The task_uuid given in the generate model step. - request_id: For Hyper3D Rodin mode FAL_AI: The request_id given in the generate model step. Only give one of {task_uuid, request_id} based on the Hyper3D Rodin Mode! Return if the asset has been imported successfully.
poll_rodin_job_status
Check if the Hyper3D Rodin generation task is completed. For Hyper3D Rodin mode MAIN_SITE: Parameters: - subscription_key: The subscription_key given in the generate model step. Returns a list of status. The task is done if all status are "Done". If "Failed" showed up, the generating process failed. This is a polling API, so only proceed if the status are finally determined ("Done" or "Canceled"). For Hyper3D Rodin mode FAL_AI: Parameters: - request_id: The request_id given in the generate model step. Returns the generation task status. The task is done if status is "COMPLETED". The task is in progress if status is "IN_PROGRESS". If status other than "COMPLETED", "IN_PROGRESS", "IN_QUEUE" showed up, the generating process might be failed. This is a polling API, so only proceed if the status are finally determined ("COMPLETED" or some failed state).
search_polyhaven_assets
Search for assets on Polyhaven with optional filtering. Parameters: - asset_type: Type of assets to search for (hdris, textures, models, all) - categories: Optional comma-separated list of categories to filter by Returns a list of matching assets with basic information.
search_sketchfab_models
Search for models on Sketchfab with optional filtering. Parameters: - query: Text to search for - categories: Optional comma-separated list of categories - count: Maximum number of results to return (default 20) - downloadable: Whether to include only downloadable models (default True) Returns a formatted list of matching models.
set_texture
Apply a previously downloaded Polyhaven texture to an object. Parameters: - object_name: Name of the object to apply the texture to - texture_id: ID of the Polyhaven texture to apply (must be downloaded first) Returns a message indicating success or failure.
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档