Blender MCP 服务器
用于管理和执行 Blender 脚本的模型上下文协议 (MCP) 服务器。
特征
添加、编辑、执行和删除 Blender Python 脚本
在无头 Blender 环境中执行脚本
查看执行结果和错误
跟踪脚本元数据(创建日期、上次修改、执行次数)
要求
Python 3.7+
Blender 已安装并可访问
MCP 库 (
pip install mcp)
用法
启动服务器:
python server.py使用 MCP 客户端(如 Claude Desktop)连接到服务器
使用提供的工具来管理脚本:
add_script(name, content)- 添加新脚本edit_script(name, content)- 编辑现有脚本execute_script(name, blend_file=None)- 在 Blender 中执行脚本,可选择指定 .blend 文件remove_script(name)- 删除脚本
访问资源以获取信息:
scripts://list- 获取可用脚本列表script://{name}- 获取特定脚本的内容result://{name}- 获取脚本的执行结果
示例
基本示例
使用混合文件
工作原理
添加脚本后,它将存储在
script_files/scripts目录中执行时,脚本在无头 Blender 实例中运行
如果指定了混合文件,Blender 将在运行脚本之前打开该文件
否则,使用默认的空 Blender 场景
输出和错误被捕获并存储在
script_files/results目录中有关脚本的元数据在
script_files/metadata.json中跟踪
安装
克隆此存储库
安装 MCP 库:
pip install mcp确保 Blender 已安装并可从 PATH 中访问
执照
麻省理工学院
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
模型上下文协议服务器允许管理和执行 Blender Python 脚本,使用户能够通过自然语言界面在无头 Blender 环境中创建、编辑和运行脚本。
Related Resources
Related MCP Servers
- -security-license-qualityA Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
- -security-license-qualityA streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.Last updated -13MIT License
- -security-license-qualityA Python-based implementation of the Model Context Protocol that enables communication between a model context management server and client through a request-response architecture.Last updated -
mcp-run-pythonofficial
-security-license-qualityModel Context Protocol server to run Python code in a sandbox.Last updated -1,46213,234MIT License