blender-mcp
Blender MCP expert for scene inspection, Python scripting, GLTF export, and material/animation extraction. Activate when: (1) using Blender MCP tools (get_scene_info, execute_python, screenshot, etc.), (2) writing Blender Python scripts for extraction or manipulation, (3) exporting scenes to GLTF/GL
By vladmdgolam · 1,850 installs
npx skills add vladmdgolam/agent-skills --skill blender-mcp
Source repository · Upstream listing
Blender MCP
Tool Selection
Use structured MCP tools ( get scene info , screenshot ) for quick inspection.
Use execute python for anything non trivial: hierarchy traversal, material extraction, animation baking, bulk operations. It gives full bpy API access and avoids tool schema limitations.
Use headless CLI for GLTF exports — the MCP server times out on export operations.
Health Check (Always First)
1. get scene info — verify connection (default port 9876)
2. execute python with print("ok") — verify Python works
3. screenshot — verify viewport capture works
If MCP is unresponsive, check that the Blender MCP addon is enabled and the socket server is running.
Complete Export Workflow
This is the end to end linear narrative. Follow these steps in order. Do not skip steps.
Step 1: Health Check
Confirm MCP is alive before touching anything else:
If any step fails, stop and fix MCP connectivity first. See [Known Errors]( known errors workarounds).
Step 2: Inspect Scene
Run the full hierarchy extraction to understand what you're working with:
Look for:
Array modifiers (will balloon file size if baked — must replicate at runtime)
Objects with many vertices (risk of slow export or large GLB)
Hidden objects you may or may not want to export
Missing materials (empty material slots )
Step 3: Verify Materials
Run the material extraction to catch export lossy setups before committing to an export:
Review all warnings before proceeding. Decide: bake procedural textures now, or patch materials at runtime after export.
Step 4: Export via Headless CLI
The MCP server cannot handle GLTF exports (timeout). Always use headless CLI:
Critical flags:
export apply=False — do not bake modifiers (Array modifier turns 1 MB into 56 MB)
export draco mesh compression enable=False — apply Draco later via gltf transform
Quote all paths that may contain spaces
Step 5: Optimize with gltf transform
Run after a successful export. Always use individual steps, never optimize :
Expected size reduction: ~22 MB raw → ~3.7 MB (WebP) → ~1 MB (Draco). See [references/texture optimization.md](references/texture optimization.md) for detailed metrics.
Step 6: Validate
Run the full Post Export Validation checklist below before shipping.
Post Export Validation Checklist
After every export, verify the following before handing off the GLB for integration:
[ ] File size is reasonable — raw GLB under 30 MB, optimized GLB under 5 MB for typical web scenes. Flag anything above these thresholds.
[ ] Inspect with gltf transform CLI — run npx @gltf transform/cli inspect final.glb and check: mesh count, texture count, texture sizes, animation count, accessor sizes. No unexpected duplication.
[ ] Visual test in Babylon.js Sandbox — drag and drop the GLB at [sandbox.babylonjs.com](https://sandbox.babylonjs.com). Verify: mesh renders correctly, textures appear, animations play, no black/pink materials.
[ ] No Three.js console errors — load in a minimal Three.js GLTFLoader test page and check browser console. Common errors: THREE.GLTFLoader: Unknown extension , missing texture files, unsupported Draco version.
[ ] Materials spot check — pick 3–5 materials and visually confirm roughness, metalness, and base color look correct. Compare against Blender viewport render. Flag any that look flat or overly shiny.
[ ] Animation spot check — if the scene has animations, verify at least one plays correctly in Babylon.js Sandbox or Three.js. Check frame count matches expected.
[ ] Name mapping verified — if runtime code references mesh names, confirm the names match after GLTF export transformation (spaces → underscores, dots removed). See [Critical Rule 5]( 5 gltf name mapping).
[ ] No missing textures — check Babylon.js Sandbox network tab. No 404s for texture files. All textures should be packed inside the GLB.
Examples
Example 1: Export Character Rig with Animations
Scenario: You have a humanoid character with armature, 3 NLA actions (idle, walk, run), PBR texture set, and a weapon attached via parenting. You need a web ready GLB for a Three.js scene.
Step 1: Health check and scene inspection
Step 2: Inspect the rig
Step 3: Check materials for export losses
Run the material extraction above. For a character, watch for:
Procedural skin texture nodes (Noise → color variation) — these will be lost
Color Ramp on roughness for fabric — will be lost, roughness will look flat
Decision: bake procedural variations to image textures, or patch roughness values at runtime
Step 4: Export
Step 5: Verify animations exported
Expected output: 3 animations (Idle, Walk, Run). If 0, check that NLA strips are muted or the tracks are set to solo.
Step 6: Optimize
Step 7: Runtime animation setup (Three.js)
Example 2: Debug Material Export Loss (Roughness Looks Flat)
Scenario: After export, a metal panel material looks uniformly flat and shiny in Three.js. In Blender it had interesting roughness variation from a Noise Texture → Color Ramp → roughness input.
Step 1: Confirm the problem in Blender
Expected output reveals:
Step 2: Understand what GLTF received
The export exports the Principled BSDF's roughness input. When linked to a Color Ramp, GLTF exporter takes the default value of the input socket (fallback), which is typically 0.5 — perfectly flat.
Step 3A: Fix by baking in Blender (best quality)
Then connect the new image texture node to the Roughness input and re export.
Step 3B: Fix at runtime in Three.js (quick patch)
If you cannot bake, override the material roughness after load:
Step 4: Verify fix
Re export and run validation checklist. In Babylon.js Sandbox, compare the metal panel material against a Blender viewport screenshot to confirm roughness variation is preserved.
Critical Rules
1. MCP Server Times Out on Exports
The Blender MCP server cannot handle GLTF exports — they exceed the timeout. Always use headless CLI:
2. Do NOT Apply Modifiers on Export
Set export apply=False . Array modifiers (circular patterns, linear repeats) balloon file size when baked. Replicate them at runtime instead.
Example: 16 roller instances via Array modifier = ~1 MB GLB. Baked = ~56 MB GLB.
3. Export WITHOUT Draco First
If you plan to optimize with gltf transform , export without Draco compression. Re encoding existing Draco corrupts meshes. Apply Draco as the final step.
4. Procedural Textures Don't Export to GLTF
These Blender node setups are lost on export:
Node Setup What's Lost Workaround
Noise Texture → roughness Entire procedural chain Bake to texture, or shader patch at runtime
Color Ramp on roughness texture Value remapping range Manual roughness values, or runtime remap
Procedural bump (Noise → Bump) Bump detail Bake normal map in Blender
Mix Shader with complex factor Blend logic Simplify to single BSDF before export
What DOES export: flat roughness/metallic values, image textures (without Color Ramp remapping), baked normal maps, PBR texture sets (baseColor, metallicRoughness, normal).
5. GLTF Name Mapping
Blender names are transformed in GLTF:
Spaces → underscores
Dots → removed
Trailing spaces → trailing underscore
Blender GLTF
RINGS ball L RINGS ball L
Sphere.003 Sphere003
RINGS L.001 RINGS L001
RINGS S (trailing space) RINGS S
Always check names in the exported GLB, not Blender, when referencing meshes in code.
6. Never Use gltf transform optimize
The optimize command includes simplify which destroys mesh geometry. Use individual steps instead:
7. Quote Paths with Spaces
Blender project paths often contain spaces. Always double quote:
Scene Extraction Pattern
Full hierarchy with materials, transforms, and modifiers:
Material Extraction Pattern
Animation Keyframe Extraction
GLTF Export Settings Reference
Setting Value Why
export format 'GLB' Single binary file
export apply False Don't bake modifiers (Array, etc.)
export animations True Include animation data
export nla strips True Bake NLA strips into actions
export cameras True Include camera rigs
export lights False Handle lights in runtime (Three.js/R3F)
export draco mesh compression enable False Apply Draco later via gltf transform
Texture Optimization Pipeline
Target: smallest GLB with acceptable visual quality.
Key insights:
4K textures (4096x4096) = ~89 MB GPU memory per texture. 1K = ~5.6 MB. 16x reduction .
PNG metallicRoughness textures compress well to WebP at quality 85 90.
Mobile GPUs (Adreno, Mali) benefit most from texture downscaling.
Inspect with: npx @gltf transform/cli inspect model.glb
See [references/texture optimization.md](references/texture optimization.md) for concrete commands and quality metrics.
Asset Integrations
Available through Blender MCP when configured:
Integration Capabilities
PolyHaven Search, download, import free HDRIs, textures, and 3D models with auto material setup
Sketchfab Search and download models (requires access token)
Hyper3D Rodin Generate 3D models from text descriptions or reference images
Hunyuan3D Create 3D assets from text prompts, images, or both
See [references/asset integrations.md](references/asset integrations.md) for usage examples and workflow patterns.
Known Errors & Workarounds
See [references/errors.md](references/errors.md) for complete error tables.
Data Output
print() + json.dumps() for small results (scene info, single object)
Use tempfile.gettempdir() for large extraction results (full hierarchy, animation data, material reports)
Always include metadata: scene name, fps, frame range, Blender version