跳过主要内容
全部教程
MCP

Blender MCP Setup: Claude Code, Cursor & Codex

Complete 2026 Blender MCP (mcp-for-blender) setup guide for Claude Code, Cursor, Codex & Windsurf—one-command install, manual JSON config, Blender Skills pairing & troubleshooting.

MCP for Blender (ahujasid/mcp-for-blender, widely searched as blender-mcp) is the most-starred game-adjacent Model Context Protocol server on GitHub, passing 36,500+ stars by late 2026. It connects AI coding agents—Claude Code, Cursor, OpenAI Codex, Windsurf, and Claude Desktop—directly to a live Blender viewport so your agent can inspect scenes, run bpy Python scripts, build procedural meshes, assign PBR materials, configure lighting, and export clean .glb / .fbx game assets.

(Note: MCP for Blender is an independent open-source community project and is not affiliated with the Blender Foundation.)

This guide walks through the fastest 2026 installation path, manual JSON configs for every major AI client, how to pair Blender MCP with Blender Agent Skills so your exports actually import cleanly into Godot 4, Unity, and Three.js, and fixes for every common Windows and macOS setup failure.


1. Quickest Install (One Command via mcp-for-blender)

The official package moved from blender-mcp to mcp-for-blender on PyPI (uvx blender-mcp still works for legacy configs, but all new installs should use mcp-for-blender).

The interactive installer checks for uv, detects every supported AI client on your machine, backs up existing config files (.bak), and installs + enables the Blender add-on automatically.

macOS / Linux:

curl -LsSf https://www.mcp-for-blender.com/install.sh | sh

Windows (PowerShell):

irm https://www.mcp-for-blender.com/install.ps1 | iex

Already have uv installed? Skip the shell script and run the setup wizard directly:

uvx mcp-for-blender setup

2. Manual Client Configs (Claude Code, Cursor, Codex & Windsurf)

If you prefer declarative config files or want to enable Blender MCP only inside a specific 3D game repository, add the server manually:

Claude Code (CLI One-Liner)

claude mcp add blender -- uvx mcp-for-blender

Project-Scoped .mcp.json (Claude Code) or .cursor/mcp.json (Cursor)

{
  "mcpServers": {
    "blender": {
      "command": "uvx",
      "args": ["mcp-for-blender"]
    }
  }
}

OpenAI Codex (~/.codex/config.toml)

[mcp_servers.blender]
command = "uvx"
args = ["mcp-for-blender"]

Critical Restart Sequence (Do Not Skip)

  1. Fully quit your AI client (Cmd+Q on macOS; on Windows, right-click the system tray icon → Quit, because closing the main window leaves the background process alive).
  2. Launch Blender and confirm the Blender MCP add-on is enabled under Edit → Preferences → Add-ons, then click Connect to MCP server in the 3D Viewport sidebar (N key → BlenderMCP tab).
  3. Reopen Claude Code / Cursor and run a quick smoke test:
Inspect the current Blender scene, remove the default Cube, build a stylized low-poly campfire with three bevelled rocks, crossed logs, and a warm point light, then capture a viewport screenshot so we can inspect the proportions.

3. What Blender MCP Can (and Cannot) Do Well for Game Dev

Understanding the strengths and failure modes of LLM-driven bpy scripting saves hours of frustration:

Task CategoryQuality via Blender MCPPractical Advice
Greybox Levels & Modular ArchitectureExcellentWalls, pillars, staircases, crates, fences, props, and consistent grid snapping work reliably via procedural bpy scripts.
Scene Cleanup, Transforms & Pivot FixingExcellentBatch-applying Scale/Rotation (Ctrl+A), centering origins to bottom-center (Z = 0), renaming meshes, and fixing inverted normals.
PBR Materials & Shader Node SetupVery GoodWiring Principled BSDF roughness/metallic/emission graphs, procedural noise textures, and baking clean color palettes.
Batch Export to Godot / Unity / Three.jsExcellentAutomated .glb (glTF 2.0 + Draco) or .fbx export with engine-correct forward/up axes and LOD validation.
Hero Organic Characters & Facial SculptingWeak (use hybrid pipeline)Don't ask raw bpy code to sculpt an anime hero face from primitives. Generate or sculpt the base mesh first (or use image-to-3D / PolyHaven / Sketchfab), then use Blender MCP to clean topology, fix scale, rig, UV-unwrap, and export.

4. Pair Blender MCP With Skills for Game-Ready Exports

MCP gives your agent hands inside Blender; Skills teach it game-engine export rules (triangle budgets, non-overlapping UVs, bottom-center pivots, glTF coordinate conventions, and naming standards).

Without a skill, an agent driving Blender MCP will happily export a 180,000-triangle unapplied-scale prop floating 2 meters above the origin with broken backface normals.

  1. Blender Agent Skills (EL4CTEO/blender-skills): Structured workflows for retopology, UV unwrapping, PBR baking, rigging, and per-engine export profiles (Godot, Unity, Unreal, Roblox, Web).
    /plugin marketplace add EL4CTEO/blender-skills
    /plugin install blender-agent-skills@blender-agent-skills
    
  2. Blender Core (/skills/blender-core): Solid everyday bpy scripting conventions and safe scene mutation rules.
  3. Godot Blender Import Hook (/skills/godot-blender-import-hook): Automates collision shape naming (-col, -colonly) and clean material handoff directly into Godot 4.
  4. Three.js GLB Scene Assembly (/skills/threejs-glb-scene-assembly): GameSkill's tested skill for loading Draco-compressed .glb exports into a playable browser scene with lighting, collisions, and audio.
  5. Working on 2D Sprites Instead of 3D Meshes? Check our interactive AI Video to Transparent 2D Sprite Sheet Lab and 2D Combat VFX Shader Pack.

Browse every Blender MCP tool and 3D skill in our Blender Skills & MCP Hub or inspect the full Game Dev MCP Servers Comparison.


5. Production Pre-Export Checklist (Paste Into Your Prompt)

Before asking Claude Code or Cursor to export any mesh from Blender MCP into Godot 4, Unity, or Three.js, append this 5-point game-asset contract:

Before exporting to .glb:
1. Apply all transforms (Location/Rotation/Scale = 1,1,1) and place object origin at bottom-center (Z = 0).
2. Recalculate outside normals and verify zero non-manifold edges on game meshes.
3. Keep prop triangle count under 4,000 tris and verify a valid UVMap exists.
4. Pack or assign clean Principled BSDF materials using relative paths (no broken external textures).
5. Export glTF 2.0 (.glb) with Y-Up enabled and verify the output file size is under 2 MB.

6. Troubleshooting Matrix (Windows & macOS)

ProblemRoot CauseExact Fix
uvx not found / spawn ENOENT in Cursor or Claude DesktopGUI apps on macOS don't inherit Homebrew/shell PATH from .zshrc.Run which uvx in Terminal (e.g. /Users/<you>/.local/bin/uvx) and put the absolute path in "command" inside mcp.json.
Tools never appear after running the setup scriptAI client wasn't fully terminated before restarting.Quit completely (Cmd+Q on macOS; exit from Windows system tray), then reopen.
Connection refused / localhost:9876 unreachableBlender is closed, or the BlenderMCP sidebar server isn't started.Open Blender, press N in the 3D Viewport, open the BlenderMCP tab, and click Connect to MCP server.
Windows Defender blocks install.ps1Corporate or Defender execution policy blocks piped PowerShell scripts.Install uv via winget install --id=astral-sh.uv -e, open a fresh terminal, and run uvx mcp-for-blender setup.
Viewport freezes during heavy bpy loopsAgent generated a high-subdivision modifier (Subsurf level 5+) or massive loop on the main UI thread.Instruct the agent to cap Subdivision Surface viewport levels at <= 2 and test geometry on a single unit before duplicating arrays.
Exported .glb looks rotated or tiny in Godot / UnityUnapplied scale or wrong forward axis in Blender export settings.Always run bpy.ops.object.transform_apply(location=False, rotation=True, scale=True) before calling export_scene.gltf(export_yup=True).

Frequently Asked Questions

Is blender-mcp still the right package name in 2026?

The upstream PyPI package was renamed to mcp-for-blender. Legacy uvx blender-mcp configs still resolve, but new installations should use uvx mcp-for-blender. See the MCP for Blender listing for live stars and release dates.

Does Blender MCP require Blender to stay open?

Yes. The MCP bridge communicates over a local socket with the Blender add-on running inside an open Blender instance. If you need headless background Blender execution without the GUI, combine your scripts with Blender Agent Skills via blender --background --python script.py.

Can I chain Blender MCP with Godot MCP or Unity MCP in the same session?

Yes—that is one of the strongest 2026 indie workflows: generate and export a clean .glb prop via Blender MCP, save it straight into your game project's assets/models/ directory, and use Godot MCP or Unity MCP to drop it into a playable scene and verify collisions immediately.

更多 MCP 与引擎实战指南