blender-2d-mcp
Blender 2D MCP
Model Context Protocol を介した Blender 5.x 向けのAI駆動2D描画・アニメーション。MCPクライアント(Claude Desktop、Cursor、VS Code Copilot agent mode など)が、実行中のBlenderインスタンス内で直接Grease Pencilの描画、キーフレーム、マテリアル、レンダーを作成できます。
Blenderの GPv3 API(bpy.ops.grease_pencil.*、GreasePencilDrawing)上に構築されており、ahujasid/blender-mcp を参考にしています。
flowchart LR
A[MCP Client<br/>Claude / Cursor / VS Code] <-->|stdio / JSON-RPC| B[blender-2d-mcp<br/>FastMCP server]
B <-->|TCP JSON<br/>localhost:9876| C[addon.py<br/>socket server in Blender]
C -->|main thread| D[Grease Pencil API<br/>GPv3]addon.py— TCP JSONコマンドサーバーを内蔵したBlenderアドオン。コマンドはキューに積まれ、bpy.app.timersを介してBlenderのメインスレッドで実行されます。src/blender_2d_mcp/server.py— アドオンのコマンドをMCPツールとして公開するFastMCP stdioサーバー。
要件
Blender 5.2 LTSのみ(アドオンは旧バージョンでは有効化を拒否します。使用するGPv3 APIサーフェスは5.2固有です)
Python ≥ 3.10 と
mcp[cli](自動インストールされます)
Related MCP server: Blender MCP Bridge
インストール
1. アドオンをBlenderにインストール
Blenderで: Edit > Preferences > Add-ons > Install…
このリポジトリから
addon.pyを選択。Interface: Blender 2D MCP を有効化。
サイドバーを開く(View > Sidebar、または N キー)→ Blender2DMCP タブ。
Connect to MCP Client をクリック(デフォルトポート
9876)。Blenderは起動したままにしてください。
ヒント:
blender-2d-mcp --install-addonを実行するとaddon.pyがダウンロードフォルダにコピーされ、これらの手順が表示されます。
2. MCPクライアントを接続
サーバーは localhost のみにバインドします。ローカル利用には認証トークンは不要です。
オプションA — uvx(インストール不要):
uvx --from "g:\My Projects\blender-2d-mcp" blender-2d-mcpオプションB — 編集可能インストール:
cd "g:\My Projects\blender-2d-mcp"
pip install -e .
blender-2d-mcp # runs the stdio MCP serverClaude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"blender-2d-mcp": {
"command": "uvx",
"args": ["--from", "g:\\My Projects\\blender-2d-mcp", "blender-2d-mcp"]
}
}
}Cursor(.cursor/mcp.json)または汎用stdioクライアント:
{
"mcpServers": {
"blender-2d-mcp": {
"command": "C:\\Path\\To\\Python\\Scripts\\blender-2d-mcp.exe",
"args": []
}
}
}VS Code / GitHub Copilot Chat(.vscode/mcp.json — このリポジトリに同梱済み):
{
"servers": {
"blender-2d-mcp": {
"type": "stdio",
"command": "uvx",
"args": ["--from", "g:\\My Projects\\blender-2d-mcp", "blender-2d-mcp"],
"env": {}
}
}
}別の方法として、
blender_2d_mcpが何らかの環境にpipインストールされている場合は、その環境のPythonを使用します:"command": "C:\\Path\\To\\Python\\python.exe", "args": ["-m", "blender_2d_mcp.server"]。
使用方法: Copilot Chatを開き、モードドロップダウンを Agent に切り替えると、Blenderツールが利用可能になります(#blender-2d-mcp)。コマンドパレットから MCP: List Servers でサーバーの開始・停止・再起動ができます。mcp.json を編集した後はVS Codeウィンドウをリロードしてください。
2Dキャンバス
setup_2d_scene を使用すると、ビューポートが正面の正投影ビューに設定されるため、描画平面はワールド XZ になります:
送信する2Dポイント | ワールド位置 | 意味 |
|
| x = 画面右方向、y = 画面上方向 |
|
| そのまま使用 |
単位はメートル(Blenderのデフォルト)です。デフォルトのカメラズームでの1920×1080 HDフレームは、水平方向に約±5単位の範囲になります。
ツールカタログ
ツール | 目的 |
| GPオブジェクト、レイヤー、キーフレーム、ストローク数の一覧表示 |
| 一般的なシーン/オブジェクトのイントロスペクション |
| アドオン/プロトコル/Blenderバージョン + 互換性ステータス |
| 白背景、正面正投影ビュー、HD解像度 |
| レイヤー + 黒ストロークマテリアルを持つ新しいGPオブジェクト |
| レイヤー管理 |
| レイヤースタックの編集 |
| 不透明度、ブレンドモード、非表示、ロック |
| GPv3レイヤーマスキング(切り抜き効果) |
| 冪等な空白キーフレーム作成 |
| キーフレーム操作( |
| フリーフォームストローク。テーパリング用のポイントごとの半径/不透明度プロファイル |
| 1回の呼び出しで多数のストロークを一括描画 |
|
|
| ストロークの検査と編集(移動/拡大縮小/回転/スムーズ) |
| ストローク + 塗りつぶしの色 |
| 2つのキーフレーム間の中間フレームを生成(イージング制御) |
| キーフレームのオブジェクト位置/回転/スケール |
| 前後のフレームをゴースト表示 |
| GPモディファイア: Noise wobble、Smooth、Thickness、Time offset… |
| 再生ヘッド、fps、フレーム範囲、レンダーエンジン、フィルム透過 |
| キャンバスにフィットした正面正投影カメラ |
| トレース用の背景画像エンプティ |
| mp4動画出力を含むノンブロッキングレンダー |
| AI駆動の編集を元に戻す |
| ビューポートのキャプチャを画像として返す |
| 脱出ハッチ: 任意の |
| 最終手段としての任意の |
典型的なワークフロー
get_gp_scene_info+get_viewport_screenshot— 既存の状態を確認。新規開始の場合は
setup_2d_scene→create_gp_object。gp_draw_shape/gp_draw_strokeで描画。frame_numberを渡すとキーポーズにストロークを配置できます(フレームは自動的に作成されます)。詳細な描画の一括作成にはgp_draw_strokesを使用。塗りつぶしシェイプ:
fill_alpha > 0のマテリアルを作成し、fill=True+fill_materialを指定。「2コマ打ち」でアニメーション(24fpsで2フレームごとにキーポーズ):
gp_copy_frameでポーズをコピーし、gp_transform_strokeで調整、gp_interpolateで中間フレームを生成。手描き風の揺れにはNOISEモディファイアを追加。render_animation(use_video=True)でレンダリングし、get_render_statusでポーリング。変更後は必ずスクリーンショットを撮って視覚的に確認。ミスは
undoで取り消せます。
開発
pip install -e ".[dev]"
python -m pytest tests/ -vテストスイートは、Blenderの外部でアドオンのTCPトランスポートを実行します。サーバークラスを偽の bpy に対してASTリフティングすることで、Blenderのインストールは不要です。実際のGrease Pencilデータに触れるハンドラーロジックは、Blender内で検証する必要があります。
トラブルシューティング
症状 | 修正方法 |
MCPクライアントが接続できない | 最初にBlenderのサイドバーパネルでサーバーを起動してください。ポートが一致しているか確認してください(デフォルトは9876) |
ポートが既に使用されている | サイドバーパネルでポートを変更し、MCPコマンドに |
起動時のファイアウォールプロンプト | プライベートネットワークでBlenderを許可してください(サーバーはlocalhostのみにバインドされます) |
スクリーンショットが黒い | Blenderウィンドウ内を一度クリックしてください(コンポジターの問題)、または3Dビューポートが表示されていることを確認してください。ツールはオフスクリーンGPUキャプチャからウィンドウグラブに自動的にフォールバックします |
| Blenderで表示可能な3Dビューポートと、両方の境界フレームにキーフレームが必要です。ビューポートを開いてください |
モーダルオペレーター(ペン、ブラシストローク)が機能しない | MCPではサポートされていません — 代わりに |
| 使用されなくなりました — MCPサーバーを再起動し、アドオンと |
レンダリングがハングするように見える | 現在はノンブロッキングです — |
アドオンが有効化できない | このプロジェクトはBlender 5.2 LTSを正確に必要とします(GPv3 APIのみ)。古いビルドは設計上拒否されます |
ライセンス
MIT
This server cannot be installed
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 gradedqualityCmaintenanceTransforms Blender into an MCP server with 50+ tools for AI-driven 3D workflows, enabling complete control over objects, materials, animations, physics simulations, and rendering through natural language commands.45MIT
- AlicenseAqualityCmaintenanceEnables remote control of Blender via the Model Context Protocol, allowing users to execute Python scripts, query scene data, and generate 3D models from images. It provides a bridge for AI clients to interact directly with Blender's internal environment and automate 3D content creation.36MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to control Blender's 3D workflow via an embedded MCP server.25MIT
- AlicenseNot gradedqualityCmaintenanceEnables natural language control of Blender 3D through MCP clients, allowing creation, modification, and manipulation of 3D models, animations, and scenes.299MIT
Related MCP Connectors
MCP server for NanoBanana AI image generation and editing
MCP server for Flux AI image generation
MCP server for Wan AI video generation
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/Praveen16-V/blender-2d-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server