Revit MCP Server
🏗️ Revit MCP 服务器
用于 Revit 集成的模型上下文协议服务器,实现 Claude AI 和 Autodesk Revit 之间的无缝通信。
🎯 概述
这款基于 TypeScript 的 MCP 服务器在 Claude AI 和 Revit 之间架起了一座桥梁,允许通过 WebSocket 连接直接与 Revit 模型交互。它实现了模型上下文协议 (MCP),从而实现以下功能:
⚡ 实时访问 Revit 模型信息
🔍 元素查询和过滤
👀 视图和级别管理
🛡️ 使用后备模拟数据进行强大的错误处理
Related MCP server: QGISMCP
✨ 特点
🔌 Revit 集成
📡 基于 WebSocket 与 Revit 插件的通信
🔄 实时模型数据访问
🔁 连接失败时优雅地回退到模拟数据
⚙️ 通过环境变量配置连接设置
🚀 核心功能
📊 模型信息
访问基本模型元数据(名称、路径、版本)
获取元素计数和最后修改日期
实时模型状态同步
🏗️元素管理
具有灵活过滤功能的查询元素
访问元素属性和几何形状
批量元素操作
🎪 视图和级别控制
列出所有可用视图
访问级别信息
浏览模型层次结构
💻 开发
📋 先决条件
Node.js(v14 或更高版本)
npm
Autodesk Revit(2023 或更高版本)
Revit WebSocket 插件(配套插件)
🔧 安装
安装依赖项:
npm install构建服务器:
npm run build对于使用自动重建的开发:
npm run watch⚙️ 配置
可以使用环境变量来配置服务器:
REVIT_HOST=127.0.0.1 # Revit plugin WebSocket host
REVIT_PORT=8080 # Revit plugin WebSocket port🔗 与 Claude Desktop 集成
将服务器配置添加到 Claude Desktop:
视窗:
%APPDATA%/Claude/claude_desktop_config.json配置格式:
{
"mcpServers": {
"revit-mcp-server": {
"command": "D:/path/to/revit-mcp-server/build/index.js"
}
}
}🐛 调试
用于调试 MCP 通信:
使用内置的 MCP 检查器:
npm run inspector使用 Revit 插件监控 WebSocket 通信
检查服务器日志以了解连接和操作状态
⚠️ 错误处理
服务器实现了强大的错误处理:
Revit 连接失败时自动回退到模拟数据
详细的错误日志记录
优雅的连接恢复
📄 许可证
MIT 许可证
🤝 贡献
欢迎贡献代码!欢迎随时提交 Pull Request。
📬 联系方式
如果您有任何问题或建议,请随时联系我们:
📧邮箱: 353554036@qq.com
💬 微信账号:modian4500
Available Tools
6 toolsget_categoriesB
获取 Revit 模型中的所有类别
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
get_element_infoC
获取 Revit 元素的详细信息
| Name | Required | Description | Default |
|---|---|---|---|
| elementId | Yes | 元素的 ID | |
| getItemPropertyInfo | No | 是否获取元素属性信息 | |
| getItemParameterInfo | No | 是否获取元素参数信息 |
get_elementsC
获取 Revit 模型中的元素
| Name | Required | Description | Default |
|---|---|---|---|
| categoryIds | No | 需要获取的元素所属类别的Id集合 | |
| viewIds | No | 需要获取的元素所处的视图的Id集合 | |
| levelIds | No | 需要获取的元素所处的标高的Id集合 |
get_familiesC
获取 Revit 模型中的所有族
| Name | Required | Description | Default |
|---|---|---|---|
| categoryId | No | 族类别 ID(可选) | |
| name | No | 族名称过滤(可选) |
get_levelsB
获取 Revit 模型中的所有楼层
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
get_viewsB
获取 Revit 模型中的所有视图
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
- First observed
get_categories - First observed
get_element_info - First observed
get_elements - First observed
get_families - First observed
get_levels - First observed
get_views
TDQS
Scored across 6 tools
Every tool has a clearly distinct purpose targeting different Revit model components: categories, element info, elements, families, levels, and views. There is no overlap in functionality, and an agent can easily distinguish between them based on the specific resource each retrieves.
All tools follow a consistent verb_noun pattern with 'get_' as the prefix and a plural or singular noun describing the resource. This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming style.
With 6 tools, the count is reasonable for a Revit model server, covering key retrieval operations. However, it might be slightly under-scoped as it lacks tools for creating, updating, or deleting elements, which could be expected in a full Revit integration.
The tool set is severely incomplete for a Revit domain, as it only provides read-only retrieval operations. There are significant gaps in CRUD coverage—no tools for creating, updating, or deleting elements, categories, families, etc., which will likely cause agent failures when trying to modify models.
Related MCP Connectors
Convert Revit files to XKT, IFC, or DWG and query BIM data via natural language.
AI for Revit: 450+ tools, 1 undo step. Windows, Revit 2024–2027 (2021–2023 included). Free account.
AI Hub for AEC — 50+ 3D formats, clash detection, ACC integration via Autodesk Platform Services.
Revit model integration via APS — elements, parameters, schedules, clashes, IFC export.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceConnects Rhino3D to Claude AI via the Model Context Protocol, enabling AI-assisted 3D modeling and design workflows through direct control of Rhino's functionality.13-
- FlicenseNot gradedqualityDmaintenanceConnects QGIS to Claude AI through the Model Context Protocol, enabling AI-assisted project creation, layer manipulation, processing algorithm execution, and Python code running within QGIS.7-
- AlicenseBqualityDmaintenanceConnects Blender to Claude AI through the Model Context Protocol, enabling AI-assisted 3D modeling, scene creation, and manipulation through natural language commands.172MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI assistants like Claude to interact with Autodesk Construction Cloud Build platform for construction project management, including issues tracking, RFIs, submittals, and document management through natural language.-