Revit MCP Server
mcp-servers-for-revit β 80+ AI automation tools for Autodesk Revit via Model Context Protocol (Revit 2023-2026)
Ask AI about Revit MCP Server
Powered by Claude Β· Grounded in docs
I know everything about Revit MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Revit MCP Server
AI chat for Autodesk Revit that lives inside Revit. No Claude Desktop. No external apps. Just a native chat panel, a WebSocket server, and 53+ tools that talk directly to the Revit API.
Author: Sanjay Chauhan | GitHub
A native WPF chat panel docked inside Revit. The plugin and MCP server communicate over WebSocket on localhost β the AI sees your active view, selection, and model context in real time. No middleman.
Supports multiple AI providers out of the box: OpenRouter (100+ models), Anthropic Claude, DeepSeek, and Qwen. Switch providers by changing one line in your .env file. Run Qwen locally through Ollama for free.
53 specialized tools cover query, selection, visibility, views, sheets, MEP, tagging, and export. 5 additional dynamic intent tools (query, execute, analyze, navigate, create) work across any Revit category β so "query Walls", "query Conduit", "query Electrical Fixtures" all work without needing a separate hardcoded tool for each.
Demo


Features
Query & Analysis (10 tools)
get_elements- Query any category with paginationget_element_parameters- Get Length, Area, Volume, Mark, Commentscalculate_quantities- One-stop quantity takeoffsfind_elements_by_parameter- Complex AND/OR filtering with operatorsexport_schedule_data- Export schedules to CSVcount_elements_by_family/count_elements_by_type/count_views_by_typeget_element_room- Get containing room or MEP spaceget_project_info- Project metadata
Selection (8 tools)
select_all_by_category- Select all elements of a categoryselect_elements_by_level- Select by levelselect_similar_by_category/select_similar_by_family/select_similar_by_typeselect_and_hide_category- Compound select + hideselect_and_isolate_category- Compound select + isolate
Visibility & Isolation (6 tools)
hide_elements_by_category/unhide_elements_by_categoryhide_selected_elements/unhide_all_in_viewisolate_elements_by_category/isolate_selected_elements
View Management (6 tools)
duplicate_active_view/duplicate_view_by_name/duplicate_viewscreate_dependent_views- Create N dependent views from parentget_view_info/list_all_views
Sheet Management (6 tools)
create_new_sheet- Create sheet with number and nameplace_view_on_sheet- Place viewport at coordinatesget_sheet_info/get_all_sheets_infoduplicate_and_place_view- Atomic duplicate + placecreate_sheet_and_place_view- Atomic sheet creation + view placement
MEP & Electrical (8 tools)
get_panel_schedules- All electrical panels with metadatacreate_panel_schedule- Create panel schedule viewperform_conduit_run_qa- Full QA workflow with color codingcalculate_conduit_bend_total- Bend angles for conduit runsget_total_conduit_length- Sum all conduit in modelget_conduit_length_by_size- Length breakdown by conduit diameterget_total_wall_length- Wall length calculationsget_element_room- Room/space containment
Grid & Level Tools (3 tools)
copy_grid_state- Copy visibility states to storagepaste_grid_state- Apply saved state to current viewrename_element- Rename views, levels, or sheets
Annotation & Drafting (4 tools)
find_and_tag_elements- Find and tag in one operationbatch_create_tags- Tag multiple elementsdelete_empty_tags- Remove tags with no contentfind_duplicate_elements- Detect duplicates by name/type
Utilities (2 tools)
orient_elements_to_view- Align with view orientationexport_to_csv- Export elements to CSV file
Supported AI Models
| Provider | Models | Notes |
|---|---|---|
| OpenRouter | Qwen3 235B, DeepSeek v3, Claude, Gemini, and 100+ more | Recommended β one API key, many models |
| Anthropic | Claude Opus 4.5, Sonnet, Haiku | Direct API, best tool-use accuracy |
| DeepSeek | DeepSeek Chat, R1 (reasoning) | Cost-effective |
| Qwen | Qwen 2.5 (via Ollama or DashScope) | Free local option with Ollama |
Quick Start
Prerequisites
- Autodesk Revit 2026
- Node.js 18.0+
- API key for your chosen provider (or Ollama for free local use)
Installation
1. Clone the repository
git clone https://github.com/schauh11/revit-mcp-server.git
cd revit-mcp-server
2. Configure the MCP server
cd mcp-server
npm install
cp .env.example .env
Edit .env with your configuration:
# Choose your provider (default: openrouter)
LLM_PROVIDER=openrouter
# Set your API key
OPENROUTER_API_KEY=sk-or-v1-...
# Optional: change model (default: qwen/qwen3-235b-a22b)
OPENROUTER_MODEL_NAME=qwen/qwen3-235b-a22b
# Optional: change port (default: 3847)
PORT=3847
3. Build the Revit plugin
dotnet build RevitPlugin/RevitPlugin.csproj -c Release
The DLL auto-copies to %APPDATA%\Autodesk\Revit\Addins\2026\
4. Launch
- Open Revit 2026
- Go to Add-Ins ribbon
- Click "pySC Chat"
- The server starts automatically when you open the chat panel
- Start chatting with your model
Example Conversations
Simple Query
You: List all the walls
AI: Found 127 walls in your model:
- Basic Wall - Interior: 45
- Basic Wall - Exterior: 32
- Curtain Wall: 50
Context-Aware Follow-up
You: List all grids
AI: Found 12 grids: A, B, C, D, E, F, 1, 2, 3, 4, 5, 6
You: Hide them
AI: Hidden 12 grids in the current view.
Multi-Step Operation
You: Duplicate Level 2 floor plan and place it on a new sheet A221
AI: Done! Created:
- View: "Level 2 - Copy 1"
- Sheet: A221 - "Level 2 Plan"
- Placed view at center of sheet
MEP Workflow
You: Calculate total conduit length by size
AI: Total conduit lengths:
- 3/4": 1,250 LF
- 1": 890 LF
- 1-1/4": 445 LF
- 2": 220 LF
Total: 2,805 LF
Architecture


How It Works
- User types a natural language command in the embedded Revit chat panel
- Plugin sends the message via WebSocket with model context (active view, selection, levels, sheets)
- MCP Server forwards to the configured AI provider with conversation history and tool definitions
- AI selects appropriate tools and returns execution plan
- Server routes tool commands back to the plugin
- Plugin executes via ExternalEvent (thread-safe Revit API access)
- Results return to AI for natural language response
- User sees the formatted response in the chat panel
Technical Details
- Thread-safe - All Revit API calls go through ExternalEvent pattern
- Atomic transactions - Multi-step operations succeed or fail together
- Prompt caching - Reduces system prompt tokens from ~5000 to ~200 per request
- Auto-reconnect - Handles disconnections gracefully
- 100-message history - Full conversation context persisted in SQLite
- Request locking - Per-connection locks prevent concurrent API calls
Project Structure
revit-mcp-server/
+-- RevitPlugin/ # C# Revit Plugin (.NET 8.0)
| +-- Commands/ # App lifecycle, server management
| +-- UI/ # WPF chat panel
| +-- Services/ # WebSocket, tool executor, model index
| +-- Helpers/ # Category normalization, grid/level utilities
| +-- Resources/tools.json # Plugin-side tool schemas
|
+-- mcp-server/ # Node.js/TypeScript Server
| +-- src/
| | +-- index.ts # Entry point, provider initialization
| | +-- mcpServer.ts # WebSocket server
| | +-- websocketHandler.ts # Message routing, tool execution
| | +-- providers/ # LLM provider implementations
| | +-- conversation/ # SQLite-backed history management
| | +-- config/ # Model configuration
| +-- tools.json # 53+ tool definitions
|
+-- docs/ # Documentation and images
+-- README.md
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| "Timeout: No response" | Server not running or API issue | Check server console, verify API key |
| "Auto-disconnected" | Idle for 15+ minutes | Normal behavior, send message to reconnect |
| "Failed to connect" | Port conflict or server down | Check port 3847, restart server |
| Slow first response | Model indexing in progress | Subsequent requests use cache |
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
For major changes, please open an issue first to discuss what you would like to change.
License
MIT License - see LICENSE
Acknowledgments
Special thanks to the Revit API community and all contributors who helped make this project possible.
If you find this project useful, please consider giving it a star!
