blender-control-mcp
blender-control-mcp
blender-control-mcp は、ローカルWindowsのbackgroundモードでBlenderを安全に制御するスタンドアロンSTDIO MCPサーバーです。LLM、自然言語解釈、任意のPython/シェル実行機能は含みません。サーバーが公開する7つの構造化ツールのみを使用でき、ホストとBlender内部で入力をそれぞれ検証します。
要件環境
Windows
Python 3.12以上
Blender 5.2 LTS推奨
デフォルトのBlenderパス:
C:\Users\park\Applications\blender-5.2.0-windows-x64\blender.exe
Related MCP server: blend-ai
インストール
プロジェクトルートでPowerShellから実行します。
py -3.12 -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"Blenderが別の場所にある場合は、環境変数を設定します。
$env:BLENDER_EXECUTABLE = "D:\Apps\Blender\blender.exe"任意の環境変数:
BLENDER_EXECUTABLE:blender.exeのパスBLENDER_TIMEOUT_SECONDS: 1つのジョブのタイムアウト、1〜3600秒、デフォルト180秒BLENDER_CONTROL_WORKDIR: 読み取り専用検査ジョブのログ/プラン保存ルート。デフォルトは%TEMP%\blender-control-mcp
サーバー実行
.\.venv\Scripts\blender-control-mcp.exeまたは、次のように実行できます。
.\.venv\Scripts\python.exe -m blender_control_mcp.serverSTDIOサーバーのため、正常実行時は対話型プロンプトや通常のログをstdoutに出力しません。MCPクライアントがプロセスを起動し、JSON-RPCを送受信します。
Codex接続
CodexはローカルSTDIO MCPサーバーをサポートしており、ユーザーの~/.codex/config.tomlまたは信頼したプロジェクトの.codex/config.tomlに設定できます。以下のパスは、このリポジトリのデフォルトの場所を使用した例です。
[mcp_servers.blender_control]
command = "C:/Users/park/Desktop/dev_tool/blender-control-mcp/.venv/Scripts/python.exe"
args = ["-m", "blender_control_mcp.server"]
cwd = "C:/Users/park/Desktop/dev_tool/blender-control-mcp"
startup_timeout_sec = 20
tool_timeout_sec = 300
default_tools_approval_mode = "writes"
[mcp_servers.blender_control.env]
BLENDER_EXECUTABLE = "C:/Users/park/Applications/blender-5.2.0-windows-x64/blender.exe"
BLENDER_TIMEOUT_SECONDS = "180"設定後、Codexを再起動し、/mcpまたはcodex mcp listで接続状態を確認します。UIではSettings → MCP servers → Add server → STDIOを選択し、同じcommand/argsを入力することもできます。最新の設定項目はOpenAIのCodex MCPドキュメントを参照してください。
CLIで追加する例は次のとおりです。
codex mcp add blender_control --env BLENDER_EXECUTABLE=C:\Users\park\Applications\blender-5.2.0-windows-x64\blender.exe -- C:\Users\park\Desktop\dev_tool\blender-control-mcp\.venv\Scripts\python.exe -m blender_control_mcp.server他のMCPクライアント接続
STDIOサーバー設定形式がJSONであるクライアントの一般的な例です。実際の設定ファイルの場所とキー名はクライアントのドキュメントを確認してください。
{
"mcpServers": {
"blender-control": {
"command": "C:\\Users\\park\\Desktop\\dev_tool\\blender-control-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "blender_control_mcp.server"],
"env": {
"BLENDER_EXECUTABLE": "C:\\Users\\park\\Applications\\blender-5.2.0-windows-x64\\blender.exe"
}
}
}
}ツール
すべてのパス入力は文字列です。入力アセットは.glb、.blend、.fbxのみ許可します。targetはallまたは大文字小文字を含めて正確に一致する名前である必要があります。見つからない場合や曖昧な場合は、サーバーは任意選択せずにtarget_not_found/ambiguous_targetエラーと候補リストを返します。
scene.inspect
入力:
{"input_path":"C:\\assets\\chair.glb"}data.objectsに名前、タイプ、マテリアルスロット、メッシュ頂点/ポリゴン数、dimensions、location、Modifierリストを返します。
{
"success": true,
"data": {
"object_count": 1,
"objects": [{
"name": "Chair",
"type": "MESH",
"material_slots": ["Wood"],
"vertex_count": 1200,
"polygon_count": 800,
"dimensions": [1.0, 1.1, 1.8],
"location": [0.0, 0.0, 0.0],
"modifiers": []
}]
}
}material.list
入力:
{"input_path":"C:\\assets\\chair.blend"}返却例:
{
"success": true,
"data": {
"material_count": 1,
"materials": [{
"name": "Wood",
"base_color": [0.4, 0.2, 0.1, 1.0],
"roughness": 0.55,
"metallic": 0.0,
"alpha": 1.0,
"base_color_texture_linked": true
}]
}
}asset.apply_material
base_colorは0〜1範囲のRGBまたはRGBAで、roughness、metallic、alphaも0〜1です。1つ以上の変更値が必要です。
{
"input_path":"C:\\assets\\chair.glb",
"output_directory":"C:\\assets\\outputs",
"target":"Wood",
"base_color":[0.1,0.3,0.8,0.75],
"roughness":0.25,
"alpha":0.75
}正確なマテリアル名、またはマテリアルが1つだけのオブジェクト名を対象にします。修正されたGLB、BLEND、FBXをすべて生成します。1つのオブジェクトにマテリアルが複数ある場合は、マテリアル候補を返し、明示的な選択を要求します。
asset.transform
各ベクトルは数値3つです。scaleは各軸0.001〜1000で、1つ以上の変更値が必要です。
{
"input_path":"C:\\assets\\chair.glb",
"output_directory":"C:\\assets\\outputs",
"target":"Chair",
"location":[0,0,1],
"rotation_degrees":[0,0,90],
"scale":[1.2,1.2,1.2]
}修正されたGLB、BLEND、FBXをすべて生成します。
asset.add_modifier
Bevel入力例:
{
"input_path":"C:\\assets\\chair.blend",
"output_directory":"C:\\assets\\outputs",
"target":"Chair",
"modifier_type":"bevel",
"width":0.03,
"segments":3
}Decimate入力例:
{
"input_path":"C:\\assets\\chair.blend",
"output_directory":"C:\\assets\\outputs",
"target":"Chair",
"modifier_type":"decimate",
"ratio":0.5
}Bevelはwidth > 0〜1000、segments 1〜16のみ許可します(デフォルト0.1/3)。Decimateはratio 0.01〜1のみ許可します(デフォルト0.5)。他のModifierや混在したパラメータは拒否します。修正された3つの形式をすべて生成します。
asset.set_smooth_shading
{
"input_path":"C:\\assets\\chair.fbx",
"output_directory":"C:\\assets\\outputs",
"target":"Chair"
}対象メッシュポリゴンにsmooth shadingを設定し、修正されたGLB、BLEND、FBXをすべて生成します。
asset.export
{
"input_path":"C:\\assets\\chair.blend",
"output_directory":"C:\\assets\\exports",
"formats":["glb","blend","fbx"]
}formatsはglb、blend、fbxのうち重複のない1つ以上である必要があり、要求された形式のみ生成します。
共通レスポンスと成果物
すべての呼び出しは構造化されたレスポンスを返します。修正/エクスポートツールは<output_directory>/<operation_id>/に成果物を作成し、読み取りツールは一時ジョブルートの下にログを残します。
{
"success": true,
"operation_id": "9bc12a7f57f24f8ba9d9af2f78de3041",
"operation": "asset.export",
"artifacts": [
"C:\\assets\\exports\\9bc12a7f57f24f8ba9d9af2f78de3041\\chair.glb"
],
"summary": "asset.export completed successfully",
"data": {"formats":["glb"],"artifact_count":1},
"operation_path": "...\\operation.json",
"log_path": "...\\blender.log",
"log_excerpt": "Blender 5.2.0 ...",
"command": ["...\\blender.exe","--background","..."],
"exit_code": 0,
"errors": []
}失敗時も可能な場合はoperation.jsonとblender.logを残し、次のようにエラーコードと候補を返します。
{
"success": false,
"summary": "object target 'Seat' was not found",
"artifacts": [],
"errors": [{
"code": "target_not_found",
"message": "object target 'Seat' was not found",
"candidates": ["Chair", "Table"]
}]
}テスト
全テスト:
.\.venv\Scripts\python.exe -m pytest -qBlenderのない環境では、実際のBlender統合テスト1つだけが自動的にスキップされ、単体テストは合格します。
# 빠른 단위 테스트만
.\.venv\Scripts\python.exe -m pytest -m "not integration" -q
# 실제 Blender 통합 테스트만
.\.venv\Scripts\python.exe -m pytest -m integration -q統合テストは小さなGLBを作成した後、シーン検査、マテリアルの色/粗さ/透明度変更、scale変更、Bevel追加、GLB/BLEND/FBX生成を実際のBlenderで検証します。
セキュリティ設計
任意のBlender Python、Python文字列、自然言語プラン、シェルコマンドを受け取るツールはありません。
ブリッジは固定された
blender_mcp_bridge.py1つであり、JSON operation type/フィールド/値をallow-listで再検証します。ブリッジに
eval、exec、subprocess、外部コマンド実行はありません。Blenderは
--background --factory-startup --disable-autoexecで実行されます。subprocess.run(..., shell=False)と引数配列を使用し、タイムアウトを適用します。入力ファイルは存在有無と拡張子をBlender実行前に検証します。
出力はランダムなoperation IDサブフォルダにのみ書き込み、既存の成果物と元ファイルを上書きしません。
ブリッジはプラン、結果、成果物がすべて同じジョブフォルダ境界内にあるかを再確認します。
MVP制限事項
画像テクスチャのピクセル修正、Texture Paint、ベイクはサポートしていません。
Base Colorソケットにテクスチャ/ノードが接続されたマテリアルは、デフォルト値を変更しても最終的な外観が変わらない場合があります。この場合、
blender.logに警告を残します。マテリアル変更はPrincipled BSDFがあるマテリアルのみサポートします。
ModifierはBevelとDecimateのみ追加し、適用(apply)はしません。エクスポート形式のexporterが評価された結果を処理する方法は、Blenderの形式別動作に従います。
Blenderファイル自体の破損、Blender importer/exporterエラー、形式間の機能差は構造化エラーとログで報告しますが、自動復旧はしません。
各ツール呼び出しは別々のBlenderプロセスを起動するため、大きなアセットでは起動・変換コストが大きくなります。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceWindows-optimized MCP server that enables control of Blender 4.0+ through 21+ tools for scene management, object manipulation, and asset downloads from PolyHaven, Sketchfab, Hyper3D, and Hunyuan3D.13MIT
- AlicenseBqualityBmaintenanceAn MCP server that enables AI assistants to control Blender through 108 specialized tools for 3D modeling, animation, and rendering. It provides a secure, thread-safe interface to execute validated operations in Blender using natural language commands.100126AGPL 3.0
- FlicenseAqualityCmaintenanceA headless-first Model Context Protocol server for safe, deterministic Blender automation, exposing typed tools to inspect scenes and render previews without arbitrary command execution.3
- AlicenseNot gradedqualityCmaintenanceMCP 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.MIT
Related MCP Connectors
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/parkspark/blender-control-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server