Blender MCP Server

Blender MCP Server

Exposes 50+ Blender tools (object manipulation, materials, animation, etc.) via MCP for AI-driven 3D workflows and automation.

Category
访问服务器

README

Blender MCP Server

Model Context Protocol (MCP) server for complete Blender control via API

This addon transforms Blender into an MCP server, exposing 50+ powerful tools that can be orchestrated by AI agents through HTTP endpoints. Perfect for AI-driven 3D workflows, automation, and creative experimentation.

✨ Features

  • 🚀 50+ Tools - Complete control over Blender's features:

    • Object creation, manipulation, and transformation
    • Material and shader system management
    • Animation and keyframe control
    • Camera and lighting setup
    • Modifiers and constraints
    • Physics simulations (rigid body, cloth, fluid)
    • Geometry nodes and procedural generation
    • File import/export operations
    • Scene optimization and batch operations
  • 🔒 Thread-Safe Execution - Enterprise-grade queue system for safe concurrent operations

  • 📦 Auto-Install Dependencies - Automatically installs required packages on first run

  • 🎮 Simple UI Panel - Start/stop server with one click from Blender's N-panel

  • 📊 Real-time Monitoring - Track operations, statistics, and server status

  • 🔧 Production-Ready - Comprehensive error handling, logging, and caching

🚀 Quick Start

Installation

  1. Download blender_mcp.py
  2. Open Blender
  3. Go to Edit → Preferences → Add-ons
  4. Click the dropdown arrow (⌄) next to the search bar
  5. Select Install from Disk...
  6. Choose the downloaded blender_mcp.py file
  7. Enable the addon by checking the box next to "MCP Complete Server for Blender"

Starting the Server

  1. Press N in the 3D Viewport to open the sidebar
  2. Navigate to the MCP Server tab
  3. Click Start Server
  4. Server will start on http://localhost:8000

The addon will automatically install required dependencies on first run (FastAPI, Uvicorn, Pydantic, etc.).

🤖 Using with PolyMCP

This MCP server is designed to work seamlessly with PolyMCP - a powerful framework for orchestrating MCP servers with AI agents.

Example: AI-Controlled Blender

#!/usr/bin/env python3
import asyncio
from polymcp.polyagent import UnifiedPolyAgent, OllamaProvider

async def main():
    # Initialize your LLM provider
    llm = OllamaProvider(model="gpt-oss:120b-cloud", temperature=0.1)
    
    # Connect to Blender MCP server
    agent = UnifiedPolyAgent(
        llm_provider=llm, 
        mcp_servers=["http://localhost:8000/mcp"],  
        verbose=True
    )
    
    async with agent:
        print("✅ Blender MCP Server connected!\n")
        
        # Chat with your AI to control Blender
        while True:
            user_input = input("\n🎨 You: ")
            
            if user_input.lower() in ['exit', 'quit']:
                break
            
            result = await agent.run_async(user_input, max_steps=5)
            print(f"\n🤖 Blender: {result}")

if __name__ == "__main__":
    asyncio.run(main())

Example Commands

Once connected, you can ask the AI agent to:

  • "Create a cube at position (0, 0, 0) with size 2"
  • "Add a red metallic material to the selected object"
  • "Create a camera looking at the origin"
  • "Set up a simple lighting scene with 3 lights"
  • "Add a fluid simulation to the cube"
  • "Export the scene as an FBX file"
  • "Create an animation rotating the object 360 degrees over 100 frames"

That's it! PolyMCP handles all the complexity of:

  • Tool discovery and selection
  • Multi-step task planning
  • Error handling and retries
  • State management across operations

This makes it incredibly simple to build AI-powered Blender automation tools!

📡 API Endpoints

Once the server is running, you can access:

  • API Documentation: http://localhost:8000/docs
  • List All Tools: http://localhost:8000/mcp/list_tools
  • Invoke Tool: POST http://localhost:8000/mcp/invoke/{tool_name}

🛠️ Available Tool Categories

<details> <summary>View all tool categories (100+ tools)</summary>

  • Object Operations: Create, delete, duplicate, select objects
  • Transformations: Move, rotate, scale, apply transforms
  • Materials & Shading: Create materials, add textures, setup shader nodes
  • Modeling: Add modifiers, boolean operations, mesh editing
  • Animation: Keyframes, timeline control, NLA editor
  • Camera & Lighting: Camera setup, light creation, HDRI environments
  • Rendering: Render settings, output configuration, rendering
  • Physics: Rigid body, cloth, fluid simulations
  • Geometry Nodes: Procedural generation, node tree creation
  • File Operations: Import/export various formats (FBX, OBJ, USD, etc.)
  • Scene Management: Scene info, cleanup, optimization
  • Batch Operations: Multi-object creation and transformation
  • Advanced: Particle systems, force fields, grease pencil

</details>

🔧 Configuration

You can customize the server by editing the Config class in blender_mcp.py:

class Config:
    HOST = "0.0.0.0"           # Server host
    PORT = 8000                # Server port
    AUTO_INSTALL_PACKAGES = True  # Auto-install dependencies
    THREAD_SAFE_OPERATIONS = True  # Enable thread-safe execution
    ENABLE_CACHING = True      # Enable result caching

📋 Requirements

The addon automatically installs these dependencies:

  • FastAPI
  • Uvicorn
  • Pydantic
  • docstring-parser
  • NumPy
  • PolyMCP

Blender Version: 3.0.0 or higher

🐛 Troubleshooting

Server won't start?

  • Check Blender's System Console for error messages (Window → Toggle System Console)
  • Ensure port 8000 is not already in use
  • Try restarting Blender after installation

Dependencies not installing?

  • Manually install packages using Blender's Python:
    /path/to/blender/python -m pip install fastapi uvicorn pydantic docstring-parser numpy
    

Can't find MCP Server panel?

  • Press N in the 3D Viewport
  • Look for "MCP Server" tab in the sidebar
  • Make sure the addon is enabled in Preferences

🤝 Contributing

Contributions are welcome! This project demonstrates how simple it is to create powerful MCP servers for PolyMCP.

📝 License

MIT License - See LICENSE file for details

🔗 Related Projects

  • PolyMCP - Simple and efficient way to interact with MCP servers using custom agents
  • Model Context Protocol - Open protocol for tool integration with LLMs

💡 Why This Project?

This MCP server was created to demonstrate how incredibly simple PolyMCP makes it to build AI-powered tools. With just a few lines of code, you can:

  1. Expose complex Blender functionality as MCP tools
  2. Let AI agents discover and orchestrate these tools
  3. Build natural language interfaces for 3D creation

No complex prompting, no manual tool selection, no state management - PolyMCP handles it all!


Designed for PolyMCP

Star ⭐ this repo if you find it useful!

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选