You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The revit-mcp-plugin allows you to interact with Revit through the MCP protocol using the Claude client.
7
+
revit-mcp-plugin is a Revit plugin based on the MCP protocol, enabling AI to interact with Revit.
8
8
9
-
This project is the Revit client (receives messages, operates Revit) and needs to be used in conjunction with [revit-mcp](https://github.com/revit-mcp/revit-mcp) (provides tools to AI).
9
+
This project is part of the revit-mcp project (receives messages, loads command sets, operates Revit), and needs to be used in conjunction with [revit-mcp](https://github.com/revit-mcp/revit-mcp) (provides tools to AI) and [revit-mcp-commandset](https://github.com/revit-mcp/revit-mcp-commandset) (specific feature implementations).
@@ -30,190 +32,100 @@ Register the plugin and restart Revit:
30
32
</RevitAddIns>
31
33
```
32
34
33
-
### Enable Service
34
-
Add-in Modules -> mcp -> Start mcp service listening
35
-
36
-
### Adding Commands
37
-
To add commands, you only need to focus on the Commands directory (specific command implementation) and the Core/SocketService.cs file (command registration).
35
+
`%your_path%` needs to be replaced with the actual path after compilation.
38
36
39
-
Each command in the Commands directory is divided into two parts:
40
-
*`XXXCommand` is responsible for parsing parameters and triggering event handlers, while also handling timeouts and errors
41
-
*`XXXEventHandler` is responsible for the actual operation, using transactions to ensure atomicity
37
+
### Configure Commands
42
38
43
-
Commands need to be registered in the RegisterCommands method of SocketService before they can be called by the mcp service.
39
+
Add-in Modules -> Revit MCP Plugin -> Settings
44
40
45
-
**Process**
46
-
1. Create a new feature subdirectory in the `Commands` directory (e.g., `Commands/window/`)
47
-
2. Add an event handler (e.g., `CreateWindowEventHandler.cs`), which is based on Revit's external event
48
-
3. Add a command class (e.g., `CreateWindowCommand.cs`), which parses information from the mcp server and calls the handler for implementation
49
-
4. Register the new command in the `RegisterCommands` method of `SocketService`
50
-
51
-
## Project File Organization
41
+
This interface is used to configure the commands to be loaded into Revit. Click OpenCommandSetFolder to open the folder storing command sets. A typical command set folder structure looks like this:
Open the service to allow AI to discover your Revit program. Now AI can control your Revit!
151
61
152
-
命令需要在SocketService中的RegisterCommands注册后才能被mcp服务调用
62
+
> Note: If you modify the configured commands after enabling the service, you may need to restart REVIT for the configuration to take effect. This is related to whether the command has already been registered.
0 commit comments