JB

jotaderodriguez/bonsai_mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

66 stars 25 forks 质量 81 趋势 22MIT

jotaderodriguez/bonsai_mcp 是从 https://github.com/jotaderodriguez/bonsai_mcp. 导入的 MCP 服务器候选

概览

jotaderodriguez/bonsai_mcp 是从 https://github.com/jotaderodriguez/bonsai_mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

Bonsai-mcp 是 BlenderMCP 的一个分支,扩展了原始功能,通过 Bonsai 专门支持 IFC(行业基础类)模型。该集成是一个平台,允许 LLM 读取和修改 IFC 文件。

特色

  • IFC专属功能:查询IFC模型,分析空间结构,检查建筑元素并提取数量

  • 包含十一种IFC工具:检查项目信息、列出实体、检查属性、探索空间结构、分析关系等

  • 顺序思维:包含 modelcontextprotocol/servers 中的序列思维工具,用于结构化问题解决

  • 执行原始BlenderMCP实现中的代码工具:创建和修改对象,应用材质,并在Blender中执行Python代码

组成部分

该系统由两个主要组成部分组成:

  1. Blender 插件(addon.py):一个在 Blender 内创建套接字服务器的 Blender 插件,用于接收和执行命令,包括针对 IFC 的操作

  2. MCP 服务器([tools.py)):实现模型上下文协议并连接 Blender 插件的 Python 服务器

安装 - 通过 MCP 客户端设置

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Bonsai-mcp - Model Context Protocol Integration for IFC through IfcOpenShell and Blender

Bonsai-mcp is a fork of BlenderMCP that extends the original functionality with dedicated support for IFC (Industry Foundation Classes) models through Bonsai. This integration is a platform to let LLMs read and modify IFC files.

Features

  • IFC-specific functionality: Query IFC models, analyze spatial structures, examine building elements and extract quantities

  • Eleven IFC tools included: Inspect project info, list entities, examine properties, explore spatial structure, analyze relationships and more

  • Sequential Thinking: Includes the sequential thinking tool from modelcontextprotocol/servers for structured problem solving

  • Execute Code tool from the original BlenderMCP implementation: Create and modify objects, apply materials, and execute Python code in Blender

Components

The system consists of two main components:

  1. Blender Addon (addon.py): A Blender addon that creates a socket server within Blender to receive and execute commands, including IFC-specific operations

  2. MCP Server (tools.py): A Python server that implements the Model Context Protocol and connects to the Blender addon

Installation - Through MCP Client Settings

Prerequisites

  • Blender 4.0 or newer

  • Python 3.12 or newer

  • uv package manager

  • Bonsai BIM addon for Blender (for IFC functionality)

Installing uv:

Mac:


brew  install  uv

Windows:


powershell  -c  "irm https://astral.sh/uv/install.ps1 | iex"

set  Path=C:\Users\[username]\.local\bin;%Path%

For other platforms, see the uv installation guide.

Clone the repository


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

Claude for Desktop Integration

Edit your claude_desktop_config.json file (Claude > Settings > Developer > Edit Config) to include:

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

Installation via Docker

The repository comes with a Dockerfile that makes deployment simple and consistent across different environments.

Quick Start

# Clone the repository
git clone https://github.com/JotaDeRodriguez/Bonsai_mcp
cd Bonsai_mcp

# Build the Docker image
docker build -t bonsai_mcp .

# Run the container
docker run -p 8000:8000 --name bonsai_mcp bonsai_mcp

Once running, the container will expose the MCP tools as REST/OpenAPI APIs at http://localhost:8000.

  • To verify youtr installation, open your browser and navigate to
  • http://localhost:8000/docs
在 GitHub 查看完整 README

安装

docker run -p 8000:8000 --name bonsai_mcp bonsai_mcp
新手?先看 mcpskill.org 教程 →

配置

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