Skip to main content

revit integration through the Model Context Protocol

Project description

xml.Revit.MCP Tools Overview

English | 中文文档

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.

xml.Revit.png

Key Features

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

Installation Requirements

  • xml.Revit: Version 1.3.4.3 or newer
  • Python: 3.10 or newer
  • UV Package Manager: Required for installation
  • Revit: Compatible with versions 2019-2024 (with plugin)

Installation Process

  1. First, install the UV package manager:

    pip install uv
    
  2. Install the revit-mcp package:

    pip install revit-mcp
    
  3. Test the installation:

    uvx revit-mcp
    

    You should see: RevitMCPServer - INFO - Successfully connected to Revit on startup

Integration with AI Assistants

Claude for Desktop

Edit claude_desktop_config.json to include:

Cursor

Edit mcp.json to include:

Cline

Edit cline_mcp_setting.json to include:

{
  "mcpServers": {
    "RevitMCPServer": {
      "disabled": false,
      "timeout": 30,
      "command": "uvx",
      "args": ["revit-mcp"],
      "transportType": "stdio",
      "autoApprove": [
        "active_view",
        "call_func",
        "create_cable_trays",
        "create_door_windows",
        "create_ducts",
        "create_family_instances",
        "create_floors",
        "create_floor_plan_views",
        "create_grids",
        "create_levels",
        "create_pipes",
        "create_room_separation_lines",
        "create_room_tags",
        "create_rooms",
        "create_sheets",
        "create_walls",
        "delete_elements",
        "execute_commands",
        "find_elements",
        "get_commands",
        "get_locations",
        "get_selected_elements",
        "get_view_data",
        "link_dwg_and_activate_view",
        "move_elements",
        "parameter_elements",
        "show_elements",
        "update_elements"
      ]
    }
  }
}

Extending Functionality

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

Plugin Configuration

When using the revit-mcp-plugin:

  1. Register the plugin with Revit
  2. Configure commands through: Add-in Modules → Revit MCP Plugin → Settings
  3. Enable the service: Add-in → Revit MCP Plugin → Revit MCP Switch

Once enabled, AI assistants can discover and control your Revit program, executing the various commands provided by the xml.Revit.MCP tools library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_revit_mcp-0.5.12.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_revit_mcp-0.5.12-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_revit_mcp-0.5.12.tar.gz.

File metadata

File hashes

Hashes for iflow_mcp_revit_mcp-0.5.12.tar.gz
Algorithm Hash digest
SHA256 c6a2945a833dc9fd4347005538035f673bbe42bdd00ca89508e1eb143ad71670
MD5 3bf1bf39e4abce7e2a4ba49c1bd5f2e0
BLAKE2b-256 c9bca086b90ad19a40b02b772a0877d98484bd26df30e5c1b925d26797d42795

See more details on using hashes here.

File details

Details for the file iflow_mcp_revit_mcp-0.5.12-py3-none-any.whl.

File metadata

File hashes

Hashes for iflow_mcp_revit_mcp-0.5.12-py3-none-any.whl
Algorithm Hash digest
SHA256 704549e0e8ac03172d6df3e5f37419c2f9304e7be47bb394e74609c685d381e2
MD5 1068fe4abdd28b3027296d65e76b747b
BLAKE2b-256 1f39f8f30c1765d91c4ea9443e3daffe77b92b8e7a142aaab220c24d8bf87b91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page