blender-mcp
blender-mcp
Blender .blend ファイルを構築する MCP サーバーです。Blender への接続方法は 2 通りあります。
ヘッドレス — 呼び出しのたびに新しい
blender --backgroundプロセスを起動します。決定論的で、常に利用可能であり、ファイル生成に適した方法です。ライブ — 小さな Blender アドオンがローカルポートを開き、サーバーが既に開いている Blender ウィンドウを操作できるようにします。その様子をリアルタイムで確認できます。
どちらのルートも同じハンドラーコードを実行するため、スクリプトはどちらの方法でも同じように動作します。ローカルの Web UI を使用すると、参照画像をアップロードし、同じツールで生成ジョブを実行できます。
必要条件
Blender | 4.2 以降(5.1 で開発) |
Python | サーバー用に 3.12+(Blender は独自のものを使用) |
依存関係と仮想環境の管理 |
Related MCP server: blender-chatgpt-mcp
セットアップ
uv sync # create .venv and install
cp .env.example .env # then set BLENDER_MCP_EXECUTABLE
uv run python scripts/build_addon.py --install # build + install the Blender addon.env を省略した場合、サーバーは PATH と各ドライブの標準的な Program Files/Blender Foundation/Blender <version> フォルダーを検索し、見つかった最新バージョンを優先します。
ライブブリッジを有効にする
アドオンはインストールされていますが、起動するまではアイドル状態です。
Blender を開きます。
3D ビューポートで N を押してサイドバーを表示します。
MCP タブを開き、Start MCP Bridge をクリックします。
アドオンの設定で Start listening on launch にチェックを入れると、毎回この操作を省略できます。
MCP クライアントを接続する
.cursor/mcp.json には、このプロジェクト用のサーバーが既に登録されています。すべての場所で利用できるようにするには、そのブロックを ~/.cursor/mcp.json にコピーします。
{
"mcpServers": {
"blender": {
"command": "uv",
"args": ["run", "--directory", "C:\\Users\\josef\\Projects\\blender-mcp", "blender-mcp"]
}
}
}品質ワークフロー
生成品質は、単一のスクリプトダンプではなく、確認によって向上します。
list_references/view_reference— 最初にガイド画像を開くstudioまたはproductからcreate_blend小さな
run_scriptステップで構築;apply_materialで金属/プラスチック/ゴム/ガラス/木材を適用preview_views— マルチアングルの EEVEE プレビュー;view_imageで参照と比較修正、再度プレビュー
最終
render/render_and_view(最終版のみ CYCLES、反復中は EEVEE)
ローカル Web UI
uv run blender-mcp-web
# open http://127.0.0.1:8765参照画像をアップロードし、プロンプトを入力し、output/jobs/ 以下のジョブを参照します。
.envにBLENDER_MCP_LLM_API_KEYがある場合 — サイトは制限付きマルチモーダルエージェントを実行し、同じ Blender ツールを呼び出します(OpenAI 互換またはBLENDER_MCP_LLM_PROVIDERによる Anthropic)。キーがない場合 — アップロードとジョブページは引き続き機能します。Cursor でジョブを開き、MCP エージェントに
output/jobs/<id>/refsから構築するよう依頼します。
ツール
ツール | 目的 |
| インストール、出力/参照ディレクトリ、テンプレート、マテリアル、ライブブリッジ |
|
|
| テンプレート + オプションのスクリプトから新規ファイルを作成 |
| 任意の bpy Python を実行 |
| プロシージャルプリセット:金属、プラスチック、ゴム、ガラス、木材 |
| シーングラフ / マテリアル / カメラ / ライト |
| 批評用のマルチアングル EEVEE プレビュー |
| 静止画 PNG;後者は画像を返して表示 |
| 視覚確認用に PNG を読み込み |
| ライブビューポートのキャプチャ |
|
|
| ライブ Blender ウィンドウで |
スクリプトの作成
run_script および create_blend の script 引数は、bpy、mathutils、math、D(bpy.data)、C(bpy.context)が既にバインドされた名前空間で実行されます。result に代入するか emit(value) を呼び出すことでデータを返します。
テンプレート
名前 | 内容 |
| 何もなし |
| Blender の起動シーン:立方体、カメラ、ライト |
| グレーの床、3点エリア照明、50mm カメラ、1920×1080 |
| 白いシームレス背景、ソフトライト、85mm プロダクトフレーミング |
レイアウト
addon/blender_mcp_addon/ Blender extension + shared handlers (incl. preview_views)
src/blender_mcp/
server.py MCP tools
refs.py reference image library
materials.py procedural material presets
templates.py starter scenes
agent/ bounded multimodal generation loop
web/ FastAPI UI (templates + static)
headless.py / bridge.py Blender process / live socket
scripts/ build, install, verification
output/ .blend files, renders, refs/, jobs/テスト
uv run pytest -m "not blender" # fast
uv run pytest # includes real Blender runs
uv run python scripts/check_server.py
uv run python scripts/verify_live_bridge.py注意事項と制限
run_scriptは Blender 内で任意の Python を実行します。ブリッジはループバックに限定してください。長時間のレンダリングは、完了するまでライブ UI をブロックします。
viewport_screenshotはライブモードのみです。Cycles は、Blender の設定で GPU デバイスを有効にしない限り CPU を使用します。
Web エージェントには、ツール呼び出しと画像をサポートするマルチモーダルモデルが必要です。
ライセンス
MIT
Available Tools
16 toolsadd_referenceA
Copy an image file into the reference library under output/refs.
Args: source_path: Existing image on disk (absolute or under the output folder). name: Optional destination filename. group: Optional subfolder name for organising guides.
Inputs: source_path (required), name, group.
apply_materialA
Apply a procedural material preset (metal, plastic, rubber, glass, wood) to a mesh.
Args: object_name: Mesh object name in the scene. preset: One of the presets from blender_status.materials. color: Optional RGB or RGBA floats 0-1. blend_file: Open this file first (forces headless). save_as: Save after applying. target: "auto", "live" or "headless".
Inputs: preset (required), object_name (required), color, target, +2 more.
blender_statusC
Report the Blender install, output folder, live-bridge state, templates and materials.
Inputs: no named parameters.
create_blendA
Create a new .blend file from a starter template and save it.
Args: path: Destination, relative to the output folder unless absolute. A ".blend" suffix is added when missing. template: empty, default, studio, or product. script: Optional extra bpy code run after the template. compress: Write a compressed .blend.
Inputs: path (required), script, compress, template.
inspect_blendA
Describe a scene: objects, transforms, materials, cameras, lights and render settings.
Args: blend_file: Inspect this file. Leave empty to inspect the live session instead. include_objects: Include the per-object breakdown, not just the counts. target: Where to look when no file is given.
Inputs: target, blend_file, include_objects.
list_outputsC
List the files produced so far in the output folder.
Inputs: pattern.
list_referencesA
List reference guide images under output/refs (optionally one group folder).
Inputs: group.
open_in_live_sessionB
Load a .blend into the Blender window the user has open, so they can see it.
Inputs: blend_file (required).
preview_viewsB
Render multi-angle EEVEE previews (front, three_quarter, side, top) for critique.
Args: blend_file: .blend to open and preview. output_dir: Folder under output/ for the PNGs. width: Preview width. height: Preview height. samples: Low sample count for speed. engine: Prefer EEVEE. target: Usually headless.
Inputs: blend_file (required), width, engine, height, +3 more.
renderA
Render a still image and write it to disk. Prefer render_and_view so you see it.
Args: output: PNG destination, relative to the output folder unless absolute. blend_file: Render this file rather than the live session. Forces a headless run. engine: "EEVEE", "CYCLES" or "WORKBENCH". EEVEE for iteration; CYCLES for finals. samples: Sample count. Keep it low for previews. width: Output width in pixels. height: Output height in pixels. frame: Frame to render. Defaults to the scene's current frame. transparent: Render the world background as alpha. target: "auto", "live" or "headless".
Inputs: frame, width, engine, height, +5 more.
render_and_viewC
Render a still and return the image so you must look at it.
Args: output: PNG destination under the output folder. blend_file: Optional .blend to open first. engine: Prefer EEVEE while iterating. samples: Sample count. width: Width in pixels. height: Height in pixels. target: "auto", "live" or "headless".
Inputs: width, engine, height, output, +3 more.
run_scriptA
Run Python against Blender's bpy API.
bpy, mathutils, math, D and C are pre-bound. Assign to result or call
emit(value) to send data back; print() output is captured too.
Args: code: The Python to execute. blend_file: Open this .blend first. Supplying it forces a headless run. save_as: Save the file here when the script finishes. target: "auto", "live" or "headless".
Inputs: code (required), target, save_as, blend_file.
view_imageC
Load a rendered image so it can actually be looked at.
Args: path: Image path, relative to the output folder unless absolute.
Inputs: path (required).
viewport_screenshotB
Capture the live Blender window's 3D viewport as it currently looks.
Requires the MCP Bridge addon to be running in an open Blender session.
Inputs: output.
view_previewB
Look at one preview PNG from preview_views or a render.
Args: path: Image path relative to output or absolute.
Inputs: path (required).
view_referenceB
Look at a reference/guide image so you can match it while modeling.
Args: path: Path relative to output/refs, or absolute.
Inputs: path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool targets a distinct action: status, references (list/view/add), file creation, scripting, material application, scene inspection, rendering (with variants for preview and view), screenshot, output listing, and live session opening. Even similar tools like render and render_and_view are clearly differentiated by purpose and parameters.
All tool names use snake_case with a verb_noun pattern (e.g., list_references, create_blend, apply_material). The naming is predictable and follows a consistent structure, making it easy for an agent to infer functionality from the name.
With 16 tools, the set covers a broad range of Blender operations—file management, references, materials, rendering, scripting, and inspection—without being overwhelming. The count is well-scoped for its domain: enough to handle common tasks without unnecessary duplication.
The tool surface covers many essential tasks but lacks direct tools for object creation (e.g., adding primitives), transformation (move/rotate/scale), or animation. While run_script can fill these gaps via Python, the explicit tool set leaves notable gaps for a modeling server, forcing agents to fall back to scripting for basic operations.
Related MCP Connectors
Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.
An MCP server that provides asset auto generator
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for AI-assisted Blender automation, providing layered tools for perception, declarative and imperative writing, and fallback operations.29126 PyPI7MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants like Codex or ChatGPT to inspect and control a local Blender scene, including creating objects, editing materials, setting cameras and lights, rendering previews, and saving safe copies of .blend files.1MIT
- FlicenseBqualityDmaintenanceMCP server that controls Blender via HTTP bridge, enabling 3D modeling, animation, and export operations from Cursor agent.321-
- AlicenseAqualityDmaintenanceMCP server for Blender that connects to the official Blender Lab add-on, exposing 27 tools for scene manipulation, object editing, materials, rendering, and Python execution through the add-on's actual wire protocol.271MIT