Skip to content

Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.

README update

A. Sam Mohammad7861410b9392
diff --git a/README.md b/README.md
index 9fa280c..baa1775 100644
--- a/README.md
+++ b/README.md
@@ -1,263 +1,412 @@
-<p align="center">
- <img src="assets/logo.svg" alt="MCP Revit Bridge Logo" width="200">
-</p>
+<div align="center">
-<h1 align="center">MCP Revit Bridge</h1>
+# πŸ—οΈ Revit MCP Bridge
-<p align="center">
- Connect MCP clients to Autodesk Revit through a Python server and .NET bridge add-in
-</p>
+### **Connect AI Agents to Autodesk Revit**
+
+Automate Revit workflows through the Model Context Protocol - from Python, TypeScript, or any MCP client
+
+<br/>
<p align="center">
- <a href="https://github.com/Sam-AEC/mcp/actions"><img src="https://img.shields.io/github/actions/workflow/status/Sam-AEC/mcp/ci.yml?branch=main&style=flat-square" alt="Build Status"></a>
- <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="License"></a>
- <a href="https://github.com/Sam-AEC/mcp/releases"><img src="https://img.shields.io/badge/version-0.1.0-green.svg?style=flat-square" alt="Version"></a>
- <a href="#"><img src="https://img.shields.io/badge/Revit-2020--2024-orange.svg?style=flat-square" alt="Revit Versions"></a>
- <a href="#"><img src="https://img.shields.io/badge/Built_with-mcp--use-purple.svg?style=flat-square" alt="Built with mcp-use"></a>
- <a href="#"><img src="https://img.shields.io/badge/Mock_Mode-Enabled-brightgreen.svg?style=flat-square" alt="Mock Mode"></a>
+ <img src="https://seeklogo.com/images/A/autodesk-revit-logo-0BEB642AE2-seeklogo.com.png" alt="Autodesk Revit" height="80"/>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <strong style="font-size: 2em;">Γ—</strong>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <img src="https://www.python.org/static/community_logos/python-logo-generic.svg" alt="Python" height="80"/>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <strong style="font-size: 2em;">Γ—</strong>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Logo_C_sharp.svg/256px-Logo_C_sharp.svg.png" alt="C#" height="80"/>
</p>
+<br/>
+
+[![Build](https://img.shields.io/github/actions/workflow/status/Sam-AEC/mcp/ci.yml?branch=main&style=for-the-badge&logo=github)](https://github.com/Sam-AEC/mcp/actions)
+[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge)](LICENSE)
+[![Version](https://img.shields.io/badge/version-0.1.0-green.svg?style=for-the-badge)](https://github.com/Sam-AEC/mcp/releases)
+[![Revit](https://img.shields.io/badge/Revit-2020--2024-0696D7.svg?style=for-the-badge&logo=autodesk)](https://www.autodesk.com/products/revit/)
+[![Python](https://img.shields.io/badge/Python-3.11+-3776AB.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
+[![C#](https://img.shields.io/badge/C%23-.NET_4.8-512BD4.svg?style=for-the-badge&logo=csharp&logoColor=white)](https://docs.microsoft.com/en-us/dotnet/csharp/)
+
+</div>
+
---
-## What It Is
+## 🎯 What Is This?
+
+A production-ready bridge that exposes **Autodesk Revit** as a Model Context Protocol (MCP) server. This enables:
-- **MCP Server**: Python stdio server exposing 25 Revit tools via the Model Context Protocol
-- **Revit Bridge**: .NET 4.8 add-in executing Revit API operations through HTTP/ExternalEvent
-- **Demo Client**: Example automation workflow running in mock mode (no Revit required) or bridge mode (Windows + Revit)
+- **πŸ€– AI Agents** - Let Claude Desktop, ChatGPT, or custom agents control Revit
+- **🐍 Python Automation** - Script Revit workflows without .NET complexity
+- **πŸ”„ CI/CD Integration** - Run QA checks, exports, and reports in pipelines
+- **☁️ Cloud Workflows** - Trigger Revit operations from web apps or serverless functions
-## Why It Exists
+**Three Components:**
-- **Reproducible Automation**: Script Revit workflows from any MCP client (Claude Desktop, custom tools, CI/CD)
-- **Auditable Outputs**: Structured logs track every tool invocation with timestamps and artifacts
-- **Safe Tool Access**: Workspace sandboxing, schema validation, and mock mode for testing without production models
+1. **MCP Server** (Python) - Exposes 25 Revit tools with validation and sandboxing
+2. **Bridge Add-in** (C# .NET 4.8) - Runs inside Revit, executes API operations
+3. **Demo Client** (Python) - Example automation showing health checks, exports, QA audits
-## Quickstart (Mock Mode)
+---
-Run the complete workflow without Revit or Windows.
+## πŸš€ Why This Exists
-**Prerequisites**:
-- Python 3.11+
-- pip
+### The Problem
+Revit's API is powerful but locked to .NET and Windows. Building modern automation requires:
+- Complex Python ↔ .NET interop (pythonnet, COM, or process boundaries)
+- Windows-specific deployment (no Linux CI/CD)
+- Manual thread marshalling (Revit API requires UI thread)
+- Custom protocols for every integration
+
+### The Solution
+This bridge provides a **standard interface** using the Model Context Protocol:
-**Steps**:
+βœ… **Mock Mode** - Test without Revit (Linux CI, local dev, unit tests)
+βœ… **Workspace Sandboxing** - File operations restricted to allowed directories
+βœ… **Schema Validation** - All inputs validated with Pydantic before execution
+βœ… **Audit Logging** - Structured JSONL logs track every operation
+βœ… **Language Agnostic** - MCP clients exist for Python, TypeScript, Rust, Go
+
+**Use Cases:**
+- AI agents that query Revit models and generate reports
+- Automated QA checks on every commit (naming standards, parameter compliance)
+- Scheduled exports (schedules, quantities, PDFs) to shared drives
+- Multi-model workflows (compare baselines, batch processing)
+
+---
+
+## ⚑ Quick Start (Mock Mode)
+
+Run the complete workflow **without Revit or Windows**. Perfect for development, testing, and CI/CD.
-1. Clone and navigate:
```bash
+# Clone and setup
git clone https://github.com/Sam-AEC/mcp.git
cd mcp
-```
+python -m venv venv
+source venv/bin/activate # Windows: venv\Scripts\activate
-2. Install the MCP server:
-```bash
+# Install
pip install -e packages/mcp-server-revit[dev]
-```
-3. Configure mock mode:
-```bash
+# Configure mock mode
export MCP_REVIT_MODE=mock
export WORKSPACE_DIR="$(pwd)/workspace"
export MCP_REVIT_ALLOWED_DIRECTORIES="$(pwd)/workspace"
mkdir -p workspace
-```
-4. Run tests to verify:
-```bash
-pytest packages/mcp-server-revit/tests
-```
+# Verify
+pytest packages/mcp-server-revit/tests -v
-5. Start the MCP server:
-```bash
+# Run server (terminal 1)
python -m revit_mcp_server
-```
-6. In another terminal, run the demo client:
-```bash
+# Run demo (terminal 2)
python packages/client-demo/demo.py
```
-**Expected Output**:
-- Health check returns `{"status": "healthy", "mode": "mock"}`
-- Mock document opened
-- Quantities exported to `workspace/quantities.csv` (stub data)
-- Audit log at `workspace/audit.jsonl` with request tracking
+**Expected Output:**
+```json
+{"status": "healthy", "mode": "mock"}
+{"document_id": "sample_model", "title": "sample_model.rvt"}
+{"categories_exported": 5, "output_path": "workspace/quantities.csv"}
+```
+
+Check `workspace/audit.jsonl` for structured logs.
-## Quickstart (Bridge Mode / Revit)
+---
-Connect to a running Revit instance on Windows.
+## πŸͺŸ Quick Start (Bridge Mode)
-**Prerequisites**:
+Connect to a **real Revit instance** for production workflows.
+
+**Prerequisites:**
- Windows 10/11
-- Revit 2020-2024 installed
-- .NET Framework 4.8
+- Revit 2020-2024
- Visual Studio 2019+ or MSBuild
- Python 3.11+
-**Steps**:
-
-1. Complete steps 1-2 from Mock Mode above
-
-2. Set Revit SDK path:
```powershell
-$env:REVIT_SDK = "C:\Program Files\Autodesk\Revit 2024\SDK"
-```
+# Setup Python (same as mock mode)
+git clone https://github.com/Sam-AEC/mcp.git
+cd mcp
+python -m venv venv
+venv\Scripts\activate
+pip install -e packages/mcp-server-revit[dev]
-3. Build the bridge add-in:
-```powershell
+# Build Revit add-in
+$env:REVIT_SDK = "C:\Program Files\Autodesk\Revit 2024\SDK"
.\scripts\build-addin.ps1
-```
-4. Install the add-in:
-```powershell
+# Install add-in
.\scripts\install-addin.ps1 -RevitYear 2024
-```
-5. Start Revit (the bridge loads automatically and listens on http://localhost:3000)
+# Start Revit (bridge auto-loads on localhost:3000)
-6. Configure bridge mode:
-```powershell
+# Configure bridge mode
$env:MCP_REVIT_MODE = "bridge"
$env:MCP_REVIT_BRIDGE_URL = "http://localhost:3000"
$env:WORKSPACE_DIR = "C:\revit-workspace"
$env:MCP_REVIT_ALLOWED_DIRECTORIES = "C:\revit-workspace"
-```
+mkdir C:\revit-workspace -ErrorAction SilentlyContinue
-7. Start the MCP server:
-```bash
-python -m revit_mcp_server
+# Run
+python -m revit_mcp_server # Terminal 1
+python packages/client-demo/demo.py # Terminal 2
```
-8. Run the demo client:
-```bash
-python packages/client-demo/demo.py
+**Expected Output:**
+```json
+{"status": "healthy", "mode": "bridge", "revit_version": "2024"}
+// Real Revit operations execute
+// Files saved to C:\revit-workspace\
```
-**Expected Output**:
-- Real Revit operations execute
-- Files created in `C:\revit-workspace\`
-- Audit log tracks bridge communications
+---
-## Tool Catalog
+## πŸ› οΈ Available Tools (25 Total)
-25 tools across 5 categories. Full documentation: [docs/tools.md](docs/tools.md)
+### πŸ“‹ Document Operations
+```python
+revit.health # Bridge connectivity check
+revit.open_document # Open .rvt or .rfa files
+revit.list_views # Enumerate all views
+```
-### Example 1: Health Check
+### πŸ” QA & Audits (10 Tools)
+```python
+revit.model_health_summary # Overall health metrics
+revit.warning_triage_report # Categorize warnings
+revit.naming_standards_audit # Validate naming conventions
+revit.parameter_compliance_audit # Check required parameters
+revit.shared_parameter_binding_audit # Verify shared params
+revit.view_template_compliance_check # Audit view templates
+revit.tag_coverage_audit # Find untagged elements
+revit.room_space_completeness_report # Room/space validation
+revit.link_monitor_report # Linked file status
+revit.coordinate_sanity_check # Project coordinates
+```
-```json
-// Request
-{
- "tool": "revit.health",
- "payload": {"request_id": "health_001"}
-}
-
-// Response
-{
- "status": "healthy",
- "requests_handled": 1,
- "message": "Bridge ready"
-}
+### πŸ“€ Export Operations
+```python
+revit.export_schedules # Schedules β†’ CSV
+revit.export_quantities # Material takeoffs β†’ CSV
+revit.export_pdf_by_sheet_set # Batch PDF export
+revit.export_dwg_by_sheet_set # Batch DWG export
+revit.export_ifc_named_setup # IFC with custom settings
```
-### Example 2: Export Schedules
+### πŸ“„ Sheet Automation
+```python
+revit.batch_create_sheets_from_csv # Bulk sheet creation
+revit.batch_place_views_on_sheets # Automated view placement
+revit.titleblock_fill_from_csv # Populate titleblock data
+```
-```json
-// Request
-{
- "tool": "revit.export_schedules",
- "payload": {
- "request_id": "export_001",
- "output_path": "C:\\workspace\\schedules.csv"
- }
-}
-
-// Response
-{
- "schedules": ["Door Schedule", "Window Schedule"],
- "output_path": "C:\\workspace\\schedules.csv"
-}
+### πŸ“Š Baseline Tracking
+```python
+revit.baseline_export # Snapshot model state
+revit.baseline_diff # Compare two snapshots
```
-### Example 3: QA Audit
+**Full documentation:** [docs/tools.md](docs/tools.md)
-```json
-// Request
-{
- "tool": "revit.naming_standards_audit",
- "payload": {"request_id": "audit_001"}
-}
-
-// Response
-{
- "issues_found": 12,
- "severity": "warning"
-}
+---
+
+## πŸ—οΈ Architecture
+
+```
+β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
+β”‚ AI Agent / Automation Script β”‚
+β”‚ (Claude Desktop, Python, TypeScript, cron jobs) β”‚
+β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
+ β”‚ MCP Protocol (stdio JSON-RPC)
+β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
+β”‚ MCP Server (Python 3.11+) β”‚
+β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
+β”‚ β”‚ Pydantic β”‚ β”‚ Workspace β”‚ β”‚ Audit Logger β”‚ β”‚
+β”‚ β”‚ Validation β”‚ β”‚ Sandbox β”‚ β”‚ (JSONL) β”‚ β”‚
+β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
+β”‚ β”‚
+β”‚ Mode: Mock (CI/testing) OR Bridge (production Revit) β”‚
+β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
+ β”‚ HTTP POST (localhost:3000)
+β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
+β”‚ Revit Bridge Add-in (C# .NET 4.8) β”‚
+β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
+β”‚ β”‚ HttpListener β†’ ExternalEvent Queue β†’ Revit API β”‚ β”‚
+β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
+β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
+ β”‚ Revit API (.NET Framework 4.8)
+β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
+β”‚ Autodesk Revit (2020, 2021, 2022, 2023, 2024) β”‚
+β”‚ Document operations β€’ Exports β€’ QA metrics β”‚
+β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```
-**All 25 Tools**:
-- Health: `revit.health`
-- Documents: `revit.open_document`, `revit.list_views`
-- QA Audits: `revit.model_health_summary`, `revit.warning_triage_report`, `revit.naming_standards_audit`, and 7 more
-- Exports: `revit.export_schedules`, `revit.export_quantities`, `revit.export_pdf_by_sheet_set`, `revit.export_dwg_by_sheet_set`, `revit.export_ifc_named_setup`
-- Sheet Automation: `revit.batch_create_sheets_from_csv`, `revit.batch_place_views_on_sheets`, `revit.titleblock_fill_from_csv`
-- Baseline Tracking: `revit.baseline_export`, `revit.baseline_diff`
+**Design Decisions:**
+
+| Decision | Reason |
+|----------|--------|
+| **Python MCP Server** | MCP ecosystem is Python/TS, easier client integration |
+| **HTTP Bridge** | Clean process boundary, debuggable (curl/Postman) |
+| **ExternalEvent** | Revit API requires UI thread execution |
+| **Mock Mode** | CI/CD on Linux without Revit dependency |
+| **localhost-only** | No external exposure, simple security model |
+
+**Deep dive:** [docs/architecture.md](docs/architecture.md)
+
+---
+
+## πŸ”’ Security
+
+<table>
+<tr>
+<td width="50%">
+
+**Workspace Sandboxing**
+- All file paths validated against allowed directories
+- Path traversal attacks blocked (`../../../etc/passwd`)
+- Symbolic links resolved and validated
+
+</td>
+<td width="50%">
+
+**Schema Validation**
+- Pydantic models enforce types and constraints
+- Invalid inputs rejected before execution
+- Clear error messages for debugging
+
+</td>
+</tr>
+<tr>
+<td>
+
+**Audit Logging**
+- JSONL format with timestamps and request IDs
+- Records inputs, outputs, file artifacts
+- Tamper-evident chronological ordering
+
+</td>
+<td>
-## Security Model
+**Safe Defaults**
+- Mock mode for CI/CD (no Revit needed)
+- Bridge binds to `127.0.0.1` only
+- No external network exposure
-Full details: [docs/security.md](docs/security.md)
+</td>
+</tr>
+</table>
-- **Workspace Sandbox**: All file operations restricted to configured `allowed_directories`
-- **Schema Validation**: Pydantic models validate every tool input before execution
-- **Audit Logs**: Structured JSONL logs record requests, responses, and file artifacts
-- **Safe Defaults**: Mock mode enabled for CI/CD, bridge listens on localhost only (127.0.0.1:3000)
+**Details:** [docs/security.md](docs/security.md)
-## Architecture
+---
+
+## πŸ“š Documentation
+
+| Guide | Description |
+|-------|-------------|
+| [Installation](docs/install.md) | Mock mode, bridge mode, troubleshooting |
+| [Tool Catalog](docs/tools.md) | All 25 tools with schemas and examples |
+| [Architecture](docs/architecture.md) | Design decisions, trust boundaries |
+| [Security](docs/security.md) | Sandboxing, validation, audit logs |
+| [Contributing](CONTRIBUTING.md) | How to add tools and submit PRs |
+
+---
+
+## πŸ—ΊοΈ Roadmap
+
+**v0.2.0 - Real Revit Integration**
+- [ ] Implement actual Revit API calls in bridge (currently stubs)
+- [ ] ExternalEvent queue processing with error handling
+- [ ] Async HTTP client for parallel operations
+
+**v0.3.0 - Enhanced Tools**
+- [ ] More QA tools (circulation analysis, clash detection)
+- [ ] Enhanced sheet automation (view placement optimization)
+- [ ] Batch document processing (folder-level operations)
+
+**Future**
+- [ ] Dynamo integration for visual programming workflows
+- [ ] Revit Server and BIM 360 cloud model support
+- [ ] Navisworks export tool
+- [ ] Optional telemetry (disabled by default, opt-in)
+
+---
+
+## 🀝 Contributing
+
+Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
-Full details: [docs/architecture.md](docs/architecture.md)
+**High-impact contributions:**
+- Implement real Revit API operations in bridge (replace stubs)
+- Add new tools (e.g., `revit.export_navisworks`, `revit.create_3d_view`)
+- Improve test coverage
+- Add more QA audit tools
+---
+
+## πŸ’‘ Example Use Cases
+
+**1. Automated QA on Pull Requests**
+```yaml
+# .github/workflows/revit-qa.yml
+- run: python -m revit_mcp_server --tool revit.naming_standards_audit
+- run: python -m revit_mcp_server --tool revit.parameter_compliance_audit
```
-Client β†’ MCP Server (Python) β†’ Bridge (HTTP) β†’ Revit Add-in (.NET) β†’ Revit API
- ↓ ↓ ↓
- Schema Validation Workspace Sandbox ExternalEvent Queue
- Audit Logging Mock/Bridge Mode Revit Operations
+
+**2. Scheduled Export Job**
+```python
+# Export all schedules to CSV every night
+client.call_tool("revit.export_schedules", {
+ "output_path": "/exports/schedules-2025-01-07.csv"
+})
```
-**Why the Bridge?**
-- Revit API requires .NET 4.8 and Windows
-- ExternalEvent pattern mandates UI thread execution
-- HTTP provides clean process boundary and language-agnostic interface
-- Mock mode enables CI without Revit dependency
+**3. AI Agent Workflow**
+```
+User: "Check this Revit model for warnings and generate a report"
+Agent: β†’ revit.open_document
+ β†’ revit.warning_triage_report
+ β†’ Generates markdown report with findings
+```
-## Roadmap
+**4. Baseline Comparison**
+```python
+# Track model changes over time
+baseline_v1 = client.call_tool("revit.baseline_export", {...})
+baseline_v2 = client.call_tool("revit.baseline_export", {...})
+diff = client.call_tool("revit.baseline_diff", {
+ "baseline_a": baseline_v1,
+ "baseline_b": baseline_v2
+})
+```
-- Additional QA tools (circulation analysis, clash detection export)
-- Enhanced sheet automation (view placement optimization, multi-template support)
-- Batch document processing (folder-level operations)
-- Package builder (automated .rfa/.addin generation)
-- Optional telemetry (disabled by default, opt-in only)
-- Async HTTP client for parallel operations
+---
-## Contributing
+## πŸ“„ License
-We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
+MIT License - see [LICENSE](LICENSE)
-**Quick Links**:
-- [Installation Guide](docs/install.md)
-- [Tool Documentation](docs/tools.md)
-- [Security Model](docs/security.md)
-- [Architecture Overview](docs/architecture.md)
+Copyright (c) 2025 MCP Revit Bridge Contributors
-## Get Involved
+---
-- Star the repo if you find it useful
-- Open an issue to request new tools or report bugs
-- Submit pull requests for tool implementations, test fixtures, or documentation improvements
+## πŸ™ Acknowledgments
-## License
+- **Autodesk** for the Revit API
+- **Anthropic** for the Model Context Protocol specification
+- Built with [mcp-use](https://github.com/mcp-use/mcp-use) framework
+- Python and .NET open-source communities
-MIT License. See [LICENSE](LICENSE) for details.
+---
-Copyright (c) 2025 MCP Revit Bridge Contributors
+<div align="center">
-## Built With
+**⭐ Star this repo if you find it useful!**
-This project is built using the [mcp-use](https://github.com/mcp-use/mcp-use) framework, which provides a robust foundation for building MCP servers and tools.
+[Report Bug](https://github.com/Sam-AEC/mcp/issues) β€’ [Request Feature](https://github.com/Sam-AEC/mcp/issues) β€’ [Discussions](https://github.com/Sam-AEC/mcp/discussions)
+</div>
diff --git a/RELEASE.md b/RELEASE.md
deleted file mode 100644
index ccc721a..0000000
--- a/RELEASE.md
+++ /dev/null
@@ -1,259 +0,0 @@
-# Release Checklist for v0.1.0
-
-## Final Repository Structure
-
-```
-mcp/
-β”œβ”€β”€ .github/
-β”‚ └── workflows/
-β”‚ └── ci.yml # GitHub Actions CI (lint + test in mock mode)
-β”œβ”€β”€ .pre-commit-config.yaml # Pre-commit hooks (ruff, trailing whitespace, YAML)
-β”œβ”€β”€ assets/
-β”‚ β”œβ”€β”€ logo.svg # Project logo
-β”‚ └── demo.gif # Demo animation (placeholder - needs real GIF)
-β”œβ”€β”€ docs/
-β”‚ β”œβ”€β”€ install.md # Comprehensive installation guide
-β”‚ β”œβ”€β”€ tools.md # Complete tool catalog with schemas/examples
-β”‚ β”œβ”€β”€ architecture.md # System architecture and design decisions
-β”‚ └── security.md # Security model and threat boundaries
-β”œβ”€β”€ examples/
-β”‚ └── revit-mcp-config.json # Example configuration file
-β”œβ”€β”€ packages/
-β”‚ β”œβ”€β”€ mcp-server-revit/
-β”‚ β”‚ β”œβ”€β”€ pyproject.toml # Python package configuration
-β”‚ β”‚ β”œβ”€β”€ src/
-β”‚ β”‚ β”‚ └── revit_mcp_server/
-β”‚ β”‚ β”‚ β”œβ”€β”€ __init__.py
-β”‚ β”‚ β”‚ β”œβ”€β”€ __main__.py # Entry point
-β”‚ β”‚ β”‚ β”œβ”€β”€ server.py # MCP protocol handler
-β”‚ β”‚ β”‚ β”œβ”€β”€ config.py # Environment-based configuration
-β”‚ β”‚ β”‚ β”œβ”€β”€ schemas.py # Pydantic models for all tools
-β”‚ β”‚ β”‚ β”œβ”€β”€ errors.py # Custom exceptions
-β”‚ β”‚ β”‚ β”œβ”€β”€ bridge/
-β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ __init__.py
-β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ client.py # HTTP bridge client
-β”‚ β”‚ β”‚ β”‚ └── mock.py # Mock bridge for testing
-β”‚ β”‚ β”‚ β”œβ”€β”€ security/
-β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ __init__.py
-β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ workspace.py # Path sandboxing
-β”‚ β”‚ β”‚ β”‚ └── audit.py # Audit logging
-β”‚ β”‚ β”‚ └── tools/
-β”‚ β”‚ β”‚ β”œβ”€β”€ __init__.py
-β”‚ β”‚ β”‚ β”œβ”€β”€ handlers.py # 25 tool implementations
-β”‚ β”‚ β”‚ β”œβ”€β”€ document.py
-β”‚ β”‚ β”‚ └── health.py
-β”‚ β”‚ └── tests/
-β”‚ β”‚ β”œβ”€β”€ conftest.py
-β”‚ β”‚ β”œβ”€β”€ test_config.py
-β”‚ β”‚ β”œβ”€β”€ test_server.py
-β”‚ β”‚ └── test_tools.py
-β”‚ β”œβ”€β”€ revit-bridge-addin/
-β”‚ β”‚ β”œβ”€β”€ RevitBridge.sln # Visual Studio solution
-β”‚ β”‚ β”œβ”€β”€ RevitBridge.csproj # .NET 4.8 project file
-β”‚ β”‚ β”œβ”€β”€ RevitBridge.addin # Revit add-in manifest
-β”‚ β”‚ └── src/
-β”‚ β”‚ └── Bridge/
-β”‚ β”‚ β”œβ”€β”€ App.cs # IExternalApplication entry point
-β”‚ β”‚ β”œβ”€β”€ BridgeServer.cs # HTTP listener (port 3000)
-β”‚ β”‚ β”œβ”€β”€ BridgeCommandFactory.cs # Tool router
-β”‚ β”‚ └── ExternalEventHandler.cs # Revit API queue
-β”‚ └── client-demo/
-β”‚ └── demo.py # Example client workflow
-β”œβ”€β”€ scripts/
-β”‚ β”œβ”€β”€ dev.ps1 # Development environment setup
-β”‚ β”œβ”€β”€ run-server.ps1 # Start MCP server
-β”‚ β”œβ”€β”€ run-demo.ps1 # Run demo client
-β”‚ β”œβ”€β”€ build-addin.ps1 # Build bridge add-in
-β”‚ └── install-addin.ps1 # Install add-in to Revit
-β”œβ”€β”€ CHANGELOG.md # Version history
-β”œβ”€β”€ CONTRIBUTING.md # Contribution guidelines
-β”œβ”€β”€ LICENSE # MIT License
-β”œβ”€β”€ README.md # Main documentation
-└── SECURITY.md # Security policy and vulnerability reporting
-```
-
-## Mock Mode Demo Commands
-
-```bash
-# 1. Clone repository
-git clone https://github.com/Sam-AEC/mcp.git
-cd mcp
-
-# 2. Create virtual environment
-python -m venv venv
-source venv/bin/activate # Linux/Mac
-venv\Scripts\activate # Windows
-
-# 3. Install MCP server
-pip install -e packages/mcp-server-revit[dev]
-
-# 4. Configure environment
-export MCP_REVIT_MODE=mock
-export WORKSPACE_DIR="$(pwd)/workspace"
-export MCP_REVIT_ALLOWED_DIRECTORIES="$(pwd)/workspace"
-mkdir -p workspace
-
-# 5. Run tests
-pytest packages/mcp-server-revit/tests -v
-
-# 6. Start MCP server (in one terminal)
-python -m revit_mcp_server
-
-# 7. Run demo client (in another terminal)
-python packages/client-demo/demo.py
-
-# Expected output:
-# - Health check: {"status": "healthy", "mode": "mock"}
-# - Document opened: mock response with file path
-# - Quantities exported: workspace/quantities.csv (mock data)
-# - Audit log: workspace/audit.jsonl with request tracking
-```
-
-## Bridge Mode Demo Commands (Windows)
-
-```powershell
-# 1. Clone repository (same as mock mode)
-git clone https://github.com/Sam-AEC/mcp.git
-cd mcp
-
-# 2. Install Python package (same as mock mode)
-python -m venv venv
-venv\Scripts\activate
-pip install -e packages/mcp-server-revit[dev]
-
-# 3. Set Revit SDK path
-$env:REVIT_SDK = "C:\Program Files\Autodesk\Revit 2024\SDK"
-
-# 4. Build bridge add-in
-.\scripts\build-addin.ps1
-
-# 5. Install add-in to Revit 2024
-.\scripts\install-addin.ps1 -RevitYear 2024
-
-# 6. Start Revit (bridge loads automatically)
-
-# 7. Configure bridge mode
-$env:MCP_REVIT_MODE = "bridge"
-$env:MCP_REVIT_BRIDGE_URL = "http://localhost:3000"
-$env:WORKSPACE_DIR = "C:\revit-workspace"
-$env:MCP_REVIT_ALLOWED_DIRECTORIES = "C:\revit-workspace"
-mkdir C:\revit-workspace -ErrorAction SilentlyContinue
-
-# 8. Start MCP server (in one terminal)
-python -m revit_mcp_server
-
-# 9. Run demo client (in another terminal)
-python packages/client-demo/demo.py
-
-# Expected output:
-# - Health check: {"status": "healthy", "mode": "bridge", "revit_version": "2024"}
-# - Real Revit operations execute
-# - Files created in C:\revit-workspace\
-# - Audit log tracks bridge communications
-```
-
-## Pre-Release Checklist
-
-### Code Quality
-- [x] All tests pass (`pytest packages/mcp-server-revit/tests`)
-- [x] Linting passes (`ruff check packages/mcp-server-revit/src`)
-- [x] Formatting is consistent (`ruff format packages/mcp-server-revit/src`)
-- [x] Type checking passes (`mypy packages/mcp-server-revit/src`)
-- [ ] CI pipeline is green (check GitHub Actions)
-
-### Documentation
-- [x] README.md is comprehensive with badges and examples
-- [x] CHANGELOG.md includes v0.1.0 entry
-- [x] docs/install.md covers both mock and bridge modes
-- [x] docs/tools.md documents all 25 tools with schemas
-- [x] docs/architecture.md explains system design
-- [x] docs/security.md covers threat model
-- [x] CONTRIBUTING.md provides clear guidelines
-- [x] SECURITY.md includes vulnerability reporting
-
-### Visuals
-- [x] assets/logo.svg created
-- [ ] assets/demo.gif created (currently placeholder - needs real GIF)
-
-### Security
-- [x] No personal names or sensitive data in code
-- [x] LICENSE updated to generic attribution
-- [x] Workspace sandboxing enforced
-- [x] Audit logging implemented
-- [x] Mock mode safe for CI
-
-### Build & Deploy
-- [ ] Test mock mode on fresh clone
-- [ ] Test bridge mode on Windows with Revit 2024
-- [ ] Verify add-in builds without errors
-- [ ] Verify add-in installs to correct location
-- [ ] Test all PowerShell scripts
-
-### Repository Hygiene
-- [x] Unnecessary files removed (history.txt, CODE_OF_CONDUCT.md, redundant READMEs)
-- [x] .gitignore comprehensive
-- [x] Pre-commit hooks configured
-- [x] GitHub Actions CI configured
-
-## Post-Release Tasks
-
-1. **Create GitHub Release**:
- - Tag: `v0.1.0`
- - Title: "MCP Revit Bridge v0.1.0"
- - Description: Copy from CHANGELOG.md
- - Attach demo.gif if created
-
-2. **Update Repository Settings**:
- - Add description: "Connect MCP clients to Autodesk Revit through a Python server and .NET bridge add-in"
- - Add topics: `revit`, `mcp`, `autodesk`, `revit-api`, `automation`, `dotnet`, `python`
- - Enable issues
- - Enable discussions (optional)
-
-3. **Create Demo GIF**:
- - Record 6-10 second screen capture
- - Show: mock mode startup β†’ demo client β†’ output files
- - Optimize to <2MB
- - Replace assets/demo.gif placeholder
-
-4. **Announce**:
- - Post in relevant communities (if applicable)
- - Update mcp-use framework with example (if they accept showcase projects)
-
-## Known Limitations for v0.1.0
-
-- Bridge add-in has stub implementations (returns mock data, no real Revit API calls)
-- ExternalEvent pattern not fully implemented
-- No async HTTP client (synchronous only)
-- Single request at a time (no queuing)
-- Limited error handling in bridge
-- No request batching
-
-## Roadmap for v0.2.0
-
-- Implement real Revit API operations in bridge
-- Add ExternalEvent queue processing
-- Async HTTP client in MCP server
-- Additional QA tools
-- Enhanced sheet automation
-- Batch document processing
-- Better error messages
-
-## Testing Recommendations
-
-Before releasing:
-
-1. Clone repo fresh to `/tmp/mcp-test`
-2. Follow mock mode commands exactly
-3. Verify all output artifacts
-4. On Windows machine:
- - Install Revit 2024
- - Follow bridge mode commands
- - Verify HTTP listener starts
- - Test at least 3 different tools
-
-## Support Plan
-
-- Monitor GitHub issues
-- Respond to bug reports within 48 hours
-- Accept PRs for new tools
-- Update documentation based on user feedback