Logo di IFC Bonsai MCP

IFC Bonsai MCP

Organizzazione
Show2Instruct

An MCP server that connects LLMs to IFC-based BIM workflows in Blender using the Bonsai add-on.

AutoreShow2Instruct
Repositoryifc-bonsai-mcp
LinguaPython
Fork
15
Stelle
67
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    IFC Bonsai MCP mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    67 stelle e 15 fork nel repository collegato.

IFC Bonsai MCP

IFC-Bonsai-MCP is an MCP server that connects AI language models with the Bonsai Blender add-on to read, create, and edit IFC models directly via high-level tool calls.

For a more updated version with a stronger focus on code generation, check out our new repo: https://github.com/Show2Instruct/bonsai-mcp

🚀 Highlights:

  • AI-Driven BIM: Use natural language to create and edit IFC elements like walls, doors, roofs, and stairs directly within Blender.
  • RAG-Powered Knowledge: Leverage a Retrieval-Augmented Generation system with a local vector index for instant, semantic search across IFC and IfcOpenShell documentation.
  • Advanced Geometry Generation: Create complex 3D geometry using Python and Trimesh, with tools to convert procedural meshes into native IFC elements.
  • Extensible Toolset: A comprehensive set of over 50 MCP tools for scene analysis, object manipulation, parametric creation, and knowledge retrieval.

Installation Guide

Prerequisites

Quick Installation

This is a quick overview of installation steps in the global Python environment. For more details or virtual environment setup, check the section below.

bash
# 1. Clone and setup
git clone [REPOSITORY_URL] && cd [REPOSITORY_NAME]

# 2. Install dependencies
pip install uv
uv sync

# 3. Install Blender packages (automatic)
python scripts/install_blender_packages.py

# 4. Create the zip file of blender_addon folder manually or use the helper script:
python scripts/install.py --create-addon-zip
# Then: Blender → Edit → Preferences → Add-ons → Install → blender_addon.zip
# After installing the add-on: Go to Blender UI → Sidebar Add-On Panel → BlenderMCP → Click "Connect to MCP server"

# 5. Configure Claude Desktop (Edit Config in Settings → Developer)
# Add: 
# {
#   "mcpServers": {
#     "blender": {
#       "command": "python",
#       "args": ["-m", "blender_mcp.server"],
#     }
#   }
# }

# 6. (Optional) Setup knowledge base
uv run python scripts/init_knowledge_base.py
uv run python scripts/embedding_server.py --model sentence-transformers/all-MiniLM-L6-v2 --host 127.0.0.1 --port 8080 --normalize

Here is the workflow diagram in Claude Desktop for reference: Workflow Diagram

If there are any issues, please refer to the detailed installation steps below.

Step-by-Step Installation

  • Step 1: Clone and navigate to the project

    bash
    git clone [REPOSITORY_URL]
    cd [REPOSITORY_NAME]
  • Step 2: Create and set up the virtual environment. This is for the MCP server that will run in the system/virtual environment.

    bash
    uv sync
    # Creates virtual environment: If `.venv/` doesn't exist, it creates one and installs all dependencies
    # Uses lock file: Ensures exact same versions as specified in `uv.lock`
    # Check https://docs.astral.sh/uv/ for using custom venv paths or names.

    Activate the virtual environment:

    bash
    source .venv/bin/activate    # Linux/macOS
    .venv\Scripts\activate       # Windows

    (Alternative) For a global installation, install all dependencies in your system Python environment:

    bash
    uv pip install . # records the install in uv.lock
    pip install .    # or, with pip
  • Step 3: Install Blender-specific packages (Required). These are required for the Blender add-on to function correctly.

    The MCP server runs in your system's Python environment, but the Blender add-on runs inside Blender's Python environment. Some packages need to be installed specifically in Blender:

    • Option A: Automatic Installation (Recommended) using the helper script:

      bash
      python scripts/install_blender_packages.py

      This script automatically finds your Blender installation(s), installs all required packages (ifcopenshell, trimesh, pillow, numpy), and tests that everything works correctly

    • Option B: Manual Installation

      bash
      # Navigate to Blender's Python directory (adjust path for your Blender installation)
      # Windows (typical path):
      cd "C:\Program Files\Blender Foundation\Blender 4.4\4.4\python\bin"
      
      # Install required packages for Blender add-on
      python.exe -m pip install ifcopenshell>=0.7.0
      python.exe -m pip install trimesh>=3.24.0  
      python.exe -m pip install pillow>=10.0.0
      python.exe -m pip install numpy>=1.26.0
    • Option C: Using Blender's Console

      python
      # 1. Open Blender
      # 2. Go to Scripting workspace
      # 3. Run this in the Python console:
      import subprocess
      import sys
      subprocess.check_call([sys.executable, "-m", "pip", "install", "ifcopenshell>=0.7.0", "trimesh>=3.24.0", "pillow>=10.0.0", "numpy>=1.26.0"])

Blender Add-on Packaging

The Blender add-on enables communication between Blender and the MCP server. To install it:

  1. Create a zip file of the blender_addon folder
    • Either manually or run python scripts/install.py --create-addon-zip
  2. In Blender, go to Edit > Preferences > Add-ons > Install...
  3. Select the blender_addon.zip file and activate the add-on
  4. In the main Blender UI, open Sidebar Add-On Panel → BlenderMCP → Connect to MCP server. Check /figs/workflow.png for reference.

Configuring Claude Desktop

For Virtual Environment Installation

If you installed using a virtual environment, you need to point Claude to the Python executable in the virtual environment:

  1. Open Claude Desktop > Settings > Developer > Edit Config File.
  2. Add this configuration:
    json
    {
      "mcpServers": {
        "blender": {
          "command": "C:\\path\\to\\ifc-bonsai-mcp\\.venv\\Scripts\\python.exe",
          "args": ["-m", "blender_mcp.server"],
        }
      }
    }
    Note: On Windows, use double backslashes (\\) in file paths. On macOS and Linux, use forward slashes (/).

For Global Installation

If you installed globally, use the system Python:

json
{
  "mcpServers": {
    "blender": {
      "command": "python",
      "args": ["-m", "blender_mcp.server"],
    }
  }
}
  1. Important: Replace C:/path/to/ifc-bonsai-mcp with your actual project path
  2. Restart Claude Desktop

Running the MCP Server

Important: Since the project tries to save to an IFC file and loads it, always create an empty file and save it before doing any operations. Because the MCP server directly loads the IFC file and does the edits. If a new project is created and no .ifc file is saved, then the MCP server will not update in the actual blender scene. Just do ctrl (cmd) + S and save an empty IFC file if a new project is created.

If there are connection issues please check if the "Connect to MCP server" button in the Blender add-on panel has been clicked. Check the /figs/workflow.png to see where it is located.

Code Execution Limitations: The general execute_code tool behaves unpredictably with IFC operations. The general execute code tool lacks proper context handling, cannot save changes back to the model consistently and may produce unsafe results for IFC operations. Consider disabling the general execute_code tool if there are issues.

Knowledge Base & Embeddings

The MCP server includes a RAG-powered tool to query IFC documentation and best practices. This uses a local ChromaDB index and an embedding model (Sentence Transformers). To use the RAG-powered IFC knowledge base, follow these steps:

  • Initialize the Local Chroma Index

    bash
    uv run python scripts/init_knowledge_base.py

    This downloads the embedding model (Sentence Transformers) and caches the IFC knowledge base under .cache/chromadb/.

  • Run the embedding model so the MCP server can use it for embedding generation:

    bash
    uv run python scripts/embedding_server.py --model sentence-transformers/all-MiniLM-L6-v2 --host 127.0.0.1 --port 8080 --normalize

    This starts a local embedding server that the MCP server can use for embedding generation. Adjust the model and port as needed. If the port is changed, the BLENDER_MCP_REMOTE_EMBEDDINGS_URL environment variable must be set accordingly.

List of Available Tools

The MCP server has various tools that can be called by the AI assistant. All available tools and their parameters are documented in the API Reference.

Tool NameDescription
Analysis Tools
capture_blender_window_screenshotCapture high-quality screenshot of entire Blender window
capture_blender_3dviewport_screenshotCapture screenshot of only the 3D viewport area
API Tools
execute_blender_codeExecute arbitrary Python code in Blender context
list_blender_commandsList all available Blender addon commands
execute_ifc_code_toolExecute IFC OpenShell code with security restrictions
get_scene_infoGet basic information about current Blender scene
get_blender_object_infoGet detailed Blender information about specific object
get_selected_objectsGet list of currently selected objects with GUID info
get_object_infoGet IFC object information from GUIDs or selection
get_ifc_scene_overviewGet comprehensive IFC scene overview
create_wallCreate parametric IFC wall with full control
create_two_point_wallCreate wall between two 3D points
create_polyline_wallsCreate connected walls along polyline path
update_wallUpdate existing wall properties using GUID
get_wall_propertiesGet properties of existing wall by GUID
get_roof_typesGet all supported roof types and descriptions
create_roofCreate parametric IFC roof from polyline outline
update_roofUpdate existing roof properties and regenerate geometry
delete_roofDelete one or more roofs with comprehensive cleanup
create_slabCreate parametric IFC slab with custom geometry
update_slabUpdate existing slab geometric properties
get_slab_propertiesGet comprehensive properties of existing slab
get_door_operation_typesGet all supported door operation types
create_doorCreate parametric IFC door with detailed properties
update_doorUpdate existing door properties using GUID
get_door_propertiesGet properties of existing door by GUID
get_window_partition_typesGet all supported window partition types
create_windowCreate parametric IFC window with customization
update_windowUpdate existing window properties using GUID
get_window_propertiesGet detailed properties of existing window
create_trimesh_ifcExecute Trimesh code and create IFC element
get_stairs_typesGet all supported stairs types and IFC mappings
create_stairsCreate parametric IFC stairs with various types
update_stairsUpdate existing stairs properties and geometry
delete_stairsDelete one or more stairs by their GUIDs
create_surface_styleCreate basic surface style with color/transparency
create_pbr_styleCreate PBR style with advanced material properties
apply_style_to_objectApply style directly to IFC objects
list_stylesList all available styles in current IFC model
update_styleUpdate properties of existing style
remove_styleRemove style from the model
create_mesh_ifcCreate IFC element from JSON mesh data
list_ifc_entitiesList valid IFC entity classes for mesh generation
get_trimesh_examplesGet comprehensive Trimesh code examples
RAG Tools
ensure_ifc_knowledge_readyInitialize IFC knowledge system for local model
search_ifc_knowledgeSearch IFC knowledge base with semantic search
get_ifc_knowledge_statusGet current status of IFC knowledge base system
find_ifc_functionFind IFC functions by operation and object type
get_ifc_module_infoGet detailed information about specific IFC module
get_ifc_function_detailsGet comprehensive details about specific IFC function
clear_ifc_knowledge_cacheClear cached IFC knowledge data
get_cache_statisticsGet detailed cache usage statistics

Contributing

Pull requests are welcome! See CONTRIBUTING.md for the development workflow and TROUBLESHOOTING.md for any issues.

Acknowledgements

This is not an official Blender, Bonsai or IfcOpenShell project. Thanks to BlenderMCP and Bonsai_mcp for their open source work.

Citation

Please consider citing our work if you find it useful or used in your research.

Installazione

TypingMind
{
  "mcpServers": {
    "ifc-bonsai-mcp": {
      "command": "python",
      "args": [
        "-m",
        "blender_mcp.server"
      ]
    }
  }
}

Usa MCP IFC Bonsai MCP con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso IFC Bonsai MCP, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi IFC Bonsai MCP come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di IFC Bonsai MCP.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "ifc-bonsai-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di IFC Bonsai MCP, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di IFC Bonsai MCP.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare IFC Bonsai MCP per aiutarmi con questa attività?
IFC Bonsai MCP
Certo. Ho letto.
Ecco cosa ho trovato con IFC Bonsai MCP.

Domande frequenti

A cosa serve il server MCP IFC Bonsai MCP?

IFC Bonsai MCP è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare IFC Bonsai MCP MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare IFC Bonsai MCP con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP IFC Bonsai MCP con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando IFC Bonsai MCP, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego IFC Bonsai MCP MCP a TypingMind?

IFC Bonsai MCP funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre IFC Bonsai MCP MCP in TypingMind?

IFC Bonsai MCP mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare IFC Bonsai MCP MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se IFC Bonsai MCP richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇