跪拜 Guibai
← Back to the summary

Talk to Blender: A Conversational Modeling Pipeline from Qoder to Three.js Web Showcase

Area9.gif

Summary

In the Qoder conversation, use mcp-for-blender to drive Blender, complete modeling, material changes, render validation, and GLB export with natural language, then use three.js + GSAP to make a scrollable/rotatable web page. The process itself is not complicated; the prerequisite is to get the three configurations of the Blender plugin, uvx, and Qoder MCP working together. Afterwards, each step's script is executed only after confirmation.

Flow Diagram

image.png

The loop corresponds to "change script — re-execute — re-validate", and confirmations and errors are not auto-skipped; only after render validation passes does it move to export and the web stage.

Preliminary Configuration Steps

1. Install Blender

Install the official stable version of Blender 5.2.1, confirm the version matches before installing the plugin.

2. Install uv / uvx

brew install uv
uvx --version

If you don't have Homebrew, use the official script: curl -LsSf https://astral.sh/uv/install.sh | sh. Note the output path of which uvx — the MCP configuration later needs the absolute path (on this machine it was /opt/homebrew/bin/uvx).

3. Install the Blender Plugin

Get the plugin file blender_mcp.py from mcp-for-blender.com or GitHub (ahujasid/blender-mcp). Then in Blender:

  1. Open Edit > Preferences > Add-ons
  2. Click the dropdown in the upper-right corner and select "Install from Disk"
  3. Select blender_mcp.py, check to enable "MCP for Blender"
  4. Both the plugin and the server have telemetry toggles; leave them off (the server is set in mcp.json)

4. Start the Blender-side Service

image.png

Press N in the 3D viewport to open the sidebar, switch to the "MCP for Blender" tab, confirm the port is 9876, and click "Connect to MCP server". When the panel shows Connected on localhost:9876, the Blender side is ready.

5. Configure Qoder MCP

Edit ~/.qoder-cn/mcp.json (the path is different on Windows):

{
  "mcpServers": {
    "blender": {
      "command": "/opt/homebrew/bin/uvx",
      "args": ["mcp-for-blender==2.2.7"],
      "env": {
        "BLENDER_MCP_SAFE_MODE": "1",
        "DISABLE_TELEMETRY": "true"
      }
    }
  }
}

6. Reload and Verify the Chain

In Qoder settings, refresh MCP or restart the app, open a new conversation, and confirm that Blender-related tools are visible. For the first verification, ask the assistant to read scene information or take a viewport screenshot; once successful, start modeling. If the tools don't appear, check port 9876 and the mcp.json path first, then reload MCP.

7. Set Up the Project Directory and Rules

~/BlenderProjects/
├── AGENTS.md      # execution approval, safety, backup, naming rules
├── scripts/       # reusable bpy scripts
├── saves/         # .blend copies at each stage
├── renders/       # validation render images
├── exports/       # exported GLB
└── web/           # web page and local preview

In AGENTS.md, at minimum write: explain the impact before execution, wait for "confirm execution" for full scripts, return errors verbatim, delete by exact name, back up before destructive operations, and use the QODER_ prefix.

8. Prepare the Web Side

Check item Expected result
uvx --version outputs the version normally
lsof -i :9876 Blender is listening
Qoder tool list Blender tools appear
Read scene returns object list, not errors
http://localhost:8123 page opens normally

Operation Flow

1. Generate the Model in Conversation

image.png

2. Script Approval and Execution

3. Verification and Export

image.png

4. Web Rendering

image.png

5. Deployment and References

Notes and Pitfalls

Scenario What to watch for
safe mode blocks scripts os, datetime, nonlocal, etc. get rejected; scripts should use only bpy and string paths
Chinese UI node names not found Look up nodes by bl_idname, not display name
Metallic materials black or overexposed on web You must supply ambient light (IBL) and use tone mapping to compress highlights
Model looks worse on the web glTF only keeps PBR materials; ambient light and lights must be rebuilt on the web side
Screens, emissive anomalies Procedural materials degrade on export; fix material parameters after loading
Double-clicking HTML doesn't open ES modules require an HTTP server; cannot use file://
External site loading fails Check bucket permissions, CORS, CDN availability
Blender tools not visible in Qoder Check mcp.json absolute path and port 9876; reload MCP and start a new conversation
Scene accidentally deleted or overwritten Back up before execution, delete by exact object name, don't touch non-task objects

Related Links