Solibri MCP服务器
Solibri自动化的MCP服务器。与Solibri Office一起在Windows上运行,可通过SSE传输远程访问。
特性
- 模型检验:运行规则集并导出BCF问题
- 数量起飞:执行ITO并导出到Excel
- 模型管理:从IFC创建/更新SMC文件
- 资产管理:列出分类、规则集、ITO
- REST API集成:控制运行Solibri实例
需求
- 安装了Solibri Office的Windows
- Node.js 18+
- 有效的Solibri许可证
安装
# Clone the repo
git clone https://github.com/YOUR_USERNAME/solibri-mcp-server.git
cd solibri-mcp-server
# Install dependencies
npm install
# Configure
copy .env.example .env
# Edit .env with your settings配置
编辑 .env:
# Generate a secure token
SOLIBRI_MCP_TOKEN=your-secure-token-here
# Solibri executable path
SOLIBRI_EXE_PATH=C:\Program Files\Solibri\SOLIBRI\Solibri.exe
# Server port
SOLIBRI_MCP_PORT=3000生成安全令牌:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"跑步
npm start服务器将显示连接信息:
╔══════════════════════════════════════════════════════════════╗
║ Solibri MCP Server (SSE Transport) ║
╠══════════════════════════════════════════════════════════════╣
║ Server: http://0.0.0.0:3000
║ SSE: http://0.0.0.0:3000/sse
║ Health: http://0.0.0.0:3000/health
╚══════════════════════════════════════════════════════════════╝Claude代码配置
在您的本地计算机上,添加 ~/.claude/settings.json:
{
"mcpServers": {
"solibri": {
"type": "sse",
"url": "http://YOUR_WINDOWS_IP:3000/sse",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}可用工具
solibri_list_assets
列出可用的分类、规则集、ITO或模板。
solibri_check_model
使用指定的规则集运行模型检查。
{
"modelPath": "C:\\Models\\building.ifc",
"rulesets": ["C:\\Rulesets\\my-rules.cset"],
"outputBcf": "C:\\Output\\issues.bcf"
}solibri_quantity_takeoff
运行ITO并导出到Excel。
{
"modelPath": "C:\\Models\\building.ifc",
"itoFile": "C:\\ITO\\quantities.ito",
"outputExcel": "C:\\Output\\quantities.xlsx"
}solibri_create_model
将多个IFC合并为一个SMC。
solibri_update_model
用新的IFC版本更新现有的SMC。
solibri_autorun
执行原始自动运行命令(高级)。
solibri_status
获取正在运行的Solibri的状态(需要REST API)。
solibri_select_components
在运行Solibri时按GUID选择组件。
solibri_get_bcf
从运行Solibri会话导出BCF。
安全
- 始终使用强随机生成的令牌
- 使用VPN或SSH隧道进行远程访问
- 切勿将端口3000直接暴露于互联网
以Windows服务运行
使用 国家安全研究备忘录 作为服务运行:
nssm install SolibriMCP "C:\Program Files\nodejs\node.exe"
nssm set SolibriMCP AppParameters "C:\path\to\solibri-mcp-server\index.js"
nssm set SolibriMCP AppDirectory "C:\path\to\solibri-mcp-server"
nssm start SolibriMCP许可证
麻省理工学院
