How to config Blender MCP for Codex, Claude Code and OpenCode

The Blender MCP server lets a coding agent talk to a running Blender instance: inspect the scene, run bpy code, batch-edit object properties, take viewport screenshots. The server itself is agent-agnostic — what differs between Codex, OpenCode and Claude Code is only how you register it.

Prerequisites

  1. uv is installed — check with uv --version.
  2. The blender-mcp server exists on disk. In the examples below it lives at /Users/<you>/blender_mcp/mcp. Use the absolute path on your machine — no ~, none of the agents expand it.
  3. Blender is running with the MCP add-on enabled and connected. No config file can fix this one. See the setup wiki.

All three configs boil down to the same thing: run blender-mcp through uv, inside the server’s directory, over stdio.

Codex — .codex/config.toml

[mcp_servers.blender]
command = "uv"
args = ["run", "blender-mcp"]
cwd = "/Users/<you>/blender_mcp/mcp"
enabled = true

The table name after mcp_servers. (blender) is the server name the agent uses when it names tools.

OpenCode — opencode.json

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "blender": {
      "type": "local",
      "command": ["uv", "run", "blender-mcp"],
      "cwd": "/Users/<you>/blender_mcp/mcp",
      "enabled": true
    }
  }
}

command is a single array — binary and arguments together. "type": "local" marks it as a process OpenCode spawns itself, as opposed to "remote" for an HTTP server.

Claude Code — .mcp.json

{
  "mcpServers": {
    "blender": {
      "type": "stdio",
      "command": "uv",
      "args": ["--directory", "/Users/<you>/blender_mcp/mcp", "run", "blender-mcp"],
      "env": {}
    }
  }
}

Claude Code has no cwd field, so the working directory goes to uv itself via --directory — and it has to come before run, since it’s a uv flag, not a blender-mcp one.

Claude Code asks for approval the first time it sees a project MCP server, and again on every code execution. To skip both, add a .claude/settings.json:

{
  "permissions": {
    "allow": ["mcp__blender__execute_blender_code"]
  },
  "enableAllProjectMcpServers": true
}

This lets the agent run arbitrary Python inside Blender without asking. Great for your own creative projects — don’t copy it into a repo you don’t trust.

Running this with local models

You don’t need a frontier model for most of this. Local open-source models are not as powerful, but they are very fast: simple technical operations — a scene summary, batch-processing certain properties — take just 3–10 seconds.

I recorded a demo and tutorial of that setup: Blender MCP server with local open source models.