Skip to main content
Glama
kurenai-studio

blender-meta-mcp

blender-meta-mcp

轻量 Blender MCP:Cursor Agent 用 blender_exec已经打开的 Blender 里执行 bpy。心智模型和 ae-meta-mcpae_exec 一样。

Cursor Agent ──stdio MCP──▶ Node mcp/index ──HTTP :11588──▶ Addon HTTP 线程
                                                              │ 入队
                                                              ▼
                                                    bpy.app.timers(主线程)
                                                              │ temp_override + exec
                                                              ▼
                                                         Blender bpy

bpy 只能在主线程调用。HTTP 跑在 addon 的守护线程里,主线程定时器取出任务再执行。

工具

Tool

作用

blender_health

桥是否可达,以及 Blender 版本、文件、场景

blender_exec

执行任意 Python,最后一行表达式作为 JSON 结果

blender_scene_info

场景、模式、集合、最多 200 个物体

blender_viewport

当前 3D 视口的 OpenGL PNG,不是完整渲染

Related MCP server: blender-ai-mcp

环境

  • Blender 4.2 及以上(本仓库在 Blender 5.2.2 LTS / macOS 上跑过 npm run test:smoke

  • Node.js >= 18

安装

cd blender_meta_mcp
npm install
npm run install:addon

在 Blender 里:Edit → Preferences → Add-ons → blender-meta-mcp,启用后保持 Blender 开着。侧栏 MCP 页会显示 127.0.0.1:11588

接到 Cursor

npm run setup:cursor

把输出贴进 ~/.cursor/mcp.json(或项目 .cursor/mcp.json),然后在 MCP 设置里关掉再打开 blender-meta-mcp。样例见 examples/cursor-mcp.json

验收

npm run test:smoke

会另开一个 Blender 窗口(配置写在临时目录,不动本机偏好),依次检查:

  1. blender_health 返回版本号,并且有 3D 视口

  2. blender_exec 创建名为 MCP Test 的立方体

  3. blender_scene_info 列表里有它

  4. 撤消后立方体消失

  5. 语法错误返回 traceback,Blender 不退出

  6. blender_viewport 返回 PNG

  7. 关掉这个 Blender 后,health 变为不可达

手测也可以:

import bpy
bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 1))
obj = bpy.context.active_object
obj.name = "MCP Test"
{"name": obj.name, "type": obj.type}

写脚本

最后一行写成表达式。bpy 已经在作用域里。约束和对象模型见 skills/blender-bpy/SKILL.md

目录

mcp/          Node stdio MCP(index、core、context、bridge-client)
addon/        Blender addon(HTTP 线程 + 主线程定时器)
scripts/      install-addon、setup-cursor、smoke-test
skills/       blender-bpy agent skill
examples/     cursor-mcp.json
docs/         DEV.md

故障

现象

处理

health 连接被拒绝

Blender 没开,或 addon 没启用;看侧栏 MCP 是否在监听

端口占用

改 addon 偏好里的端口,并设置 BLENDER_MCP_BRIDGE

context is incorrect

打开一个 3D 视口。桥会套第一个 VIEW_3Dtemp_override

主线程没取走任务

Blender 正在渲染或处于模态操作;等它结束再调

界面卡住

bpy.ops.render.render 会占住主线程直到结束

安全

桥只绑定 127.0.0.1blender_exec 是本机 Python,能改 Blender 文件,也能动这台机器上的文件。只在本机开发时开。

环境变量

变量

默认

说明

BLENDER_MCP_BRIDGE

http://127.0.0.1:11588

MCP 连 addon 的地址

BLENDER_MCP_PORT

11588

addon 监听端口(优先于偏好)

BLENDER_MCP_TIMEOUT_S

120

主线程取任务的等待秒数

BLENDER_MCP_AUTOSTART

启用

设为 0 则启用 addon 后不自动监听

BLENDER_BIN

自动查找

install:addon / test:smoke 用的 Blender 可执行文件

License

MIT

Available Tools

4 tools
blender_execA

Execute Python inside the running Blender (bpy), like ae_exec / cocosmcp_exec. The snippet runs on Blender's main thread with a VIEW_3D temp_override when one exists. bpy and mathutils are already in scope. The value of the last expression is returned as JSON (Vector/Euler/Color/Matrix become lists; bpy data-blocks become {type, name}). Assign result if the last line is not an expression. A top-level return is also accepted. Prefer the data API over bpy.ops. Do not return raw bpy objects. Successful calls push an undo step unless undo is false. Example: bpy.context.scene.name

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesPython snippet. Last expression is the result.
undoNoPush an undo step before running. Defaults to true.

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully carries the behavioral burden and does so thoroughly: it discloses main-thread execution, temp_override behavior, return serialization, the need to assign result, acceptance of top-level return, and undo-step behavior. This is rich, concrete behavioral context that goes well beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact yet information-dense, with the core action front-loaded and every subsequent sentence adding necessary execution semantics. The example at the end is useful without padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there is no output schema and no annotations, the description covers everything an agent needs to invoke the tool correctly: execution context, scope, return formatting, result assignment, undo semantics, and an example. Nothing critical is missing for a general code-execution tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful nuance beyond the schema: the last expression becomes the returned value, result must be assigned for non-expression snippets, and the undo step is only pushed on successful calls unless undo is false. This goes beyond the simple 'defaults to true' schema note.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause 'Execute Python inside the running Blender (bpy)' clearly states the verb and resource. It does not explicitly differentiate from the sibling tools blender_health, blender_viewport, or blender_scene_info, though the general-purpose nature is evident from the first sentence.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives strong coding guidance ('Prefer the data API over bpy.ops', 'Do not return raw bpy objects') and explains execution context. However, it never states when to choose blender_exec over the sibling tools or when not to use it, so alternative-selection guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

blender_healthA

Check whether the Blender addon bridge is reachable. Returns Blender version, file, and scene.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool is non-mutating (a reachability check) and lists the return contents, but it does not mention behavior on failure, response format, or whether any state is modified. This is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no filler. The core action is front-loaded, and the return-value note is directly useful to an agent deciding whether to call this tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nullary, low-complexity health check, the description provides the essential context: what it verifies and what it returns. There is no output schema, so the explicit return-value summary is valuable, though failure semantics are left unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters/scenario, and the schema is empty, so parameter documentation is not needed. The baseline of 4 applies because there is nothing for the description to compensate for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Check'), names the resource ('Blender addon bridge'), and clearly distinguishes this from siblings like blender_exec or blender_viewport by framing it as a reachability probe. It also states what it returns, leaving no ambiguity about the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'Check whether the Blender addon bridge is reachable' implies this is a health/preflight check, but the description does not explicitly say when to use it versus siblings or when not to use it. Usage context is inferable rather than directly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

blender_scene_infoA

Summarize the open Blender file: scene, mode, collections, and up to 200 objects.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It communicates the read-only nature through 'Summarize', scopes the operation to the open file, and reveals a concrete limit ('up to 200 objects'). It does not describe failure behavior when no file is open, but the core behavior is transparent enough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with zero filler. It efficiently communicates the verb, target resource, scope, and a relevant limit in a compact form.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with no output schema, the description is substantially complete: it states what information is summarized and the object cap. Minor details such as exact return structure or error behavior are not specified, but this is acceptable for a simple inspection tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

This tool has zero parameters and the schema has no properties, so there are no parameter semantics for the description to compensate for. The baseline of 4 applies because there is nothing missing on the parameter side.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action ('Summarize'), the specific resource ('the open Blender file'), and exactly what it covers (scene, mode, collections, and up to 200 objects). This is specific enough to distinguish it from siblings like blender_exec or blender_viewport, even without naming them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when the tool should be used: when a summary of the current Blender scene/collections is needed. However, it does not explicitly state when to use this tool instead of siblings like blender_health or blender_viewport, nor does it mention any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

blender_viewportA

Capture the current 3D viewport as a PNG (OpenGL, longest edge capped). Does not run a full render.

ParametersJSON Schema
NameRequiredDescriptionDefault
maxEdgeNoLongest edge in pixels. Default 1280.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries full responsibility. It discloses key behavior: uses OpenGL viewport capture, not a full render engine, and caps the longest edge. As a capture, side effects are minimal, and the non-render clarification is the most important behavioral trait; nothing contradicts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences that front-load the action and then add the essential 'not a full render' caveat. No filler words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter, read-only capture tool, the description covers what it does and what it avoids. The only minor gap is the lack of explicit output carry-back (file path vs. data), but the PNG output is stated, so it is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with a full explanation of maxEdge (default, max, exclusive minimum). The description adds no parameter details, which is fine under the baseline; no compensation needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Capture') and resource ('current 3D viewport') with the output format ('PNG') and method ('OpenGL'). The clarification 'Does not run a full render' distinguishes it from a render tool, and the sibling list (health, exec, scene_info) makes it clearly a snapshot utility.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context that it captures the viewport rather than executing a full render, which implies use for quick previews. It does not explicitly name an alternative tool or condition, but the scope statement is sufficient given how different the siblings are.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedblender_exec
    • First observedblender_health
    • First observedblender_scene_info
    • First observedblender_viewport

TDQS

A4.2/5.0

Scored across 4 tools

Disambiguation4/5

Each tool has a clear primary purpose: health checking, viewport capture, Python execution, and scene summary. Some minor overlap exists between health and scene_info since both report the current scene name, but descriptions make the distinction clear.

Naming Consistency4/5

All tools use snake_case with the blender_ prefix, which creates a clear family. Naming blends nouns (blender_health, blender_viewport, blender_scene_info) with a verb (blender_exec), but the pattern remains predictable and readable.

Tool Count4/5

Four tools is a reasonable size for a Blender bridge server. It is slightly lean, but the presence of blender_exec as a general-purpose escape hatch means the small count does not feel restrictive.

Completeness5/5

The tool surface is essentially complete because blender_exec allows arbitrary bpy Python execution, covering any missing operation. The dedicated health, viewport, and scene_info tools handle the most common inspection and interaction workflows without dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects MCP-compatible clients to a live Blender scene for AI-assisted 3D workflows, enabling inspection and controlled operations on objects, materials, cameras, lights, render settings, animation, UVs, Geometry Nodes, imports, exports, and Python execution.
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Connects MCP clients to a local Blender + Bonsai (BlenderBIM) session for scene inspection, IFC project querying, viewport screenshots, and executing Python code in Blender.
    8
    6
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables LLM clients like Claude to control Blender remotely, including scene inspection, object creation/modification, and Python code execution, via a socket-based MCP server.
    227 npm
    MIT