npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

revit-mcp

v2.1.0

Published

Enhanced Revit MCP server with elevator automation, floor duplication, and intelligent element search. Secure implementation with authentication and rate limiting.

Readme

🏗️ Revit MCP Server

npm version npm downloads License: MIT TypeScript MCP SDK Node.js Version GitHub Stars GitHub Issues

AI-Powered Revit Automation through Model Context Protocol

A TypeScript implementation of an MCP (Model Context Protocol) server for Autodesk Revit, enabling AI assistants like Claude to interact with and automate Revit through natural language conversations.

🌟 Features

  • 🤖 AI-Native Integration: Built specifically for AI assistants to understand and manipulate Revit models
  • 🔧 Comprehensive Tool Set: 20+ specialized tools for creating, modifying, and analyzing Revit elements
  • 🏢 Advanced Automation: Elevator systems, floor duplication, and intelligent element operations
  • 🔍 Smart Filtering: AI-powered element querying with natural language understanding
  • 🔐 Secure Code Execution: Validated and sandboxed code execution environment
  • Real-time Communication: WebSocket-based connection for instant feedback
  • 📊 Optional Caching: Redis integration for performance optimization
  • 🎯 Type-Safe: Full TypeScript implementation with comprehensive type definitions

📋 Requirements

  • Node.js 18+
  • Autodesk Revit with revit-mcp-plugin installed
  • Claude Desktop or any MCP-compatible client

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/espocorp/revit-mcp.git
cd revit-mcp

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "revit-mcp": {
      "command": "node",
      "args": ["<path-to-project>/build/index.js"]
    }
  }
}

Environment Variables (Optional)

Create a .env file for advanced features:

# Security
REVIT_MCP_API_KEY=your-secure-api-key

# Redis (optional - for caching)
REDIS_PASSWORD=your-redis-password

# ChromaDB (optional - for vector search)
CHROMA_AUTH_TOKEN=your-chroma-token

🛠️ Available Tools

Core Element Operations

| Tool | Description | |------|-------------| | get_current_view_info | Retrieve information about the active Revit view | | get_current_view_elements | List all elements visible in the current view | | get_selected_elements | Get details of currently selected elements | | get_available_family_types | List all family types available in the project |

Element Creation

| Tool | Description | |------|-------------| | create_point_based_element | Place elements at specific points (doors, windows, furniture) | | create_line_based_element | Create linear elements (walls, beams, pipes) | | create_surface_based_element | Generate surface elements (floors, ceilings, roofs) | | createWall | Specialized wall creation with detailed parameters |

Element Modification

| Tool | Description | |------|-------------| | modify_element | Update element properties and parameters | | delete_element | Remove elements from the model | | operate_element | Perform operations (hide, isolate, select) | | color_elements | Apply color overrides based on parameter values |

Advanced Features

| Tool | Description | |------|-------------| | ai_element_filter | Intelligent element querying with natural language | | duplicate_floor_elements | Replicate entire floor layouts with smart filtering | | elevator_automation | Complete elevator system design and placement | | tag_all_walls | Automatically tag walls in views | | send_code_to_revit_secure | Execute validated C# code in Revit |

Module System

| Tool | Description | |------|-------------| | search_modules | Find available automation modules | | use_module | Execute pre-built automation modules |

🏗️ Architecture

flowchart TB
    subgraph "AI Client"
        Claude[Claude Desktop]
    end
    
    subgraph "MCP Server"
        TS[TypeScript MCP Server]
        WS[WebSocket Client]
        CM[Connection Manager]
        Auth[Auth Module]
    end
    
    subgraph "Revit"
        Plugin[revit-mcp-plugin]
        API[Revit API]
        Model[BIM Model]
    end
    
    subgraph "Optional Services"
        Redis[(Redis Cache)]
        ChromaDB[(Vector DB)]
    end
    
    Claude <-->|MCP Protocol| TS
    TS --> WS
    WS <-->|WebSocket:60100| Plugin
    Plugin <--> API
    API <--> Model
    TS -.->|Optional| Redis
    TS -.->|Optional| ChromaDB
    CM --> WS
    Auth --> TS

📦 Development

Scripts

# Development
npm run dev          # Watch mode for development
npm run build        # Build the project
npm run test         # Run tests
npm run lint         # Lint code
npm run format       # Format code

# Docker Services (Optional)
npm run docker:up    # Start Redis & ChromaDB
npm run docker:down  # Stop services
npm run docker:logs  # View service logs

Project Structure

revit-mcp/
├── src/
│   ├── index.ts              # Main entry point
│   ├── tools/                # MCP tool implementations
│   │   ├── ai_element_filter.ts
│   │   ├── elevator_automation.ts
│   │   └── ...
│   ├── utils/                # Utility modules
│   │   ├── ConnectionManager.ts
│   │   ├── SocketClient.ts
│   │   ├── auth.ts
│   │   └── ...
│   └── types/                # TypeScript definitions
│       └── revit.ts
├── __tests__/                # Test files
├── docker-compose.yml        # Optional services
├── package.json
└── tsconfig.json

🔒 Security

This MCP server implements multiple security layers:

  • API Key Authentication: Secure tool access with API keys
  • Code Validation: Sandboxed execution environment for custom code
  • Pattern Blacklisting: Prevents execution of dangerous code patterns
  • Rate Limiting: Built-in protection against abuse
  • Secure WebSocket: Encrypted communication with Revit

🧪 Testing

# Run all tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

# Integration tests
npm run test:integration

📖 Example Usage

Once configured, you can interact with Revit through Claude:

User: "Create a 10-foot wall at the origin"
Claude: I'll create a wall for you using the Revit MCP tools...
[Creates wall in Revit]

User: "Find all doors in the current view"
Claude: Let me query the elements in your current view...
[Returns list of doors with properties]

User: "Duplicate the 3rd floor layout to the 5th floor"
Claude: I'll help you duplicate the floor elements...
[Copies all elements with intelligent filtering]

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

🔗 Related Projects

  • revit-mcp-plugin: Revit plugin for receiving and executing commands
  • revit-mcp-commandset: Extensible command sets for Revit operations
  • revit-mcp-python: Python implementation (alternative)
  • revit-mcp-dotnet: .NET implementation (alternative)

📞 Support

🚦 Status

Build Status Last Commit Open Issues Pull Requests