
OakPlank/revitMCP 是一个从 https://github.com/oakplank/revitmcp. 导入的 MCP 服务器候选服务器。
概览
OakPlank/revitMCP 是一个从 https://github.com/oakplank/revitmcp. 导入的 MCP 服务器候选服务器。
概述(AI 翻译)
RevitMCP 是一个 pyRevit 扩展加上一个 Python 服务器,让 AI 客户端能与实时 Revit 会话协作。
它支持两种使用方式:
- 网页界面
http://127.0.0.1:8000 - 本地 MCP 通过 stdio 支持客户端,如 Claude Desktop、Claude Code 和 Codex
仓库布局说明:这个仓库根是pyRevit扩展的根。如果你手动从源代码安装,检出目录本身应命名为RevitMCP.extension。
工具
RevitMCP 展示了 46 个工具:
| 工具 | 描述 |
|---|---|
get_revit_project_info |
获取活跃的项目元数据、文档路径和Revit版本详情 |
get_active_view_info |
阅读当前视图的名称、类型、比例及相关元数据 |
get_active_view_elements |
捕捉活跃视图中可见元素的有界快照 |
export_active_view_image |
将活跃的Revit视图导出为本地图像文物以进行模型视觉检查 |
export_element_snapshot |
通过激活目标视图导出显式ID或活跃选中的聚焦快照,暂时隔离元素,导出3D视图时收紧剖面框,导出并恢复视图 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
RevitMCP
RevitMCP is a pyRevit extension plus a Python server that lets AI clients work against a live Revit session.
It supports two ways to use it:
- Web UI at
http://127.0.0.1:8000 - Local MCP over stdio for clients such as Claude Desktop, Claude Code, and Codex
Repository layout note: this repository root is the pyRevit extension root. If you install from source manually, the checkout directory itself should be named RevitMCP.extension.
Tools
RevitMCP exposes 46 tools:
| Tool | Description |
|---|---|
get_revit_project_info |
Get active project metadata, document path, and Revit version details |
get_active_view_info |
Read the current view’s name, type, scale, and related metadata |
get_active_view_elements |
Capture a bounded snapshot of elements visible in the active view |
export_active_view_image |
Export the active Revit view to a local image artifact for model vision inspection |
export_element_snapshot |
Export a focused snapshot from explicit IDs or the active selection by activating a target view, temporarily isolating elements, tightening a section box when exporting 3D views, exporting, and restoring the view |
isolate_elements_in_view |
Temporarily isolate explicit elements or the active selection in a view and optionally focus the camera for inspection |
clear_temporary_isolate |
Clear temporary hide/isolate in the active or target view |
activate_view |
Switch the active Revit view by view ID or view name |
duplicate_view |
Duplicate a view, optionally with detailing/as dependent, template assignment, and activation |
get_active_selection |
Read the current Revit selection as a reusable result set |
get_revit_diagnostics |
Return live pyRevit route, document, active view, selection, and write-context diagnostics |
list_family_types |
List loaded family types with category, family, type, and symbol IDs |
get_revit_schema_context |
Load canonical Revit schema context including levels, categories, families, types, and common parameters |
resolve_revit_targets |
Resolve user terms to exact Revit category, level, family, type, and parameter names |
get_revit_memory_context |
Load persistent local user/project notes for recurring Revit conventions and workflow hints |
save_revit_memory_note |
Save a persistent local user/project note for future chats and tool runs |
analyze_model_statistics |
Summarize model composition including category, family/type, view, sheet, level, and room counts |
get_elements_by_category |
Retrieve all elements for a category and store the result for follow-on actions |
select_elements_by_id |
Select elements by explicit IDs or a stored result handle |
select_stored_elements |
Select a previously stored search or filter result inside Revit |
list_stored_elements |
List stored element result sets and their counts currently available on the server |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"revitmcp": {
"command": "python",
"args": [
"C:\\Users\\YourName\\AppData\\Roaming\\pyRevit\\Extensions\\RevitMCP.extension\\lib\\RevitMCP_ExternalServer\\server.py",
"--surface",
"mcp"
]
}
},
"preferences": {
"chromeExtensionEnabled": true,
"coworkScheduledTasksEnabled": true,
"ccdScheduledTasksEnabled": true,
"sidebarMode": "chat",
"coworkWebSearchEnabled": true
}
}