Allows management and execution of Python scripts in a headless Blender environment, including creating 3D objects, analyzing scenes, and manipulating Blender projects through a scriptable interface.
Enables writing and executing Python scripts specifically for Blender automation, with support for tracking script metadata and capturing execution results.
Blender MCP Server
A Model Context Protocol (MCP) server for managing and executing Blender scripts.
Features
Add, edit, execute, and remove Blender Python scripts
Execute scripts in a headless Blender environment
View execution results and errors
Track script metadata (creation date, last modified, execution count)
Requirements
Python 3.7+
Blender installed and accessible
MCP library (
pip install mcp
)
Usage
Start the server:
python server.pyConnect to the server using an MCP client (like Claude Desktop)
Use the provided tools to manage scripts:
add_script(name, content)
- Add a new scriptedit_script(name, content)
- Edit an existing scriptexecute_script(name, blend_file=None)
- Execute a script in Blender, optionally specifying a .blend fileremove_script(name)
- Remove a script
Access resources to get information:
scripts://list
- Get list of available scriptsscript://{name}
- Get content of a specific scriptresult://{name}
- Get execution result of a script
Examples
Basic Example
Working with Blend Files
How It Works
When a script is added, it's stored in the
script_files/scripts
directoryWhen executed, the script is run in a headless Blender instance
If a blend file is specified, Blender will open that file before running the script
Otherwise, a default empty Blender scene is used
Output and errors are captured and stored in the
script_files/results
directoryMetadata about scripts is tracked in
script_files/metadata.json
Installation
Clone this repository
Install the MCP library:
pip install mcp
Ensure Blender is installed and accessible from your PATH
License
MIT
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.
A Model Context Protocol server that allows management and execution of Blender Python scripts, enabling users to create, edit and run scripts in a headless Blender environment through natural language interfaces.
Related Resources
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
- -securityAlicense-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
- -securityFlicense-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
-securityAlicense-qualityModel Context Protocol server to run Python code in a sandbox.Last updated -1,46212,756MIT License