revit mcp
A Python package that enables integration with Autodesk Revit through the Model Context Protocol, allowing users to send commands to Revit and automate interactions with building models.
A Python package that enables integration with Autodesk Revit through the Model Context Protocol, allowing users to send commands to Revit and automate interactions with building models.
xml.Revit.MCP provides a comprehensive set of tools for integrating with Autodesk Revit through the Model Context Protocol (MCP). This library serves as a bridge between AI assistants and Revit, enabling powerful automation capabilities and programmatic interaction with building models.
The tool library includes numerous functions for Revit automation and interaction:
Basic Operations: - Get available commands from Revit plugin - Execute specified commands in Revit - Call specific Revit functions with parameters - Retrieve view data and selected elements
Element Management: - Find elements by category - Get element parameters and locations - Update element parameters - Delete elements - Show/highlight elements in current view - Move elements to new positions
Creation Tools: - Create levels/floors - Create floor plan views - Create grid lines - Create walls and floors - Create rooms and room tags - Create doors and windows - Create MEP elements (ducts, pipes, cable trays) - Create family instances - Link DWG files - Create sheets
First, install the UV package manager:
pip install uv
Install the revit-mcp package:
pip install revit-mcp
Test the installation:
uvx revit-mcp
You should see: RevitMCPServer - INFO - Successfully connected to Revit on startup
Edit claude_desktop_config.json
to include:
{
"mcpServers": {
"RevitMCPServer": {
"command": "uvx",
"args": [
"revit-mcp"
]
}
}
}
Edit mcp.json
to include:
{
"mcpServers": {
"RevitMCPServer": {
"command": "uvx",
"args": [
"revit-mcp"
]
}
}
}
Edit cline_mcp_setting.json
to include:
{
"mcpServers": {
"RevitMCPServer": {
"command": "uvx",
"args": [
"revit-mcp"
]
}
}
}
You can create custom MCP DLL files to implement additional functionality by:
1. Implementing the xml.Revit.MCP.Public.IMCPMethod
interface
2. Following JSON-RPC 2.0 specification for communication
3. Compiling to a DLL and placing it in the designated MCP folder
When using the revit-mcp-plugin:
Once enabled, AI assistants can discover and control your Revit program, executing the various commands provided by the xml.Revit.MCP tools library.