Blender MCP 服务

Blender MCP 是一款隐私保护的服务端工具,通过模型上下文协议将 Blender 与 Claude、Cursor 等 AI 助手连接,支持对象和材质操作、场景查看、视口截图及 Python 代码执行,适用于 AI 辅助 3D 建模与场景自动化。

  • by 5t3w3
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 5t3w3/blender-mcp-slim

使用说明

Blender MCP slim – Model Context Protocol server for Blender and LLMs

MCP here means the Model Context Protocol (tooling for AI assistants such as Claude or Cursor) — not “Master Control Panel”.

This is a privacy-focused fork with core MCP functionality only of BlenderMCP by Siddharth Ahuja.

What was removed:

  • All telemetry and data collection
  • Poly Haven integration
  • Sketchfab integration
  • Hyper3D Rodin integration
  • Hunyuan3D / Tencent integration
  • Terms and Conditions (no longer applicable since no data is collected)

What remains is the core MCP functionality: connecting Blender to any AI assistant that supports the Model Context Protocol.

Features

  • Two-way communication: Connect AI assistants 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
  • Viewport screenshots: Capture the 3D viewport for visual context
  • Code execution: Run arbitrary Python code in Blender from the AI assistant

Components

  1. Blender Addon (addon.py): Creates a socket server within Blender to receive and execute commands
  2. MCP Server (src/blender_mcp/server.py): Implements the Model Context Protocol and connects to the Blender addon

Installation

Prerequisites

  • Blender 3.0 or newer
  • Python 3.11 or newer
  • uv package manager
  • git (the server is installed directly from this GitHub repository)

macOS:

brew install uv

Windows:

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

Then add uv to the user PATH (restart your IDE afterwards):

$localBin = "$env:USERPROFILE\.local\bin"
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$userPath;$localBin", "User")

Full installation instructions: Install uv

Environment Variables

  • BLENDER_HOST: Host address for Blender socket server (default: localhost)
  • BLENDER_PORT: Port number for Blender socket server (default: 9876)

Running from the GitHub repository

This fork is not published on PyPI. Every example below installs the server directly from this GitHub repository using --from git+https://github.com/5t3w3/blender-mcp-slim.git, so uvx always runs the latest main. git must be installed and the machine needs network access to GitHub.

To force uv to rebuild/re-fetch after an update, add --refresh right after uvx.

Claude Desktop

Go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json:

{
    "mcpServers": {
        "blender": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/5t3w3/blender-mcp-slim.git",
                "blender-mcp-slim"
            ]
        }
    }
}

Cursor

macOS - Settings > MCP, add:

{
    "mcpServers": {
        "blender": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/5t3w3/blender-mcp-slim.git",
                "blender-mcp-slim"
            ]
        }
    }
}

Windows - Settings > MCP > Add Server:

{
    "mcpServers": {
        "blender": {
            "command": "cmd",
            "args": [
                "/c",
                "uvx",
                "--from",
                "git+https://github.com/5t3w3/blender-mcp-slim.git",
                "blender-mcp-slim"
            ]
        }
    }
}

Only run one instance of the MCP server (either on Cursor or Claude Desktop), not both.

Installing the Blender Addon

  1. Download the addon.py file from this repo
  2. Open Blender
  3. Go to Edit > Preferences > Add-ons
  4. Click "Install..." and select the addon.py file
  5. Enable the addon by checking the box next to "Interface: Blender MCP"

Usage

  1. In Blender, open the 3D View sidebar (press N if not visible)
  2. Find the "BlenderMCP" tab
  3. Click "Connect to MCP server"
  4. Make sure the MCP server is configured in your AI assistant

Example Commands

  • "Create a red metallic sphere above the cube"
  • "Get information about the current scene"
  • "Make the lighting like a studio setup"
  • "Point the camera at the scene and make it isometric"
  • "Create a low-poly landscape"

Communication Protocol

The system uses a JSON-based protocol over TCP sockets:

  • Commands are sent as JSON objects with a type and optional params
  • Responses are JSON objects with a status and result or message

Security Considerations

  • The execute_blender_code tool allows running arbitrary Python code in Blender. Always save your work before using it.
  • Complex operations might need to be broken down into smaller steps.

Dependencies

This server uses the official MCP Python SDK v2 (mcp>=2,<3).

  • The mcp package pulls in an HTTP/auth stack (starlette, uvicorn, httpx2, pyjwt[crypto]) that a stdio-only server does not use.
  • opentelemetry-api is a transitive dependency in v2. No exporter is configured, so it is inert and no telemetry is sent. To be strict, no exporter should ever be configured for this server.
  • The mcp[cli] extra (typer, rich, python-dotenv) is intentionally not installed: this project runs mcp.run() directly and does not use the mcp dev / mcp install CLI.

License

This project is licensed under the MIT License. See LICENSE for details.

Original project Copyright (c) 2025 Siddharth Ahuja.

Acknowledgements

This is a fork of BlenderMCP by Siddharth Ahuja. All credit for the original architecture and implementation goes to the original author.