MCP for Blender is configured via environment variables in your MCP client config, or via Blender's Add-on Preferences panel. This page is the complete reference for all settings.
MCP Server Environment Variables
These variables control how the MCP server connects to Blender and how it behaves.
| Variable | Default | Description |
|---|---|---|
BLENDER_HOST |
localhost |
Host address of the Blender socket server (overridden by --host) |
BLENDER_PORT |
9876 |
Port of the Blender socket server (overridden by --port) |
BLENDER_MCP_SAFE_MODE |
off |
Set to 1 to validate scripts before they run in Blender (see Safe mode) |
DISABLE_TELEMETRY |
(unset) | Set to true to disable all telemetry, including the minimal anonymous usage record |
UV_PYTHON_PREFERENCE |
(unset) | Set to only-managed to prevent uv from using system Python |
BLENDERMCP_ADDONS_DIR |
(unset) | Override the default path for addon installation |
Command-Line Flags
--host and --port set the connection directly and take precedence over the environment variables. This is handy for running several Blender instances side by side, with one MCP client entry per port:
{
"mcpServers": {
"blender": { "command": "uvx", "args": ["mcp-for-blender"] },
"blender-b": { "command": "uvx", "args": ["mcp-for-blender", "--port", "9877"] }
}
}Each Blender instance needs its own port set in the MCP for Blender sidebar panel to match.
Safe mode
By default, the AI can run any Python code in Blender. Set BLENDER_MCP_SAFE_MODE=1 to check every script before it runs and block risky code, such as reading or writing files directly, running other programs, accessing the network, or installing code that keeps running after the script ends. Normal Blender work (modeling, materials, rendering, saving, import/export) still works. Blocked scripts are sent back to the AI with the reason, so it can try again with a corrected version.
export BLENDER_MCP_SAFE_MODE=1Credential Environment Variables
You can supply integration API keys as environment variables instead of entering them in Blender, which is useful for headless setups or CI. These are read by the Blender addon, not the MCP server, so set them in the environment Blender is launched from. Putting them in your MCP client config has no effect.
| Variable | Integration |
|---|---|
BLENDERMCP_SKETCHFAB_API_KEY |
Sketchfab |
BLENDERMCP_POLYPIZZA_API_KEY |
Poly Pizza |
BLENDERMCP_HYPER3D_API_KEY |
Hyper3D Rodin |
BLENDERMCP_HUNYUAN3D_SECRET_ID |
Hunyuan3D |
BLENDERMCP_HUNYUAN3D_SECRET_KEY |
Hunyuan3D |
BLENDERMCP_HUNYUAN3D_API_URL |
Hunyuan3D (for local API mode) |
Blender Add-on Preferences Panel
Persistent credentials and telemetry settings are stored inside Blender so they survive restarts.
- In Blender, open Edit → Preferences → Add-ons
- Search for MCP for Blender under the Interface category
- Expand the addon panel to reveal:
- Sketchfab API Key
- Poly Pizza API Key
- Hyper3D API Key
- Hunyuan3D SecretId
- Hunyuan3D SecretKey
- Hunyuan3D API URL
- Allow Telemetry checkbox
Values you enter here are saved to Blender's user preferences and do not need to be re-entered each session.
MCP Client Config Example
The following JSON shows a Claude Desktop configuration with the server-side environment variables set.
{
"mcpServers": {
"blender": {
"command": "uvx",
"args": ["mcp-for-blender"],
"env": {
"BLENDER_HOST": "localhost",
"BLENDER_PORT": "9876",
"BLENDER_MCP_SAFE_MODE": "1",
"DISABLE_TELEMETRY": "true"
}
}
}
}You only need to include the variables you want to override. API keys don't go here: enter them in Blender's Add-on Preferences, or set the BLENDERMCP_* variables in the environment Blender runs in.