Back to MCP directory
publicPublicdnsLocal runtime

revit-mcp

revit-mcp是一个通过MCP协议与Revit交互的项目,提供服务器端工具,需配合revit-mcp-plugin使用,支持AI获取Revit数据、驱动操作及代码执行。

article

README

🚀 revit-mcp 说明文档

revit-mcp 允许您借助 MCP 协议,使用支持 MCP 的客户端(如 Claude、Cline 等)与 Revit 进行交互。该项目作为服务器端,为 AI 提供工具,需结合 revit-mcp-plugin(用于驱动 Revit)一同使用。

加入社区

🚀 快速开始

revit-mcp 可让您通过 MCP 协议与 Revit 进行交互,需搭配支持 MCP 的客户端使用,且要结合 revit-mcp-plugin 驱动 Revit。

✨ 主要特性

  • 允许 AI 获取 Revit 项目的数据。
  • 允许 AI 驱动 Revit 创建、修改和删除元素。
  • 可将 AI 生成的代码发送到 Revit 执行(在某些简单场景且需求清晰的情况下成功率更高)。

📦 安装指南

1. 构建本地 MCP 服务

  • 安装依赖项
npm install
  • 构建项目
npm run build

2. 客户端配置

Claude 客户端

打开 Claude 客户端 -> 设置 -> 开发者 -> 编辑配置 -> claude_desktop_config.json,将以下内容添加到 JSON 文件中:

{
    "mcpServers": {
        "revit-mcp": {
            "command": "node",
            "args": ["<path to the built file>\\build\\index.js"]
        }
    }
}

重启 Claude 客户端,当看到锤子图标时,表明与 MCP 服务的连接正常。 claude

📚 详细文档

系统架构

flowchart LR
	CladueDesktop --> revit-mcp --> SocketService--commandName-->CommandlSet--command-->CommandExecute
	CommandManager --> CommandlSet
	CommandExecute --executeResult--> SocketService
	CommandProject1 --> CommandManager
	CommandProject2 --> CommandManager
	CommandProject... --> CommandManager
	subgraph ide1 [MCPClient]
	CladueDesktop
	end
	subgraph ide2 [MCPServer]
	revit-mcp
	end
	subgraph ide3 [Revit]
			subgraph ide3.1 [revit-mcp-plugin]
				SocketService
				CommandlSet
				CommandManager
				CommandExecute
			end
	end

支持的工具

| 属性 | 详情 | |------|------| | get_current_view_info | 获取当前视图信息 | | get_current_view_elements | 获取当前视图中的元素 | | get_available_family_types | 获取当前项目中可用的家庭类型 | | get_selected_elements | 获取选中的元素 | | create_point_based_element | 创建基于点的元素(门、窗等) | | create_line_based_element | 创建基于线的元素(墙、柱等) | | modify_element | 修改元素属性 | | delete_element | 删除元素 | | execute_script | 执行自定义脚本 | | get_property_values | 获取元素属性值 | | set_property_values | 设置元素属性值 | | create_dimension | 创建标注(尺寸标注) | | update_dimension | 更新标注(尺寸标注) | | delete_dimension | 删除标注(尺寸标注) | | create_annotation | 创建注释 | | update_annotation | 更新注释 | | delete_annotation | 删除注释 |

⚠️ 重要提示

安装环境的具体要求仍需考虑 revit-mcp-plugin 的需求,请参考 revit-mcp-plugin

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client