Blender MCP

公式

Blender用の軽量MCP(Model Context Protocol)サーバーです。BlenderのPython APIと自然言語インターフェースを提供し、ドキュメントへのアクセスを向上させ、複雑な設定の探索と理解を可能にします。

Blender MCPで何ができますか?

  • Analyze scene performance — アシスタントに依頼して、カメラビューから見た画面サイズに対してポリゴン数が最も多いオブジェクトを検出します。
  • Rename data-blocks — オブジェクト、ライト、カメラ、テクスチャ、その他のデータブロック全体で、タイプミスの修正や説明的な命名規則の適用を行います。
  • Query data relationships — 自然言語を使用して、特定のマテリアルを使用しているオブジェクトや、データブロック間の接続関係を質問します。
  • Debug scene issues — 開いているファイル内で、ポリゴン数が最も多いオブジェクト、非多様体メッシュ、またはその他の一般的な問題を特定します。
  • Document Geometry Nodes setups — ノードグループの機能と構造を説明するインラインドキュメントフレームとテキストデータブロックを生成します。

ドキュメント

Blender向けの軽量MCP(Model Context Protocol)サーバーです。BlenderのPython APIへの自然言語インターフェースを提供し、ドキュメントへのアクセスを改善し、複雑なセットアップの探索と理解を可能にします。

アーキテクチャに関する技術的な詳細とドキュメントについては、ソースコードを確認してください。

セキュリティ警告
MCPサーバーは、LLMが生成したコードをBlender内で一切の保護なしに実行します。データの削除やリモートへの送信から保護する仕組みはありません。データを安全に保つには、仮想マシンや機密情報にアクセスできないシステムの使用を推奨します。

インストール

BlenderにはLLMに接続するための組み込み機能は一切ありません。

BlenderがLLMと接続するには、3つの外部ツールを手動でダウンロード、インストール、実行する必要があります

要件:

  1. Blender 5.1以降
  2. アドオン
  3. LLMクライアント
  4. MCPサーバー

アドオン

Blenderセッションと対話するには、MCPサーバー統合用の特定のアドオンをインストールする必要があります。

Blenderにドラッグ&ドロップ

…またはディスクからダウンロードしてインストール

Blenderにドラッグ&ドロップする場合、2回行う必要があります。最初にBlender Labリポジトリを追加し、次にアドオン自体をインストールします。この方法により、このアドオンの新しいバージョンが利用可能になったときに更新通知を受け取ることができます。


LLMクライアント

MCPサーバーは明確に定義された標準に従っており、多数のクライアントと互換性があります。LLama.cppのドキュメントに従うか、好みのLLMクライアントをインストールしてください。


MCPサーバー

LLMクライアントの機能に応じて、MCPサーバーのインストール方法は異なります。

  • MCPバンドル: .mcpbファイルをサポートする新しいクライアントの場合は、リリースページから最新のパッケージをダウンロードしてください。Llama.cppはまだこれをサポートしていません。
  • MCPサーバー: ソースコードからインストールするには、Llama.cppのドキュメントまたはセットアップ手順を確認してください。

実行

LLMクライアント内でMCPサーバーをセットアップしたら、Blenderシーンを探索し始めることができます。

blender-mcpサーバーを実行しているllama.cpp Webインターフェース。


例1: シーン分析

MCPを使用して、パフォーマンスのボトルネックをプログラムで分析できます。Classroomデモファイルを例に取ります:

Classroomデモファイル。

このシーンはBlenderベンチマークファイルの1つです。これらのファイルがベンチマークに含まれている理由は、アーティストによって作成された実際のプロダクションファイルをよく表しているからです。そして、最適化の対象となりうるオブジェクトが含まれていることは驚くことではありません。

ポリゴン数をチェックするだけでも十分なことが多いですが、さらに興味深いのは、最終レンダーでの表示サイズに基づいてポリゴン数をプロットすることです。これは次のプロンプトで取得できます。

Analyze the scene and list the outliers: objects with highest polygon count but smaller size from the camera point of view.

プロットされた結果データは、他から際立つ2つのオブジェクトを明確に示しています: alphabetcoat 1:

Classroomデモシーンの画面領域あたりのポリゴン数のグラフ分析。

alphabetオブジェクトは2万ポリゴンです。平坦な配置のため、最終結果への悪影響をほとんど与えずにテクスチャに置き換えることができます。coat 1オブジェクトは、Subsurfモディファイアにより3万7千ポリゴンです。システムでメモリがボトルネックになっている場合、サブディビジョンレベルを下げることでシーンを軽減できます。

アルファベットはシーンの背面にあり、簡単にテクスチャに置き換えられます。コートも十分に遠くにあるため、メッシュを簡略化できます。

これらの結果の信頼性は?

LLMによって返された初期分析では、ビューポートに影響を与えるモディファイアのみが考慮されました。coat 1オブジェクトにはSolidifyモディファイアがあり、ポリゴン数が2倍になるため、さらに外れ値となります。また、このシーンではSimplifyが有効になっていませんでしたが、この設定も最終分析に影響を与えたでしょう。


例2: さまざまなプロンプト

以下は、テスト済みの他のユースケースの一部です。動作させるには、「プロンプト」の内容全体を貼り付ける必要があります。開始点として、対応するデモファイルを使用する必要があります。操作の成功は、使用するモデルによって異なります。

ユースケースプロンプトデモファイル結果
データブロックの名前変更: タイプミスの修正現在開いているBlenderファイルで、すべてのデータブロックの名前を修正してタイプミスを削除します。修正されたデータブロックを報告します。Scattering PebblesGRP-rocks → GRP-pebble, LGT-Lights → LGT-lights, Compositing Nodetree → Compositing Node Tree
データブロックの名前変更: より良い名前現在開いているBlenderファイルで、すべてのデータブロックに説明的な名前を提案し、承認されたら適用します。Scattering PebblesCamera → CAM-main, Area → LGT-sun-key, Area.001 → LGT-sun-fill, Area.002 → LGT-area-rim, GEO-pebble.001 → GEO-pebble-B, …
自然言語を使用したデータ関係のクエリ次のマテリアルを使用しているオブジェクトはどれですか: pebblesScattering Pebbles7オブジェクト: GEO-pebble, GEO-pebble.001, GEO-pebble.002, GEO-pebble.003, GEO-pebble.004, GEO-pebble.005, GEO-pebble.006
シーンのデバッグこのファイルで最もポリゴン数が多いオブジェクトは何ですか?どのシーンにもリンクされていないオブジェクトは無視します。Scattering Pebbles4,096面のGEO-ground。
ジオメトリノードのドキュメント化現在開いているBlenderファイルで、メインのジオメトリノードセットアップが何をしているか説明します。フレーム要素を使用してインラインドキュメントを追加します。分析結果を含むテキストデータブロックを作成します。Scattering Pebbles4つの主要な色分けされたフレーム + 説明付きテキストファイル。

まだ探索されていない他のプロンプト:

  • すべてのデータブロックをフランス語から英語に翻訳します。
  • メッシュがアーマチュアによって変形されていません。どう修正すればよいですか?
  • このシーンをレンダリングする際にBlenderのメモリが不足します。どう最適化すればよいですか?
  • このメッシュには奇妙なシェーディングアーティファクトがあります。どう修正すればよいですか?
  • 不正な法線を持つメッシュがあるオブジェクトを見つけます。
  • 不均一に変換されたメッシュオブジェクトがないかシーンをチェックします。
  • エクスポートしたビデオがWebブラウザで再生されません。どの設定を変更すべきですか?
  • 木の枝を作成して詳細化するには、どのスカルプトブラシを使用すべきですか?
  • 画像をSDRとHDRの両方で保存するようにコンポジットノードを設定します。
  • このチェックリストを検証します: メッシュは多様体であること、すべてのオブジェクトにマテリアルがあること、命名規則に従っていること、絶対パスがないこと、… データブロックの名前変更: タイプミスの修正

GRP-rocksGRP-pebbles (シーンには岩ではなく小石オブジェクトのみが含まれています)。

LGT-LightsLGT-lights (大文字小文字の不一致)。

Compositing NodetreeCompositing Node Tree (Nodetreeは複合語の誤りです)。

データブロックの名前変更: より良い名前

オブジェクト:

  • CameraCAM-main
  • AreaLGT-sun-key
  • Area.001LGT-sun-fill
  • Area.002LGT-area-rim
  • GEO-pebble.001GEO-pebble-B
  • GEO-pebble.002GEO-pebble-C
  • GEO-pebble.003GEO-pebble-D
  • GEO-pebble.004GEO-pebble-E
  • GEO-pebble.005GEO-pebble-F
  • GEO-pebble.006GEO-pebble-G

ライトデータブロック:

  • AreaLGT-sun-key
  • Area.001LGT-sun-fill
  • Area.002LGT-area-rim

カメラデータブロック:

  • CameraCAM-main

テクスチャ:

  • TextureTEX-ground-clouds
  • Texture.001TEX-ground-image

シーンとワールド:

  • WorldWLD-environment
  • SceneSCN-main ジオメトリノードのドキュメント化

作成された新しいフレーム:

ジオメトリノードセットアップに追加されたドキュメントフレーム。

テキストデータブロック:

GEOMETRY NODES ANALYSIS -- "Pebble Scattering Nodes"
Applied to object: GEO-ground   |   Modifier: Pebbles
========================================================

OVERVIEW
--------
This node group scatters three size categories of pebble meshes across
the faces of a ground mesh.  Each category uses its own density mask
and a global Factor multiplier so that coverage can be art-directed
per-layer without touching the raw mask textures.  The three resulting
instance layers are merged with the original ground geometry and sent
to the Group Output.

INPUTS (Group Interface)
------------------------
  Geometry           -- The ground mesh to scatter pebbles on.
  Large Pebbles Mask -- Float mask (e.g. vertex colour / texture) that
                       defines WHERE large pebbles may appear.
  Medium Pebbles Mask-- Float mask for medium pebble placement regions.
  Small Pebbles Mask -- Float mask for small pebble placement regions.
  Factor             -- Global density multiplier shared by all three
                       lanes (appears three times in the interface,
                       one per lane).

NODE GRAPH -- LANE BY LANE
--------------------------

+- LARGE PEBBLES LANE -----------------------------------------------------+
|  Source object : GEO-pebble                                              |
|  Group Input.001                                                         |
|    +- Geometry ------------------------> Distribute Points on Faces      |
|    +- Large Pebbles Mask ------------> Distribute Points on Faces        |
|    |                                     (Density Factor socket)         |
|    +- Factor --> Math.003 (x)  -------> Distribute Points on Faces       |
|                                          (Density Max socket)            |
|  Distribute Points on Faces ----------> Instance on Points               |
|  Object Info (GEO-pebble) -----------> Instance on Points (Instance)     |
|  Random Rotation.001 [-pi, +pi] -----> Instance on Points (Rotation)     |
|  Random Value [0.25 - 0.60]   -------> Instance on Points (Scale)        |
|  Instance on Points ------------------> Join Geometry.003                |
+--------------------------------------------------------------------------+

+- MEDIUM PEBBLES LANE ----------------------------------------------------+
|  Source object : GEO-pebble.004                                          |
|  Group Input.002                                                         |
|    +- Geometry ------------------------> Distribute Points on Faces.001  |
|    +- Medium Pebbles Mask -----------> Math.004 (x) --> Math.005 (x)     |
|    +- Factor ------------------------> Math.005 (x)                      |
|         Math.005 output --------------> Distribute Points on Faces.001   |
|                                          (Density socket)                |
|  Distribute Points on Faces.001 -----> Instance on Points.001            |
|  Object Info.001 (GEO-pebble.004) --> Instance on Points.001             |
|  Random Rotation.002 [-pi, +pi]  ----> Instance on Points.001            |
|  Random Value.002 [0.25 - 0.45] -----> Instance on Points.001            |
|  Instance on Points.001 -------------> Join Geometry.003                 |
+--------------------------------------------------------------------------+

+- SMALL PEBBLES LANE -----------------------------------------------------+
|  Source object : GEO-pebble.002                                          |
|  Group Input.003                                                         |
|    +- Geometry ------------------------> Distribute Points on Faces.002  |
|    +- Small Pebbles Mask -----------> Math.006 (x) --> Math.007 (x)      |
|    +- Factor ------------------------> Math.006 (x)                      |
|         Math.007 output --------------> Distribute Points on Faces.002   |
|                                          (Density socket)                |
|  Distribute Points on Faces.002 -----> Instance on Points.002            |
|  Object Info.002 (GEO-pebble.002) --> Instance on Points.002             |
|  Random Rotation [-pi, +pi]      ----> Instance on Points.002            |
|  Random Value.003 [0.10 - 0.35] -----> Instance on Points.002            |
|  Instance on Points.002 -------------> Join Geometry.003                 |
+--------------------------------------------------------------------------+

+- MERGE & OUTPUT ---------------------------------------------------------+
|  Group Input.004                                                         |
|    +- Geometry (pass-through) --------> Join Geometry.003                |
|  Join Geometry.003                                                       |
|    (inputs: large instances + medium instances +                         |
|             small instances  + original ground geo)                      |
|    +- Geometry -----------------------> Group Output                     |
+--------------------------------------------------------------------------+

SCALE RANGES (uniform, per lane)
---------------------------------
  Large  pebbles : 0.25 - 0.60
  Medium pebbles : 0.25 - 0.45
  Small  pebbles : 0.10 - 0.35

ROTATION (all lanes)
---------------------
  All three axes randomised independently over [-pi, +pi],
  giving each pebble instance a fully random orientation.

DENSITY CONTROL PATTERN (Medium & Small lanes)
-----------------------------------------------
  The mask value and the Factor are first multiplied together
  (Math.004 / Math.006), then that product is multiplied again
  by a second value (Math.005 / Math.007) before being fed into
  the Density socket.  This two-stage multiply gives a non-linear
  response curve, making the density fall off more aggressively
  near the mask edges.

  The Large lane uses a different (single-stage) approach:
  the Density Factor socket receives the mask directly, and the
  Factor is only used to scale Density Max via Math.003.

NOTES & SUGGESTIONS
--------------------
  * The node group has no Seed input exposed; adding one would allow
    re-randomising all three layers simultaneously without touching
    individual nodes.
  * The Factor input currently appears three times (once per lane).
    Merging them into a single shared socket would simplify the
    modifier panel.
  * Consider labelling the unlabelled Math nodes (Math.003-.007)
    and Random Value nodes to aid future maintenance.