KR

kenlp/revitmcpserver

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

15 stars 7 forks 质量 86 趋势 41MIT

A custom Model Context Protocol server that lets Claude (or any MCP client) drive Revit 2025- 2027 — read the model, query, create & edit elements, and run multi-step operations as a single undoable...

概览

A custom server that lets Claude (Desktop, Code, or any MCP client) drive — read the model, create & edit elements, and run multi-step operations as a single undoable Transaction. - (.NET 8 for R2026, .NET 10 for R2027) runs inside Revit, owns transactions, marshals work onto the main UI thread via IExternalEventHandler. Auto-assigns a unique port per Revit version so multiple versions can run side-by-side. - is a thin stdio bridge: every tool just forwards to a small HTTP API on the addin. - — no eval-style escape hatch, every write is a named Transaction you can review and undo. - — fold N steps into one atomic Revit undo entry; rollback on first failure. For the design rationale and the answer to "why not just wrap every Revit API?", read docs/API_COVERAGE.md. — 92 C# commands (91 exposed as MCP tools + 1 hidden) + 1 batch tool + 2 workflow recipes = . Hidden = create_spot_elevation, registered for HTTP /mcp use but off the MCP tool surface.

README

以下为原文 README 节选,完整内容请查看原文。

Revit MCP Server

A custom Model Context Protocol server that lets Claude (Desktop, Code, or any MCP client) drive Autodesk Revit 2025, 2026 & 2027 — read the model, create & edit elements, and run multi-step operations as a single undoable Transaction.

Author: KenLP

Claude Desktop / Claude Code  ──stdio──▶  revit-mcp-server (Node)  ──HTTP──▶  RevitMCPAddin  ──ExternalEvent + Transaction──▶  Revit 2025/2026/2027
  • C# addin (.NET 8 for R2026, .NET 10 for R2027) runs inside Revit, owns transactions, marshals work onto the main UI thread via IExternalEventHandler. Auto-assigns a unique port per Revit version so multiple versions can run side-by-side.
  • TypeScript MCP server is a thin stdio bridge: every tool just forwards to a small HTTP API on the addin.
  • Curated, schema-validated tool surface — no eval-style escape hatch, every write is a named Transaction you can review and undo.
  • Batch transaction pattern — fold N steps into one atomic Revit undo entry; rollback on first failure.

For the design rationale and the answer to “why not just wrap every Revit API?”, read docs/API_COVERAGE.md.

Status

v0.8.40 — 92 C# commands (91 exposed as MCP tools + 1 hidden) + 1 batch tool + 2 workflow recipes = 94 MCP tools. Hidden = create_spot_elevation, registered for HTTP /mcp use but off the MCP tool surface. More HTTP-only commands can be added through opt-in command packs. Supports Revit 2025 (.NET 8), Revit 2026 (.NET 8) and Revit 2027 (.NET 10) with auto-port assignment for side-by-side use. Features: dry-run mode, structured diffs, auth token, per-tool risk levels, Family & FamilySymbol rename, linked-file element reading, clash/clearance detection (host + linked-file raycast, multi-point centreline sampling), view image export, view manipulation (duplicate, section-box, isolate), MEP Space listing, element type swapping, view template application, parameter copy across elements, schedule filters/sort/CSV export, level elevation editing, PDF export, room containment (phase-aware FromRoom/ToRoom/Room batch lookup for doors, furniture, fixtures), annotation tagging (tag single element, tag-all-not-tagged by category, list tags in view), model health report (one-shot scorecard: warnings + warning/element ratio, file size, imported/linked CAD, PDF/raster, RVT links, point clouds, in-place families, groups, unused views, purgeable elements), workset audit (per-workset element counts, empty-workset detection). See docs/ROADMAP.md.

Layer Build target Status
Revit addin Revit 2025 / .NET 8 ✅ CI-tested
Revit addin Revit 2026 / .NET 8 ✅
Revit addin Revit 2027 / .NET 10 ✅
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

// e.g. a documentation + view client (a subset instead of all 93): { "mcpServers": { "revit": { "command": "node", "args": ["dist/index.js"], "env": { "REVIT_MCP_VERSION": "2027", "REVIT_MCP_PROFILE": "documentation,view" } }}}