Bonsai MCP
Bonsai MCP connects an MCP client (e.g., Claude, Cursor, VS Code) to a running Blender + Bonsai (BlenderBIM) session, enabling inspection, querying, and manipulation of 3D scenes and IFC building models.
Scene & Object Inspection
Get a summary of the current Blender scene (object counts, collections, IFC availability), filtered by type, name, class, or GlobalId.
Retrieve detailed info (name, type, location, dimensions, IFC class, GlobalId) for currently selected objects.
IFC Data Querying
Fetch IFC property sets (psets) and quantity sets (qtos) for one or more objects (up to 100 targets per call).
Get IFC project info: schema version, project name, site/building/storey counts, entity counts, materials, and classifications.
Viewport Interaction
Capture screenshots of the Blender 3D viewport with options to set view direction (top, front, isometric, camera, etc.), frame content (all or selected), image format (JPEG/PNG), quality, and resolution. Optionally returns 2D bounding boxes for visible objects.
Code Execution
Run IfcOpenShell/Bonsai API Python code to query or modify IFC entities, read/write properties, traverse the model, and call
ifcopenshell.apioperations (bpyis blocked for safety).Run arbitrary Python with full
bpyaccess for Blender-specific tasks like viewport manipulation, rendering, object transforms, and modifiers.
IFC Model Management
Save the loaded IFC model in-place or to a new path (with overwrite protection), with an option to reload the project so IFC edits are reflected in the Blender viewport.
Diagnostics
Use the
doctorcommand to verify the bridge connection and tool availability.
Allows connecting MCP clients to a running Blender session with Bonsai (BlenderBIM), enabling scene inspection, IFC project queries, viewport capture, and Python execution inside Blender.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bonsai MCPList every wall in the model with its fire rating."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bonsai MCP
A local Model Context Protocol server that connects any MCP client (Claude Desktop, Claude Code, Cursor, VS Code, OpenAI Codex) to a running Blender + Bonsai (BlenderBIM) session. Inspect the scene, query the loaded IFC project, capture the viewport, and run Python inside Blender.
MCP client --stdio--> bonsai-mcp --127.0.0.1:9878--> Blender add-on (bpy + Bonsai + IfcOpenShell)This project is part of IFC-CoPilot: A Tool-Based Framework for LLM-Driven IFC Building Design and a more improved version of ifc-bonsai-mcp.
Requirements
Blender 3.6+ (4.x recommended).
Bonsai (BlenderBIM), only for the IFC tools. Install it from bonsaibim.org.
uv, one-time install below. Runs the server and handles Python 3.10+ for you.
git, to clone this repo. The server runs from your local checkout; it is not published to PyPI.
Related MCP server: Blender MCP Bridge
Setup (one-time)
Do these once. uv installs everything into the repo's own .venv the
first time you run it; nothing is installed globally, and nothing is
fetched from PyPI.
1. Install uv:
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"2. Clone this repo somewhere permanent, and note its full path; you point your MCP client at it below:
git clone https://github.com/show2instruct/bonsai-mcp.gitQuick start
1. Install the Blender add-on
In Blender: Edit > Preferences > Add-ons. On Blender 4.2+/5.x, open the ▾ menu (top-right) > Install from Disk...; on older versions use the Install... button.
Pick
blender_addon/bonsai_bridge.pyfrom the repo you cloned: that exact file, notscripts/package_addon.pyor the.zip. Then tick Bonsai MCP Bridge to enable it.Open the sidebar (press N) > Bonsai MCP tab > Start Bridge. It now listens on
127.0.0.1:9878.
2. Connect your client
Point your client at the folder you cloned. Everywhere below, replace
/path/to/bonsai-mcp with that path. On Windows in JSON, either use forward
slashes or double every backslash (C:\\Users\\you\\bonsai-mcp).
Claude Code:
claude mcp add bonsai-mcp -- uv run --directory /path/to/bonsai-mcp bonsai-mcpClaude Desktop, Cursor, VS Code, and other clients: add this to the client's MCP config, then restart the client:
{ "mcpServers": { "bonsai-mcp": { "command": "uv", "args": ["run", "--directory", "/path/to/bonsai-mcp", "bonsai-mcp"] } } }On Windows, if the client can't find
uv, use its full path as thecommand(e.g.C:\\Users\\you\\.local\\bin\\uv.exe).
uv run builds the project into the repo's .venv on first launch
(editable, so your local edits take effect on the next restart) and caches
it after that.
3. Verify
With Blender running and the bridge started, run this from inside the cloned folder:
uv run bonsai-mcp doctordoctor pings the bridge and reports Blender / IfcOpenShell status and the
tools it exposes.
Per-client config paths, the Windows uv.exe path note, and optional
BONSAI_MCP_* settings are in docs/clients.md.
Example configs live in examples/; set the --directory
path to your clone.
Tools
Eight tools, each tagged [QUERY] (read-only) or [EDIT] (mutates state).
Category | Tool | Purpose |
QUERY |
| Scene summary plus an optional filtered object list. |
QUERY |
| Per-object info for the current selection. |
QUERY |
| IFC property and quantity sets for one or many objects. |
QUERY |
| Capture the viewport (aim with |
QUERY |
| Schema, counts, materials, classifications. |
EDIT |
| Run IfcOpenShell / Bonsai API code. |
EDIT |
| Run arbitrary Python with full |
EDIT |
| Save in place, save-as (guarded), and optional viewport reload. |
Full reference with inputs, outputs, and examples: docs/tools.md.
Example prompt, with an IFC project open in Bonsai:
"List every wall in the model with its fire rating."
Safety
The bridge binds to 127.0.0.1 only and has no authentication, and
execute_blender_code runs arbitrary Python. Treat it like an open Python
REPL on your machine and never expose it to a network. See
docs/safety.md.
Documentation
Client setup (Claude, Cursor, VS Code, OpenAI)
Contributing
Python 3.10+ and uv:
uv venv
uv pip install -e ".[dev]"
uv run ruff check src tests blender_addon scripts
uv run pytestAdd tests and docs for behavior changes. Report security issues privately through GitHub Security Advisories.
License
MIT. See LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Show2Instruct/bonsai-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server