Sponsored by Deepsite.site

blender-open-mcp

Created By
dhakalnirajan9 months ago
Open Models MCP for Blender Using Ollama
Content

blender-open-mcp

blender-open-mcp is an open source project that integrates Blender with local AI models (via Ollama) using the Model Context Protocol (MCP). This allows you to control Blender using natural language prompts, leveraging the power of AI to assist with 3D modeling tasks.

Features

  • Control Blender with Natural Language: Send prompts to a locally running Ollama model to perform actions in Blender.
  • MCP Integration: Uses the Model Context Protocol for structured communication between the AI model and Blender.
  • Ollama Support: Designed to work with Ollama for easy local model management.
  • Blender Add-on: Includes a Blender add-on to provide a user interface and handle communication with the server.
  • PolyHaven Integration (Optional): Download and use assets (HDRIs, textures, models) from PolyHaven directly within Blender via AI prompts.
  • Basic 3D Operations:
    • Get Scene and Object Info
    • Create Primitives
    • Modify and delete objects
    • Apply materials
  • Render Support: Render images using the tool and retrieve information based on the output.

Installation

Prerequisites

  1. Blender: Blender 3.0 or later. Download from blender.org.
  2. Ollama: Install from ollama.com, following OS-specific instructions.
  3. Python: Python 3.10 or later.
  4. uv: Install using pip install uv.
  5. Git: Required for cloning the repository.

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/dhakalnirajan/blender-open-mcp.git
    cd blender-open-mcp
    
  2. Create and Activate a Virtual Environment (Recommended):

    uv venv
    source .venv/bin/activate  # On Linux/macOS
    .venv\Scripts\activate  # On Windows
    
  3. Install Dependencies:

    uv pip install -e .
    
  4. Install the Blender Add-on:

    • Open Blender.
    • Go to Edit -> Preferences -> Add-ons.
    • Click Install....
    • Select the addon.py file from the blender-open-mcp directory.
    • Enable the "Blender MCP" add-on.
  5. Download an Ollama Model (if not already installed):

    ollama run llama3.2
    

    (Other models like Gemma3 can also be used.)

Setup

  1. Start the Ollama Server: Ensure Ollama is running in the background.

  2. Start the MCP Server:

    blender-mcp
    

    Or,

    python src/blender_open_mcp/server.py
    

    By default, it listens on http://0.0.0.0:8000, but you can modify settings:

    blender-mcp --host 127.0.0.1 --port 8001 --ollama-url http://localhost:11434 --ollama-model llama3.2
    
  3. Start the Blender Add-on Server:

    • Open Blender and the 3D Viewport.
    • Press N to open the sidebar.
    • Find the "Blender MCP" panel.
    • Click "Start MCP Server".

Usage

Interact with blender-open-mcp using the mcp command-line tool:

Example Commands

  • Basic Prompt:

    mcp prompt "Hello BlenderMCP!" --host http://localhost:8000
    
  • Get Scene Information:

    mcp tool get_scene_info --host http://localhost:8000
    
  • Create a Cube:

    mcp prompt "Create a cube named 'my_cube'." --host http://localhost:8000
    
  • Render an Image:

    mcp prompt "Render the image." --host http://localhost:8000
    
  • Using PolyHaven (if enabled):

    mcp prompt "Download a texture from PolyHaven." --host http://localhost:8000
    

Available Tools

Tool NameDescriptionParameters
get_scene_infoRetrieves scene details.None
get_object_infoRetrieves information about an object.object_name (str)
create_objectCreates a 3D object.type, name, location, rotation, scale
modify_objectModifies an object’s properties.name, location, rotation, scale, visible
delete_objectDeletes an object.name (str)
set_materialAssigns a material to an object.object_name, material_name, color
render_imageRenders an image.file_path (str)
execute_blender_codeExecutes Python code in Blender.code (str)
get_polyhaven_categoriesLists PolyHaven asset categories.asset_type (str)
search_polyhaven_assetsSearches PolyHaven assets.asset_type, categories
download_polyhaven_assetDownloads a PolyHaven asset.asset_id, asset_type, resolution, file_format
set_textureApplies a downloaded texture.object_name, texture_id
set_ollama_modelSets the Ollama model.model_name (str)
set_ollama_urlSets the Ollama server URL.url (str)
get_ollama_modelsLists available Ollama models.None

Troubleshooting

If you encounter issues:

  • Ensure Ollama and the blender-open-mcp server are running.
  • Check Blender’s add-on settings.
  • Verify command-line arguments.
  • Refer to logs for error details.

For further assistance, visit the GitHub Issues page.


Happy Blending with AI! 🚀

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
Tavily Mcp
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
ChatWiseThe second fastest AI chatbot™
DeepChatYour AI Partner on Desktop
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server