revit_mcp

revit_mcp

3.4

If you are the rightful owner of revit_mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol server for Revit integration, enabling seamless communication between Claude AI and Autodesk Revit.

๐Ÿ—๏ธ Revit MCP Server

A Model Context Protocol server for Revit integration, enabling seamless communication between Claude AI and Autodesk Revit.

|

๐ŸŽฏ Overview

This TypeScript-based MCP server provides a bridge between Claude AI and Revit, allowing direct interaction with Revit models through a WebSocket connection. It implements the Model Context Protocol to enable:

  • โšก Real-time access to Revit model information
  • ๐Ÿ” Element querying and filtering
  • ๐Ÿ‘€ View and level management
  • ๐Ÿ›ก๏ธ Robust error handling with fallback mock data

โœจ Features

๐Ÿ”Œ Revit Integration

  • ๐Ÿ“ก WebSocket-based communication with Revit plugin
  • ๐Ÿ”„ Real-time model data access
  • ๐Ÿ” Graceful fallback to mock data when connection fails
  • โš™๏ธ Configurable connection settings via environment variables

๐Ÿš€ Core Functionalities

  • ๐Ÿ“Š Model Information

    • Access basic model metadata (name, path, version)
    • Get element counts and last modification date
    • Real-time model state synchronization
  • ๐Ÿ—๏ธ Element Management

    • Query elements with flexible filtering
    • Access element properties and geometry
    • Batch element operations
  • ๐ŸŽช View & Level Control

    • List all available views
    • Access level information
    • Navigate through model hierarchy

๐Ÿ’ป Development

๐Ÿ“‹ Prerequisites

  • Node.js (v14 or higher)
  • npm
  • Autodesk Revit (2023 or later)
  • Revit WebSocket Plugin (companion plugin)

๐Ÿ”ง Installation

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

โš™๏ธ Configuration

The server can be configured using environment variables:

REVIT_HOST=127.0.0.1    # Revit plugin WebSocket host
REVIT_PORT=8080         # Revit plugin WebSocket port

๐Ÿ”— Integration with Claude Desktop

Add the server configuration to Claude Desktop:

Windows:

%APPDATA%/Claude/claude_desktop_config.json

Configuration format:

{
  "mcpServers": {
    "revit-mcp-server": {
      "command": "D:/path/to/revit-mcp-server/build/index.js"
    }
  }
}

๐Ÿ› Debugging

For debugging the MCP communication:

  1. Use the built-in MCP Inspector:
npm run inspector
  1. Monitor WebSocket communication with Revit plugin
  2. Check server logs for connection and operation status

โš ๏ธ Error Handling

The server implements robust error handling:

  • Automatic fallback to mock data when Revit connection fails
  • Detailed error logging
  • Graceful connection recovery

๐Ÿ“„ License

MIT License

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests.

๐Ÿ“ฌ Contact

If you have any questions or suggestions, feel free to reach out:

  • ๐Ÿ“ง Email:
  • ๐Ÿ’ฌ WeChat Account: modian4500