BlenderMCP

BlenderMCP

Connects Claude AI to Blender through the Model Context Protocol, enabling AI-assisted 3D modeling, scene creation, object manipulation, and material control. Supports downloading assets from Poly Haven and generating 3D models through Hyper3D Rodin.

Category
访问服务器

README

Blender MCP (Model Context Protocol)

A Blender addon that enables AI assistants (like Claude) to interact with Blender through the Model Context Protocol (MCP).

Installation

1. Install the Blender Addon

  1. Download or clone this repository

  2. Copy the entire src/blender_mcp/addon/ directory to your Blender addons folder:

    • Windows: %APPDATA%\Blender Foundation\Blender\4.x\scripts\addons\
    • macOS: ~/Library/Application Support/Blender/4.x/scripts/addons/
    • Linux: ~/.config/blender/4.x/scripts/addons/
  3. Rename the copied directory from addon to blender_mcp

  4. Open Blender and go to Edit > Preferences > Add-ons

  5. Search for "Blender MCP" and enable the addon

2. Install the MCP Server

The MCP server runs outside Blender and communicates with it via sockets.

  1. Install Python dependencies:

    pip install mcp-server-fastmcp
    
  2. Or if using the provided virtual environment:

    # Activate the virtual environment
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
    # Install dependencies
    pip install -r requirements.txt
    

3. Configure Your MCP Client

Add the Blender MCP server to your MCP client configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "blender": {
      "command": "python",
      "args": ["-m", "blender_mcp.server"],
      "env": {
        "BLENDER_HOST": "localhost",
        "BLENDER_PORT": "9876"
      }
    }
  }
}

Usage

  1. Start Blender and enable the Blender MCP addon
  2. Start your MCP client (Claude Desktop, etc.) with the server configured
  3. In Blender, click the "Connect to MCP server" button in the BlenderMCP panel (N-panel > BlenderMCP)
  4. Use Claude to interact with Blender through natural language commands

Features

Core Tools

  • Scene Information: Get details about objects, materials, and scene structure
  • Object Manipulation: Query and modify 3D objects
  • Viewport Screenshots: Capture Blender's 3D viewport
  • Code Execution: Run Python code directly in Blender

Template Engine

  • Template Management: Create, save, and reuse complex operations
  • Dynamic Overrides: Apply templates with parameter modifications
  • Template Search: Discover templates by tags and categories
  • Usage Analytics: Track template performance and success rates
  • Version Control: Optional Git versioning for template evolution

Asset Integrations

  • PolyHaven: Download HDRIs, textures, and 3D models
  • Sketchfab: Search and download 3D models
  • Hyper3D Rodin: Generate 3D models from text or images

Configuration

Blender Addon Settings

  • Port: Socket port for communication (default: 9876)
  • PolyHaven: Enable/disable PolyHaven integration
  • Hyper3D: Configure API keys and modes
  • Sketchfab: Configure API key for model downloads

Environment Variables

  • BLENDER_HOST: Host address (default: localhost)
  • BLENDER_PORT: Port number (default: 9876)

Architecture

The system consists of two main components:

  1. Blender Addon (src/blender_mcp/addon/): Runs inside Blender, handles UI and executes Blender operations
  2. MCP Server (src/blender_mcp/server/): Runs outside Blender, provides MCP tools and manages communication

Development

Project Structure

src/blender_mcp/
├── addon/              # Blender addon code
│   ├── handlers.py     # Base command handlers
│   ├── polyhaven_handlers.py  # PolyHaven integration
│   ├── hyper3d_handlers.py    # Hyper3D integration
│   ├── sketchfab_handlers.py  # Sketchfab integration
│   ├── ui.py           # Blender UI components
│   ├── server.py       # Socket server for addon
│   └── __main__.py     # Addon registration
└── server/             # MCP server code
    ├── connection.py   # MCP server and socket client
    ├── tools.py        # Core Blender tools
    ├── integrations.py # Integration tools
    ├── template_engine.py     # Template storage and management
    ├── template_tools.py      # MCP tools for templates
    ├── prompts.py      # MCP prompts
    └── __main__.py     # Server entry point
templates/              # Template storage directory
├── template_name.json  # Template definitions
└── analytics.json      # Usage statistics

Running Tests

# Test server modules
python -m pytest tests/

# Or manually test imports
python -c "from src.blender_mcp.server.connection import mcp; print('OK')"

Troubleshooting

Connection Issues

  • Ensure the Blender addon is enabled and running
  • Check that the port numbers match between client and server
  • Verify firewall settings allow socket connections

Integration Issues

  • Check API keys are properly configured in Blender
  • Ensure internet connectivity for external services
  • Review Blender console for error messages

Performance

  • Large scenes may take time to process
  • Asset downloads depend on internet speed
  • 3D generation can take several minutes

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

See LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选