Skip to main content
Glama

Bonsai-mcp - IfcOpenShell을 통한 IFC용 Blender 모델 컨텍스트 프로토콜 통합

Bonsai-mcp는 BlenderMCP 의 포크로, Bonsai를 통해 IFC(Industry Foundation Classes) 모델에 대한 전담 지원을 통해 기존 기능을 확장합니다. 이 통합은 Claude 또는 모든 LLM(단, Claude Desktop Client를 사용해서만 테스트했습니다)을 Blender에 연결하여 IfcOpenShell 명령을 실행할 수 있는 기능을 보여주는 간단한 개념 증명입니다.

특징

  • IFC 특정 기능 : IFC 모델 쿼리, 공간 구조 분석 및 건물 요소 검사

  • 5가지 강력한 IFC 도구 : 프로젝트 정보 검사, 엔터티 나열, 속성 조사, 공간 구조 탐색 및 관계 분석

  • 순차적 사고 : 구조화된 문제 해결을 위한 modelcontextprotocol/servers 의 순차적 사고 도구 포함

  • BlenderMCP의 원래 구현에서 코드 실행 도구 : Blender에서 객체를 생성 및 수정하고, 재료를 적용하고, Python 코드를 실행합니다.

  • 표준 모델로 테스트 : 기본 ifcopenshell 주택 모델( AC20-FZK-Haus.ifc )로 작동하는 것이 검증되었습니다.

Related MCP server: BlenderMCP

구성 요소

이 시스템은 두 가지 주요 구성 요소로 구성됩니다.

  1. Blender 애드온( addon.py ) : IFC 관련 작업을 포함하여 명령을 수신하고 실행하기 위해 Blender 내에 소켓 서버를 생성하는 Blender 애드온입니다.

  2. MCP 서버( blender_mcp_tools.py ) : 모델 컨텍스트 프로토콜을 구현하고 Blender 애드온에 연결하는 Python 서버

설치

필수 조건

  • 블렌더 3.0 이상

  • Python 3.10 이상

  • uv 패키지 관리자

  • Blender용 Bonsai BIM 애드온(IFC 기능용)

uv 설치:

스코틀랜드 사람:

지엑스피1

윈도우:

powershell -c "irm https://astral.sh/uv/install.ps1 | iex" 
set Path=C:\Users\[username]\.local\bin;%Path%

다른 플랫폼의 경우 uv 설치 가이드를 참조하세요.

저장소를 복제합니다

git clone https://github.com/JotaDeRodriguez/Bonsai_mcp

데스크톱 통합을 위한 Claude

claude_desktop_config.json 파일을 편집하여(Claude > 설정 > 개발자 > 구성 편집) 다음을 포함합니다.

{
    "mcpServers": {
        "Bonsai-mcp": {
            "command": "uv",
            "args": [
              "--directory",
              "\\your\\path\\to\\Bonsai_mcp",
              "run",
              "tools.py"
          ]
        }
    }
}

블렌더 애드온 설치

  1. 이 저장소에서 addon.py 파일을 다운로드하세요

  2. 블렌더 열기

  3. 편집 > 기본 설정 > 추가 기능으로 이동하세요.

  4. "설치..."를 클릭하고 addon.py 파일을 선택하세요

  5. "인터페이스: Blender MCP - IFC" 옆의 상자를 체크하여 애드온을 활성화하세요.

용법

연결 시작

  1. Blender에서 3D 보기 사이드바로 이동합니다(표시되지 않으면 N을 누르세요)

  2. "Blender MCP - IFC" 탭을 찾으세요

  3. "Claude에게 연결"을 클릭하세요

  4. MCP 서버가 실행 중인지 확인하세요

Claude와 함께 사용

연결되면 Claude의 인터페이스에 Blender MCP IFC 통합을 위한 도구와 함께 망치 아이콘이 표시됩니다.

IFC 도구

이 포크는 5가지 강력한 IFC 전용 도구를 추가합니다.

1. get_ifc_project_info

이름, 설명, 다양한 엔터티 유형의 수를 포함하여 IFC 프로젝트에 대한 기본 정보를 알아보세요.

예: "이 IFC 프로젝트에 대한 기본 정보는 무엇입니까?"

2. 리스트_ifc_엔터티

특정 유형(벽, 문, 공간 등)의 IFC 엔터티를 나열합니다.

예: "IFC 모델의 모든 벽을 나열하세요" 또는 "이 건물의 창문을 보여주세요"

3. get_ifc_properties

GlobalId로 특정 IFC 엔터티의 모든 속성을 가져옵니다.

예: "ID가 1Dvrgv7Tf5IfTEapMkwDQY인 이 벽의 속성은 무엇입니까?"

4. get_ifc_spatial_structure

IFC 모델의 공간적 계층 구조(부지, 건물, 층수, 공간)를 파악합니다.

예: "이 건물의 공간 구조를 보여주세요"

5. get_ifc_relationships

특정 IFC 엔터티에 대한 모든 관계를 가져옵니다.

예: "현관문의 관계는 무엇입니까?"

블렌더 코드 실행

원래 MCP 구현의 레거시 기능입니다. Claude가 Blender에서 임의의 Python 코드를 실행할 수 있도록 합니다. 주의해서 사용하세요.

순차적 사고 도구

이러한 통합에는 문제 해결 및 분석을 위한 세부적이고 단계별 사고 과정을 용이하게 하는 순차적 사고 도구도 포함됩니다.

도구 매개변수:

  • thought (문자열): 현재 생각 단계

  • nextThoughtNeeded (부울): 다른 사고 단계가 필요한지 여부

  • thoughtNumber (정수): 현재 생각 번호

  • totalThoughts (정수): 필요한 총 생각 수 추정

  • isRevision (부울, 선택 사항): 이것이 이전 생각을 수정하는지 여부

  • revisesThought (정수, 선택 사항): 어떤 생각이 재고되고 있는가

  • branchFromThought (정수, 선택 사항): 분기점 생각 번호

  • branchId (문자열, 선택 사항): 지점 식별자

  • needsMoreThoughts (부울, 선택 사항): 더 많은 생각이 필요한 경우

예: "순차적 사고를 사용하여 이 건물의 에너지 효율성을 분석하세요"

예제 명령

다음은 Claude에게 IFC 모델을 사용하여 수행할 수 있는 작업의 몇 가지 예입니다.

  • "IFC 모델을 분석하고 벽, 문, 창문이 몇 개 있는지 알려주세요."

  • "이 건물 모델의 공간 구조를 보여주세요"

  • "이 IFC 모델의 모든 공간과 해당 속성을 나열하세요"

  • "이 건물의 모든 구조적 요소를 식별하세요"

  • "이 벽과 다른 요소들 사이의 관계는 무엇인가?"

  • "IFC 모델을 기반으로 이 건물에 대한 유지관리 계획을 수립하기 위해 순차적 사고를 활용하세요."

문제 해결

  • 연결 문제 : Blender 애드온 서버가 실행 중이고 MCP 서버가 Claude에 구성되어 있는지 확인하세요.

  • IFC 모델이 로드되지 않음 : Bonsai BIM 애드온이 설치되어 있고 IFC 파일이 로드되었는지 확인하세요.

  • 시간 초과 오류 : 요청을 단순화하거나 더 작은 단계로 나누어보세요.

기술적 세부 사항

IFC 통합은 Bonsai BIM 모듈을 사용하여 Blender의 ifcopenshell 기능에 접근합니다. 통신은 기존 BlenderMCP와 마찬가지로 TCP 소켓을 통한 JSON 기반 프로토콜을 따릅니다.

제한 사항 및 보안 고려 사항

  • 원래 프로젝트의 execute_blender_code 도구는 여전히 사용 가능하며, Blender에서 임의의 Python 코드를 실행할 수 있습니다. 주의해서 사용하고 작업 내용을 항상 저장하세요.

  • 복잡한 IFC 모델의 경우 작업을 더 작은 단계로 나누어야 할 수도 있습니다.

  • IFC 쿼리 성능은 모델 크기와 복잡성에 따라 달라집니다.

크레딧

할 일

커서 구현 'get_selected_ifc_elements' 설명 추가

Available Tools

17 tools
execute_blender_codeC
Execute arbitrary Python code in Blender.

Parameters:
- code: The Python code to execute

Inputs: code (required).

export_bc3_budgetA
Export a BC3 budget file (FIEBDC-3/2016) based on the IFC model loaded in Blender.

This tool creates a complete construction budget in BC3 format by:
1. Extracting the complete IFC spatial structure (Project → Site → Building → Storey)
2. Extracting IFC quantities and measurements for all building elements
3. Converting to BC3 hierarchical format with IFC2BC3Converter:
   - Generates budget chapters from IFC spatial hierarchy
   - Groups building elements by type and categories defined in external JSON
   - Assigns unit prices from language-specific JSON database
   - Creates detailed measurements sorted alphabetically
4. Exports to BC3 file with windows-1252 encoding

Features:
- Multi-language support (Spanish/English) for descriptions and labels
- Automatic element categorization using external JSON configuration
- Optimized conversion with O(1) lookups and batch operations
- Detailed measurements with dimensions (units, length, width, height)
- Full FIEBDC-3/2016 format compliance

Configuration files (in resources/bc3_helper_files/):
- precios_unitarios.json / unit_prices.json: Unit prices per IFC type
- spatial_labels_es.json / spatial_labels_en.json: Spatial element translations
- element_categories.json: IFC type to category mappings

Args:
    language: Language for the budget file ('es' for Spanish, 'en' for English). Default is 'es'.

Returns:
    A confirmation message with the path to the generated BC3 file in the exports/ folder.

Inputs: language.

export_drawing_pngA

Export drawings as PNG images with custom resolution.

Creates a drawing, with the view type specified, of the IFC building at the specified 
height above the floor level. Supports custom resolution for high-quality architectural drawings.

Args:
    height_offset: Height in meters above the storey level for the camera position (default 0.5m)
    view_type: Type of view - "top" for plan view, "front", "right" and "left" for elevation views, and "isometric" for 3D view
    resolution_x: Horizontal resolution in pixels (default 1920, max recommended 4096)
    resolution_y: Vertical resolution in pixels (default 1080, max recommended 4096)
    storey_name: Specific storey name to add to the file name (if None, prints default in the file name)
    output_path: Optional file path to save the PNG (if None, returns as base64 image)

Returns:
    metadata and the path of the file image of the drawing at the specified resolution

Inputs: height_offset, view_type, resolution_x, resolution_y, +2 more.

export_ifc_dataB
Export IFC data to a file in JSON or CSV format.

This tool extracts IFC data and creates a structured export file. You can filter
by entity type and/or building level, and choose the output format.

Args:
    entity_type: Type of IFC entity to export (e.g., "IfcWall") - leave empty for all entities
    level_name: Name of the building level to filter by (e.g., "Level 1") - leave empty for all levels
    output_format: "json" or "csv" format for the output file
    
Returns:
    Confirmation message with the export file path or an error message

Inputs: entity_type, level_name, output_format, ctx.

generate_idsA
Creates an .ids file in Blender/Bonsai by calling the add-on handler 'generate_ids'.

Parameters:
  - title (str): Title of the IDS.
  - specs (list | JSON str): List of 'specs' containing 'applicability' and 'requirements'.
    Each facet is a dict with at least a 'type' field ("Entity", "Attribute", "Property",
    "Material", "Classification", "PartOf") and its corresponding attributes.
  - description, author, ids_version, date_iso, purpose, milestone: IDS metadata fields.
  - output_path (str): Full path to the .ids file to be created. If omitted, the add-on will generate a default name.

Returns:
  - JSON (str) with the handler result: {"ok": bool, "output_path": "...", "message": "..."} 
    or {"ok": False, "error": "..."}

Inputs: title (required), specs (required), description, author, +5 more.

georeference_ifc_modelC

Georeferences the IFC currently opened in Bonsai/BlenderBIM by creating or updating IfcProjectedCRS and IfcMapConversion. Optionally updates IfcSite and writes the file to disk.

Inputs: crs_mode (required), epsg, crs_name, geodetic_datum, +19 more.

get_ifc_georeferencing_infoA
Checks whether the IFC currently opened in Bonsai/BlenderBIM is georeferenced
and returns the key georeferencing information.

Parameters
----------
include_contexts : bool
    If True, adds a breakdown of the RepresentationContexts and operations.
    

Returns
--------
str (JSON pretty-printed)
    {
      "georeferenced": true|false,
      "crs": {
        "name": str|null,
        "geodetic_datum": str|null,
        "vertical_datum": str|null,
        "map_unit": str|null
      },
      "map_conversion": {
        "eastings": float|null,
        "northings": float|null,
        "orthogonal_height": float|null,
        "scale": float|null,
        "x_axis_abscissa": float|null,
        "x_axis_ordinate": float|null
      },
      "world_coordinate_system": {
        "origin": [x, y, z]|null
      },
      "true_north": {
        "direction_ratios": [x, y]|null
      },
      "site": {
        "local_placement_origin": [x, y, z]|null,
        "ref_latitude": [deg, min, sec, millionth]|null,
        "ref_longitude": [deg, min, sec, millionth]|null,
        "ref_elevation": float|null
      },
      "contexts": [...],              # only if include_contexts = true
      "warnings": [ ... ]             # Informational message
    }

Notes
-----
- This tool acts as a wrapper: it sends the "get_ifc_georeferencing_info"
  command to the Blender add-on. The add-on must implement that logic
  (reading IfcProject/IfcGeometricRepresentationContext, IfcMapConversion,
  TargetCRS, IfcSite.RefLatitude/RefLongitude/RefElevation, etc.).
- It always returns a JSON string with indentation for easier reading.

Inputs: include_contexts.

get_ifc_project_infoB
Get basic information about the IFC project, including name, description, 
and counts of different entity types.

Returns:
    A JSON-formatted string with project information

Inputs: no named parameters.

get_ifc_propertiesA
Get properties of IFC entities. Can be used to get properties of a specific entity by GlobalId,
or to get properties of all currently selected objects in Blender.

Args:
    global_id: GlobalId of a specific IFC entity (optional if selected_only is True)
    selected_only: If True, return properties for all selected objects instead of a specific entity

Returns:
    A JSON-formatted string with entity information and properties

Inputs: global_id, selected_only.

get_ifc_quantitiesC
Extract and get basic qtos about the IFC project.

Returns:
    A JSON-formatted string with project quantities information

Inputs: no named parameters.

get_ifc_relationshipsB
Get all relationships for a specific IFC entity.

Args:
    global_id: GlobalId of the IFC entity

Returns:
    A JSON-formatted string with all relationships the entity participates in

Inputs: global_id (required).

get_ifc_spatial_structureB
Get the spatial structure of the IFC model (site, building, storey, space hierarchy).

Returns:
    A JSON-formatted string representing the hierarchical structure of the IFC model

Inputs: no named parameters.

get_ifc_total_structureA
Get the complete IFC structure including spatial hierarchy and all building elements.

This function extends the basic spatial structure to include building elements like walls,
doors, windows, columns, beams, etc. that are contained within each spatial element.
It provides a comprehensive view of how the building is organized both spatially and
in terms of its physical components.

Returns:
    A JSON-formatted string representing the complete hierarchical structure of the IFC model
    including spatial elements and their contained building elements, plus summary statistics

Inputs: no named parameters.

get_selected_ifc_entitiesA
Get IFC entities corresponding to the currently selected objects in Blender.
This allows working specifically with objects the user has manually selected in the Blender UI.

Returns:
    A JSON-formatted string with information about the selected IFC entities

Inputs: no named parameters.

get_user_viewA
Capture and return the current Blender viewport as an image.
Shows what the user is currently seeing in Blender.

Focus mostly on the 3D viewport. Use the UI to assist in your understanding of the scene but only refer to it if specifically prompted.

Args:
    max_dimension: Maximum dimension (width or height) in pixels for the returned image
    compression_quality: Image compression quality (1-100, higher is better quality but larger)

Returns:
    An image of the current Blender viewport

Inputs: no named parameters.

list_ifc_entitiesB
List IFC entities of a specific type. Can be filtered to only include objects
currently selected in the Blender UI.

Args:
    entity_type: Type of IFC entity to list (e.g., "IfcWall")
    limit: Maximum number of entities to return
    selected_only: If True, only return information about selected objects

Returns:
    A JSON-formatted string listing the specified entities

Inputs: entity_type, limit, selected_only.

place_ifc_objectB
Place an IFC object at a specified location with optional rotation.

This tool allows you to create and position IFC elements in the model.
The object is placed using the specified IFC type and positioned
at the given coordinates with optional rotation around the Z axis.

Args:
    type_name: Name of the IFC element type to place (must exist in the model)
    x: X-coordinate in model space
    y: Y-coordinate in model space
    z: Z-coordinate in model space
    rotation: Rotation angle in degrees around the Z axis (default: 0)
    
Returns:
    A message with the result of the placement operation

Inputs: type_name (required), x (required), y (required), z (required), +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have distinct purposes with clear boundaries, such as export_bc3_budget for budget generation and get_ifc_georeferencing_info for georeferencing checks. However, some overlap exists between get_ifc_spatial_structure and get_ifc_total_structure, where the latter extends the former, potentially causing confusion about which to use for hierarchical data. Tools like get_ifc_properties and get_ifc_quantities are clearly differentiated by focusing on properties versus quantities.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, using snake_case uniformly. Examples include execute_blender_code, export_bc3_budget, get_ifc_project_info, and list_ifc_entities. This predictability makes it easy for agents to understand and navigate the toolset without confusion from mixed naming conventions.

    Tool Count4/5

    With 17 tools, the count is slightly high but reasonable for the domain of IFC/BIM modeling and Blender integration, which involves data extraction, export, visualization, and manipulation. Most tools serve specific functions like georeferencing, drawing export, or entity listing, though a few could potentially be consolidated (e.g., spatial structure tools) without losing functionality.

    Completeness5/5

    The toolset provides comprehensive coverage for IFC/BIM workflows, including data retrieval (e.g., get_ifc_project_info, get_ifc_properties), export functions (e.g., export_bc3_budget, export_drawing_png), spatial analysis (e.g., get_ifc_spatial_structure), and manipulation (e.g., place_ifc_object, georeference_ifc_model). It supports CRUD-like operations and lifecycle management, with no obvious gaps that would hinder agent performance in this domain.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Connects Blender to Claude AI through the Model Context Protocol, enabling AI-assisted 3D modeling, scene creation, and manipulation through natural language commands.
      17
      2
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Connects Claude AI to Blender via the Model Context Protocol to enable prompt-assisted 3D modeling, scene creation, and object manipulation. It allows users to control Blender through natural language for tasks such as modifying materials, inspecting scenes, and executing custom Python code.
      22
      MIT