-
Notifications
You must be signed in to change notification settings - Fork 0
MCP Overview
Truong Giang Vu edited this page May 31, 2026
·
1 revision
Model Context Protocol (MCP) integration lets AI assistants and external clients discover and interact with running Revit, AutoCAD, and Civil 3D instances.
Architecture: docs/MCP/README.md
RevitDevTool MCP has two parts:
-
Standalone MCPServer —
MCPServer.exeruns outside host processes, discovers all running instances, and exposes tools to AI clients via stdio - In-host runtime — each host registers Python/C# toolsets that the server dispatches to via Named Pipe
AI Client (Cursor, Claude, etc.)
↓ MCP protocol (stdio)
MCPServer.exe
↓ Named Pipe ({Host}_{Version}_{PID})
Host Process (Revit / AutoCAD / Civil 3D)
↓ Tool dispatch
Registered toolsets (Python, C#)
Add to your MCP configuration:
{
"mcpServers": {
"revitdevtool": {
"command": "%APPDATA%/Autodesk/ApplicationPlugins/RevitDevTool.bundle/Contents/MCPServer/DevTools.McpServer.exe"
}
}
}The server auto-discovers all running host instances.
| Tool | Description |
|---|---|
list_host_instances |
List all connected Revit/AutoCAD/Civil3D instances |
launch_host |
Launch a new host instance (Revit, AutoCAD, Civil3D) |
read_file_info |
Read file metadata and Revit model basic info |
open_model |
Open a document in a specific host instance |
| Tool | Description |
|---|---|
execute_csharp_code |
Compile and run C# code in the host process |
open_document |
Open a document file in the connected host |
The server scans Named Pipes matching {Host}_{Version}_{PID}:
Revit_2025_12345 → Revit 2025
AutoCad_2026_7890 → AutoCAD 2026
Civil3D_2026_4444 → Civil 3D 2026
Plant3D_2027_5555 → Plant 3D 2027
AI clients can target a specific instance by host type, version, or PID.
Place Python files in mcp_tools/ under your scripts folder:
# mcp_tools/my_tool.py
"""
description: Query walls in the active document
"""
from Autodesk.Revit.DB import FilteredElementCollector, Wall
def run(doc):
walls = FilteredElementCollector(doc).OfClass(Wall).ToElements()
return f"Found {len(list(walls))} walls"Compile a .NET assembly with classes implementing the MCP tool interface and place it where the server discovers it.
| Mode | Status | Use When |
|---|---|---|
| .NET assembly | Supported | Compiled C# MCP tools |
| Python 3.13 + PythonNet | Supported | Modern Python with full ecosystem |
| IronPython | Future | IronPython/.NET-style toolsets |
| C# script | Future | Script-first C# toolsets |
| F# script | Future | Script-first F# toolsets |
Samples/McpToolsetDemo/ — .NET toolset sample
Samples/RevitMcpToolSet/ — Revit-specific C# tools
Samples/PythonDemo/mcp_tools/ — Python toolset samples
- In-host dispatch requires a running host with RevitDevTool loaded
- Python MCP toolsets use the same Python 3.13/PythonNet/Pixi environment as normal script execution
- Standalone tools (list, launch, read) work without any host running
- Multiple hosts can be connected simultaneously — the server routes to the correct one
- Run Code Overview
- Modern Python Scripting
- Python Debugging
- Python Ecosystems
- RevitDevTool And pyRevit
- Python Stub Generation
- Run .NET Add-ins
- Scripting Runtimes