Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

revit_mcp

MCP.Pizza Chef: SamllPigYanDong

Revit MCP is a TypeScript-based Model Context Protocol server that bridges Claude AI with Autodesk Revit. It enables real-time access to Revit model data, element querying, view and level management, and robust error handling via WebSocket communication. This server facilitates seamless AI-driven workflows by providing live model metadata, element counts, and fallback mock data for uninterrupted operation.

Use This MCP server To

Access real-time Revit model metadata and status Query and filter Revit elements dynamically Manage Revit views and levels via AI commands Fallback to mock data when Revit connection fails Enable AI-driven automation in Revit workflows Integrate Claude AI with Autodesk Revit models Monitor element counts and last modification dates Configure connection settings for flexible deployment

README

πŸ—οΈ Revit MCP Server

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

English | δΈ­ζ–‡

🎯 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: 353554036@qq.com
  • πŸ’¬ WeChat Account: modian4500

revit_mcp FAQ

How does Revit MCP communicate with Autodesk Revit?
It uses a WebSocket-based connection to interact with the Revit plugin for real-time data exchange.
What happens if the connection to Revit fails?
The server gracefully falls back to mock data to ensure continuous operation without errors.
Can I configure the Revit MCP server settings?
Yes, connection and other settings are configurable via environment variables for flexible deployment.
What kind of Revit data can I access through this MCP server?
You can access model metadata, element counts, view and level information, and perform element queries and filtering.
Is the Revit MCP server limited to Claude AI?
While designed for Claude AI, it can be adapted to work with other LLMs supporting MCP, such as OpenAI and Gemini.
Does the server support error handling?
Yes, it includes robust error handling mechanisms to maintain stable communication and fallback options.
What programming language is the Revit MCP server built with?
It is implemented in TypeScript, ensuring modern, maintainable codebase and easy integration.