Blender Open MCP

by dhakalnirajan
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Enables control of Blender using natural language prompts, allowing for 3D modeling tasks such as creating and modifying objects, applying materials, and rendering images through a Blender add-on that handles communication with the server.

  • Uses locally running Ollama models to process natural language commands, with the ability to switch between different models like llama3.2 or Gemma3, and query available models from the Ollama server.

ブレンダーオープンMCP

blender-open-mcp Model Context Protocol (MCP) を用いて Blender とローカル AI モデル ( Ollama経由) を統合するオープンソース プロジェクトです。これにより、自然言語プロンプトで Blender を操作し、AI の力を活用して 3D モデリング作業を支援することができます。

特徴

  • **自然言語で Blender を制御する:**ローカルで実行されている Ollama モデルにプロンプトを送信して、Blender でアクションを実行します。
  • MCP 統合: AI モデルと Blender 間の構造化された通信にモデル コンテキスト プロトコルを使用します。
  • Ollama サポート: Ollama と連携してローカル モデルの管理を容易にするように設計されています。
  • **Blender アドオン:**ユーザー インターフェイスを提供し、サーバーとの通信を処理する Blender アドオンが含まれています。
  • PolyHaven 統合 (オプション): AI プロンプトを介して、 PolyHavenから Blender 内で直接アセット (HDRI、テクスチャ、モデル) をダウンロードして使用します。
  • 基本的な3D操作:
    • シーンとオブジェクトの情報を取得する
    • プリミティブを作成する
    • オブジェクトの変更と削除
    • 材料を適用する
  • **レンダリング サポート:**ツールを使用して画像をレンダリングし、出力に基づいて情報を取得します。

インストール

前提条件

  1. Blender: Blender 3.0以降。blender.orgからダウンロードしてください
  2. Ollama: OS 固有の指示に従って、 ollama.comからインストールします。
  3. Python: Python 3.10 以降。
  4. uv: pip install uvを使用してインストールします。
  5. **Git:**リポジトリのクローンを作成するために必要です。

インストール手順

  1. リポジトリをクローンします。
    git clone https://github.com/dhakalnirajan/blender-open-mcp.git cd blender-open-mcp
  2. 仮想環境を作成してアクティブ化する(推奨):
    uv venv source .venv/bin/activate # On Linux/macOS .venv\Scripts\activate # On Windows
  3. 依存関係をインストールします:
    uv pip install -e .
  4. Blenderアドオンをインストールします。
    • Blender を開きます。
    • Edit -> Preferences -> Add-onsに移動します。
    • Install...をクリックします。
    • blender-open-mcpディレクトリからaddon.pyファイルを選択します。
    • 「Blender MCP」アドオンを有効にします。
  5. Ollama モデルをダウンロードします (まだインストールされていない場合)。
    ollama run llama3.2
    *( **Gemma3*などの他のモデルも使用可能です。)

設定

  1. Ollama サーバーを起動します。Ollamaがバックグラウンドで実行されていることを確認します。
  2. MCP サーバーを起動します。
    blender-mcp
    または、
    python src/blender_open_mcp/server.py
    デフォルトではhttp://0.0.0.0:8000をリッスンしますが、設定を変更できます。
    blender-mcp --host 127.0.0.1 --port 8001 --ollama-url http://localhost:11434 --ollama-model llama3.2
  3. Blender アドオン サーバーを起動します。
    • Blender と 3D ビューポートを開きます。
    • サイドバーを開くにはNを押します。
    • 「Blender MCP」パネルを見つけます。
    • 「MCP サーバーを起動」をクリックします。

使用法

mcpコマンドライン ツールを使用してblender-open-mcpを操作します。

コマンド例

  • 基本プロンプト:
    mcp prompt "Hello BlenderMCP!" --host http://localhost:8000
  • シーン情報を取得:
    mcp tool get_scene_info --host http://localhost:8000
  • キューブを作成する:
    mcp prompt "Create a cube named 'my_cube'." --host http://localhost:8000
  • イメージをレンダリングする:
    mcp prompt "Render the image." --host http://localhost:8000
  • PolyHaven の使用 (有効な場合):
    mcp prompt "Download a texture from PolyHaven." --host http://localhost:8000

利用可能なツール

ツール名説明パラメータ
get_scene_infoシーンの詳細を取得します。なし
get_object_infoオブジェクトに関する情報を取得します。object_name (文字列)
create_object3D オブジェクトを作成します。typenamelocationrotationscale
modify_objectオブジェクトのプロパティを変更します。namelocationrotationscalevisible
delete_objectオブジェクトを削除します。name (文字列)
set_materialオブジェクトにマテリアルを割り当てます。object_namematerial_namecolor
render_image画像をレンダリングします。file_path (文字列)
execute_blender_codeBlender で Python コードを実行します。code (文字列)
get_polyhaven_categoriesPolyHaven 資産カテゴリを一覧表示します。asset_type (文字列)
search_polyhaven_assetsPolyHaven アセットを検索します。asset_typecategories
download_polyhaven_assetPolyHaven アセットをダウンロードします。asset_idasset_typeresolutionfile_format
set_textureダウンロードしたテクスチャを適用します。object_nametexture_id
set_ollama_modelOllama モデルを設定します。model_name (文字列)
set_ollama_urlOllama サーバーの URL を設定します。url (文字列)
get_ollama_models利用可能な Ollama モデルを一覧表示します。なし

トラブルシューティング

問題が発生した場合:

  • Ollama とblender-open-mcpサーバーが実行されていることを確認します。
  • Blenderのアドオン設定を確認してください。
  • コマンドライン引数を確認します。
  • エラーの詳細についてはログを参照してください。

さらにサポートが必要な場合は、 GitHub の問題ページをご覧ください。


AIとのブレンディングを楽しみましょう!🚀

-
security - not tested
F
license - not found
-
quality - not tested

モデル コンテキスト プロトコルを介して Blender をローカル AI モデルと統合するサーバー。これにより、ユーザーは 3D モデリング タスク用の自然言語プロンプトを使用して Blender を制御できます。

  1. Features
    1. Installation
      1. Prerequisites
      2. Installation Steps
    2. Setup
      1. Usage
        1. Example Commands
      2. Available Tools
        1. Troubleshooting
          ID: lgjbewkykg