Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.
Python aecai-agentsautodeskautomationbimclaudeifcmcpmcp-servermodel-context-protocolnavisworksrevitrevit-addinrevit-apirhino
v1.0.0 Release: Premium theme-adaptive UI/UX overhaul and secure publishing by @Sam-AEC
sammohammad5787a5b74213839
diff --git a/.env.example b/.env.exampledeleted file mode 100644index 5723a5f..0000000--- a/.env.example+++ /dev/null@@ -1,20 +0,0 @@-# RevitMCP Server Configuration-# Copy this file to .env and adjust paths for your system--# Required: Directory where your Revit projects are located-MCP_REVIT_WORKSPACE_DIR=C:\RevitProjects--# Required: Directories that the MCP server is allowed to access (semicolon-separated)-MCP_REVIT_ALLOWED_DIRECTORIES=C:\RevitProjects;C:\Users\YourName\Documents--# Bridge URL (default: http://127.0.0.1:3000)-MCP_REVIT_BRIDGE_URL=http://127.0.0.1:3000--# Server mode: "mock" for testing without Revit, "bridge" for real Revit connection-MCP_REVIT_MODE=bridge--# Log level: DEBUG, INFO, WARNING, ERROR-MCP_REVIT_LOG_LEVEL=INFO--# Audit log file path (optional)-MCP_REVIT_AUDIT_LOG=audit.logdiff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.ymlindex df35270..052653a 100644--- a/.github/workflows/publish-mcp.yml+++ b/.github/workflows/publish-mcp.yml@@ -15,7 +15,7 @@ jobs:steps:- name: Checkout code- uses: actions/checkout@v5+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- name: Install mcp-publisherrun: |diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.ymlindex 57d90a6..7ea527a 100644--- a/.github/workflows/publish-pypi.yml+++ b/.github/workflows/publish-pypi.yml@@ -12,10 +12,10 @@ jobs:steps:- name: Checkout code- uses: actions/checkout@v5+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2- name: Set up Python- uses: actions/setup-python@v6+ uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0with:python-version: "3.11"@@ -29,6 +29,6 @@ jobs:run: python -m build- name: Publish package to PyPI- uses: pypa/gh-action-pypi-publish@release/v1+ uses: pypa/gh-action-pypi-publish@7f25271a4aa483500f742f9492b2ab5648d61011 # v1.12.4with:packages-dir: packages/mcp-server-revit/distdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mddeleted file mode 100644index 7895522..0000000--- a/CONTRIBUTING.md+++ /dev/null@@ -1,27 +0,0 @@-# Contributing--Thanks for improving Autodesk Revit MCP Server.--## Focus Areas--Contributions are most useful when they improve one of the following:-- Revit command coverage-- MCP tool reliability and error handling-- installation and configuration documentation-- developer ergonomics for local debugging and testing--## Guidelines--- Keep changes scoped to a single feature, fix, or documentation update.-- Document any Revit version assumptions in the PR description.-- Sanitize local paths, machine names, and credentials from config examples.-- If a change affects UI or commands, include reproduction steps and expected behavior.-- Update examples or docs when behavior changes.--## Pull Request Checklist--Before opening a PR, confirm that:-- the change has clear reproduction and validation steps-- config examples still work with placeholder values-- README or docs are updated when setup or behavior changes-- any limitations or known gaps are called out explicitlydiff --git a/README.md b/README.mdindex cc7389a..c3cd8fc 100644--- a/README.md+++ b/README.md@@ -11,7 +11,7 @@[](https://dotnet.microsoft.com)[](https://autodesk.com/products/revit)-[Quick Start](#quick-start) | [Documentation](docs/) | [API Reference](docs/tools.md)+[Quick Start](#quick-start) | [API Reference](docs/tools.md)</div>@@ -75,8 +75,6 @@ Edit `%APPDATA%\Claude\claude_desktop_config.json`:This repository includes a workspace MCP config at `.vscode/mcp.json`. After installing the Python package and starting Revit with the bridge add-in loaded, open this repository in VS Code and run `MCP: List Servers` or use the MCP Servers view.-For marketplace and registry publication details, see [MCP Marketplaces and Client Distribution](docs/marketplaces.md).-### Verify InstallationStart Revit, then:@@ -264,35 +262,8 @@ Expected response:- `revit.reflect_get` - Get property via reflection- `revit.reflect_set` - Set property via reflection-### Project Parameters-- `revit.list_shared_parameters` - List shared parameters-- `revit.create_shared_parameter` - Create shared parameter-- `revit.list_project_parameters` - List project parameters-- `revit.create_project_parameter` - Create project parameter--### Revisions-- `revit.get_revision_sequences` - Get revision sequences-**Total: 100+ tools** • **Full API Reference:** [docs/tools.md](docs/tools.md)-### Development Status--This server is actively maintained and continuously improved. For the latest updates and known limitations, see:--- [GitHub Issues](https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server/issues) - Bug reports and feature requests-- [Changelog](CHANGELOG.md) - Version history and updates-- [Discussions](https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server/discussions) - Community support-------## Security--**Default:** Localhost-only (`127.0.0.1:3000`), no authentication required.--**Enterprise:** Optional HTTPS, OAuth2 (Entra ID), audit logging, and rate limiting.--See [docs/security.md](docs/security.md) for details.----## Project Structure@@ -315,9 +286,7 @@ Autodesk-Revit-MCP-Server/│ ├── build-addin.ps1 # Build C# DLL│ └── install.ps1 # Deploy to Revit├── docs/-│ ├── tools.md # API reference-│ ├── architecture.md # System design-│ └── security.md # Security model+│ └── tools.md # API reference listing└── README.md```@@ -325,13 +294,7 @@ Autodesk-Revit-MCP-Server/## Documentation-- [Installation Guide](docs/install.md)-- [API Reference](docs/tools.md)-- [Architecture](docs/architecture.md)-- [Security Model](docs/security.md)-- [MCP Marketplaces and Client Distribution](docs/marketplaces.md)-- [Claude Desktop Setup](CLAUDE_DESKTOP_SETUP.md)-- [Contributing](CONTRIBUTING.md)+- [API Reference (Revit MCP Tools List)](docs/tools.md)---@@ -345,7 +308,6 @@ Autodesk-Revit-MCP-Server/- [Issues](https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server/issues)- [Discussions](https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server/discussions)-- [Changelog](CHANGELOG.md)- [Model Context Protocol](https://modelcontextprotocol.io)---diff --git a/SECURITY.md b/SECURITY.mddeleted file mode 100644index e49c9cc..0000000--- a/SECURITY.md+++ /dev/null@@ -1,82 +0,0 @@-# Security Policy--## Supported Versions--We actively support and provide security updates for the following versions:--| Version | Supported |-| ------- | ------------------ |-| 1.x | ✅ Active support |-| < 1.0 | ❌ Not supported |--## Reporting a Vulnerability--**DO NOT** open public GitHub issues for security vulnerabilities.--### Where to Report--Use GitHub's private security advisory feature:--1. Navigate to the repository's **Security** tab-2. Click **"Report a vulnerability"**-3. Provide detailed information--### What to Include--- **Description**: Clear description of the vulnerability-- **Steps to Reproduce**: Detailed steps to demonstrate the issue-- **Impact Assessment**: What an attacker could achieve-- **Affected Versions**: Which versions are vulnerable-- **Suggested Fix** (optional): Your recommendations--### Response Timeline--- **Acknowledgment**: Within 48 hours-- **Initial Triage**: Within 7 days-- **Fix Development**:- - **Critical**: Within 7 days- - **High**: Within 30 days- - **Medium**: Within 90 days--### Disclosure Policy--We follow **coordinated disclosure**:-1. Private report received-2. Fix developed and tested-3. Patched version released-4. Public disclosure after 30 days--## Security Best Practices--### For Users--✅ **Keep localhost-only** - Never bind to `0.0.0.0` without enterprise hardening-✅ **Update regularly** - Apply security patches within 30 days-✅ **Enable audit logs** - Monitor `%APPDATA%\RevitMCP\Logs\bridge.jsonl`-✅ **Workspace sandboxing** - Only allow trusted project directories-✅ **Enterprise mode** - Follow [docs/security.md](docs/security.md) for HTTPS/OAuth--### For Developers--✅ **Input validation** - All inputs validated against schemas-✅ **No secrets in code** - Use environment variables-✅ **Least privilege** - No privilege elevation-✅ **Exception handling** - Sanitize before returning to client--## Security Hardening Checklist--Before production deployment:--- [ ] Bridge binds to `127.0.0.1` only-- [ ] Workspace directories limited-- [ ] Audit logging enabled-- [ ] HTTPS configured (if remote access)-- [ ] OAuth2 enabled (if external clients)-- [ ] Rate limiting configured-- [ ] Security reviews scheduled--Full guide: [docs/security.md](docs/security.md)-------**Last Updated**: 2026-01-07diff --git a/claude_desktop_config.json.example b/claude_desktop_config.json.exampledeleted file mode 100644index 4d13655..0000000--- a/claude_desktop_config.json.example+++ /dev/null@@ -1,17 +0,0 @@-{- "mcpServers": {- "revit": {- "command": "C:\\Users\\samo3\\AppData\\Local\\Programs\\Python\\Python313\\python.exe",- "args": [- "-m",- "revit_mcp_server.mcp_server"- ],- "env": {- "MCP_REVIT_WORKSPACE_DIR": "C:\\Users\\samo3\\Documents",- "MCP_REVIT_ALLOWED_DIRECTORIES": "C:\\Users\\samo3\\Documents",- "MCP_REVIT_BRIDGE_URL": "http://127.0.0.1:3000",- "MCP_REVIT_MODE": "bridge"- }- }- }-}diff --git a/docs/architecture.md b/docs/architecture.mddeleted file mode 100644index 6512ccd..0000000--- a/docs/architecture.md+++ /dev/null@@ -1,436 +0,0 @@-# Architecture--MCP Revit Bridge is a two-tier system connecting MCP clients to Autodesk Revit through a Python server and .NET bridge add-in.--## System Overview--```-┌──────────────────────────────────────────────────────────────────┐-│ MCP Client (Claude Desktop, custom apps, automation scripts) │-└────────────────────────────┬─────────────────────────────────────┘- │- │ MCP Protocol (stdio)- │ JSON-RPC messages- │-┌────────────────────────────▼─────────────────────────────────────┐-│ MCP Server (Python) │-│ ┌────────────────┐ ┌──────────────┐ ┌────────────────────┐ │-│ │ Schema │ │ Workspace │ │ Audit │ │-│ │ Validation │ │ Sandbox │ │ Recorder │ │-│ │ (Pydantic) │ │ (pathlib) │ │ (JSONL logs) │ │-│ └────────────────┘ └──────────────┘ └────────────────────┘ │-│ │-│ ┌──────────────────────────────────────────────────────────┐ │-│ │ Tool Handlers (25 tools) │ │-│ │ - revit.health, revit.open_document, revit.export_* │ │-│ └──────────────────────────────────────────────────────────┘ │-│ │-│ ┌──────────────────────────────────────────────────────────┐ │-│ │ Bridge Client │ │-│ │ ┌────────────────┐ ┌────────────────────────┐ │ │-│ │ │ Mock Bridge │ OR │ HTTP Client (httpx) │ │ │-│ │ │ (deterministic)│ │ -> localhost:3000 │ │ │-│ │ └────────────────┘ └────────────────────────┘ │ │-│ └──────────────────────────────────────────────────────────┘ │-└────────────────────────────┬─────────────────────────────────────┘- │- │ HTTP POST (localhost only)- │ {"tool": "...", "payload": {...}}- │-┌────────────────────────────▼─────────────────────────────────────┐-│ Revit Bridge Add-in (.NET 4.8) │-│ ┌──────────────────────────────────────────────────────────┐ │-│ │ BridgeServer (HttpListener on 127.0.0.1:3000) │ │-│ └────────────────────────────┬─────────────────────────────┘ │-│ │ │-│ ┌────────────────────────────▼─────────────────────────────┐ │-│ │ BridgeCommandFactory (tool router) │ │-│ │ - Routes tool requests to handlers │ │-│ │ - Serializes/deserializes JSON │ │-│ └────────────────────────────┬─────────────────────────────┘ │-│ │ │-│ ┌────────────────────────────▼─────────────────────────────┐ │-│ │ ExternalEventHandler (Revit API queue) │ │-│ │ - Queues operations on UI thread │ │-│ │ - Executes Revit API calls safely │ │-│ └────────────────────────────┬─────────────────────────────┘ │-└────────────────────────────────┼─────────────────────────────────┘- │- │ Revit API- │-┌────────────────────────────────▼─────────────────────────────────┐-│ Autodesk Revit (2024-2026) │-│ - Document operations │-│ - Element queries and modifications │-│ - Export operations (PDF, DWG, IFC, CSV) │-│ - QA metric calculations │-└──────────────────────────────────────────────────────────────────┘-```--## Components--### MCP Server (Python)--**Location**: [packages/mcp-server-revit/](../packages/mcp-server-revit/)--**Responsibilities**:-- Listen for MCP protocol messages on stdin/stdout-- Validate tool inputs against JSON schemas (Pydantic)-- Enforce workspace sandboxing (all file paths within allowed directories)-- Route tool requests to appropriate handlers-- Record audit logs for every invocation-- Communicate with bridge (HTTP) or mock implementation--**Key Modules**:-- [server.py](../packages/mcp-server-revit/src/revit_mcp_server/server.py): Main MCP protocol handler-- [config.py](../packages/mcp-server-revit/src/revit_mcp_server/config.py): Environment-based configuration-- [schemas.py](../packages/mcp-server-revit/src/revit_mcp_server/schemas.py): Pydantic models for all 25 tools-- [tools/handlers.py](../packages/mcp-server-revit/src/revit_mcp_server/tools/handlers.py): Tool implementation functions-- [security/workspace.py](../packages/mcp-server-revit/src/revit_mcp_server/security/workspace.py): Path validation-- [security/audit.py](../packages/mcp-server-revit/src/revit_mcp_server/security/audit.py): Audit log writing-- [bridge/client.py](../packages/mcp-server-revit/src/revit_mcp_server/bridge/client.py): HTTP bridge client-- [bridge/mock.py](../packages/mcp-server-revit/src/revit_mcp_server/bridge/mock.py): Deterministic mock responses--**Configuration**:-```bash-MCP_REVIT_MODE=mock|bridge # Execution mode-WORKSPACE_DIR=/path/to/workspace # Root directory for file operations-MCP_REVIT_ALLOWED_DIRECTORIES=... # Colon/semicolon-separated paths-MCP_REVIT_BRIDGE_URL=http://... # Bridge HTTP endpoint (bridge mode only)-MCP_REVIT_AUDIT_LOG=/path/to/log # Audit log file-```--### Revit Bridge Add-in (.NET)--**Location**: [packages/revit-bridge-addin/](../packages/revit-bridge-addin/)--**Responsibilities**:-- Start HTTP listener on Revit startup (IExternalApplication)-- Accept JSON POST requests from MCP server-- Queue operations on Revit UI thread via ExternalEvent-- Execute Revit API operations-- Return JSON responses to MCP server--**Key Classes**:-- [App.cs](../packages/revit-bridge-addin/src/Bridge/App.cs): Add-in entry point (IExternalApplication)-- [BridgeServer.cs](../packages/revit-bridge-addin/src/Bridge/BridgeServer.cs): HTTP listener (HttpListener on port 3000)-- [BridgeCommandFactory.cs](../packages/revit-bridge-addin/src/Bridge/BridgeCommandFactory.cs): Tool request router-- [ExternalEventHandler.cs](../packages/revit-bridge-addin/src/Bridge/ExternalEventHandler.cs): Revit API execution queue--**Deployment**:-1. Build with MSBuild or Visual Studio-2. Output DLL: `packages/revit-bridge-addin/bin/Release/RevitBridge.dll`-3. Manifest file: [RevitBridge.addin](../packages/revit-bridge-addin/RevitBridge.addin)-4. Install to: `%ProgramData%\Autodesk\Revit\Addins\{year}\RevitBridge.addin`--**Communication Protocol**:--Request format:-```json-POST http://localhost:3000/-Content-Type: application/json--{- "tool": "revit.export_schedules",- "payload": {- "request_id": "req_001",- "output_path": "C:\\workspace\\schedules.csv"- }-}-```--Response format:-```json-{- "schedules": ["Door Schedule", "Window Schedule"],- "output_path": "C:\\workspace\\schedules.csv"-}-```--Error response:-```json-{- "error": "RevitAPIException",- "message": "Failed to export schedule: Document not open"-}-```--## Execution Models--### Mock Mode--**Use case**: CI/CD, testing, development without Revit--**Behavior**:-- All tools return deterministic stub responses-- No bridge HTTP communication-- Workspace sandboxing still enforced-- Audit logging still active--**Advantages**:-- No Windows/Revit dependency-- Fast execution (no I/O delays)-- Repeatable outputs for regression tests-- Safe for automated pipelines--**Configuration**:-```bash-export MCP_REVIT_MODE=mock-```--### Bridge Mode--**Use case**: Production Revit automation--**Behavior**:-- MCP server sends HTTP requests to bridge-- Bridge queues operations on Revit UI thread-- Real Revit API operations execute-- Actual files generated (CSV, PDF, DWG, IFC)--**Requirements**:-- Windows 10/11-- Revit 2024-2026 running-- Bridge add-in installed and loaded--**Configuration**:-```bash-export MCP_REVIT_MODE=bridge-export MCP_REVIT_BRIDGE_URL=http://localhost:3000-```--## Why the Bridge Exists--### Revit API Constraints--1. **UI Thread Requirement**: Most Revit API operations must run on the main UI thread-2. **External Event Pattern**: Out-of-process calls must use `IExternalEventHandler`-3. **.NET Framework Dependency**: Revit API requires .NET 4.8 (not .NET Core)-4. **Windows-Only**: Revit runs exclusively on Windows--### Design Decisions--**Why not Python → Revit directly?**-- Revit API is .NET only-- pythonnet/.NET interop is complex and fragile-- Process boundary provides cleaner separation--**Why HTTP instead of named pipes/IPC?**-- Simple debugging (curl/Postman can test bridge)-- No Windows-specific IPC complexity-- HTTP is language-agnostic for future clients-- Localhost-only binding is secure--**Why separate add-in instead of Revit macros?**-- Add-ins start automatically with Revit-- No manual macro execution required-- Persistent HTTP listener across sessions-- Better error handling and logging--## Trust Boundaries--### Boundary 1: MCP Client → MCP Server--**Threat**: Malicious client sends path traversal attacks--**Mitigation**:-- Schema validation rejects malformed inputs-- Workspace sandbox blocks paths outside allowed directories-- All file paths resolved to absolute paths before validation--### Boundary 2: MCP Server → Bridge--**Threat**: Compromised bridge returns malicious data--**Mitigation**:-- Bridge runs on localhost only (127.0.0.1)-- No authentication needed (same-machine trust)-- Responses validated against output schemas-- Audit log records all bridge communications--### Boundary 3: Bridge → Revit--**Threat**: Bridge exploits Revit API vulnerabilities--**Mitigation**:-- ExternalEvent enforces UI thread execution-- Revit API's own security model applies-- Document operations respect Revit's file permissions-- Bridge cannot execute arbitrary code--## Scaling and Performance--### Current Limitations--- Single-threaded bridge (one request at a time)-- Synchronous HTTP requests (blocking)-- No request queuing or batching-- Each tool invocation is independent--### Future Improvements--- Async HTTP client in MCP server-- Request queue in bridge with parallel execution-- Batch operations (e.g., export 100 sheets in one call)-- Persistent document cache (avoid repeated opening)--## Testing Strategy--### Unit Tests--**Location**: [packages/mcp-server-revit/tests/](../packages/mcp-server-revit/tests/)--**Coverage**:-- Schema validation (valid/invalid inputs)-- Workspace path enforcement-- Tool handler registration-- Mock bridge responses--**Run**:-```bash-pytest packages/mcp-server-revit/tests-```--### Integration Tests--**Approach**: Use mock mode to test end-to-end without Revit--```python-# Set mock mode-os.environ["MCP_REVIT_MODE"] = "mock"--# Run server and send MCP messages-response = mcp_server.handle_tool_request({- "tool": "revit.export_schedules",- "payload": {"request_id": "test_001", "output_path": "/workspace/test.csv"}-})--# Validate response matches schema-assert "schedules" in response-assert response["output_path"] == "/workspace/test.csv"-```--### Manual Testing (Bridge Mode)--1. Build and install bridge add-in-2. Start Revit-3. Verify HTTP listener: `curl http://localhost:3000/`-4. Run demo client: `python packages/client-demo/demo.py`-5. Check audit log for recorded requests--## Security Considerations--See [security.md](security.md) for comprehensive security model.--**Key points**:-- All file paths sandboxed to allowed directories-- Bridge binds to localhost only (no external exposure)-- Audit logs record every tool invocation-- Schema validation prevents injection attacks-- Mock mode safe for untrusted CI environments--## Extending the System--### Adding a New Tool--1. Define input/output schemas in [schemas.py](../packages/mcp-server-revit/src/revit_mcp_server/schemas.py):-```python-class MyToolInput(RequestPayload):- document_id: str- parameter_name: str--class MyToolOutput(BaseModel):- value: str-```--2. Implement handler in [handlers.py](../packages/mcp-server-revit/src/revit_mcp_server/tools/handlers.py):-```python-def my_tool(payload: dict, workspace: WorkspaceMonitor) -> dict:- input_model = MyToolInput(**payload)- # Mock implementation- return MyToolOutput(value="mock_result").model_dump()-```--3. Register in `TOOL_HANDLERS`:-```python-TOOL_HANDLERS["revit.my_tool"] = my_tool-```--4. Update bridge [BridgeCommandFactory.cs](../packages/revit-bridge-addin/src/Bridge/BridgeCommandFactory.cs):-```csharp-case "revit.my_tool":- // Revit API implementation- var doc = GetActiveDocument();- var param = GetParameter(doc, payload["parameter_name"]);- return new { value = param.AsString() };-```--5. Add tests in [test_tools.py](../packages/mcp-server-revit/tests/test_tools.py)--6. Document in [tools.md](tools.md)--## Deployment Topologies--### Local Development--```-Developer Machine:- - Revit 2024- - Bridge add-in- - MCP server (Python venv)- - Demo client-```--### CI/CD Pipeline--```-GitHub Actions (Windows runner):- - MCP server (mock mode)- - Pytest- - No Revit dependency-```--### Production Automation--```-Dedicated Windows Server:- - Revit 2024 (licensed)- - Bridge add-in (installed)- - MCP server (systemd/Windows service)- - Cron/scheduled tasks invoke demo client- - Audit logs → monitoring system-```--## Troubleshooting--### Bridge Not Responding--**Symptoms**: MCP server reports "Connection refused"--**Diagnosis**:-1. Check Revit is running-2. Verify add-in loaded: Check Revit Journal file-3. Test bridge directly: `curl http://localhost:3000/`-4. Review add-in manifest path in `RevitBridge.addin`--### Workspace Violations--**Symptoms**: `WorkspaceViolation` errors--**Diagnosis**:-1. Print allowed directories: `echo $MCP_REVIT_ALLOWED_DIRECTORIES`-2. Verify paths are absolute-3. Check path separators (Windows: `\\` or `/`)-4. Ensure directories exist and are readable--### Schema Validation Failures--**Symptoms**: `SchemaValidationError` on tool invocation--**Diagnosis**:-1. Review tool schema in [tools.md](tools.md)-2. Check required vs optional fields-3. Validate JSON syntax-4. Review error message for specific field issues--See [install.md](install.md) for additional troubleshooting.diff --git a/docs/bridge-http-api.md b/docs/bridge-http-api.mddeleted file mode 100644index 9a32c5a..0000000--- a/docs/bridge-http-api.md+++ /dev/null@@ -1,77 +0,0 @@-# Bridge HTTP API--The Revit add-in exposes a localhost HTTP listener implemented in [BridgeServer.cs](../packages/revit-bridge-addin/src/Bridge/BridgeServer.cs).--## Default Binding--The bridge server binds to:--- `http://127.0.0.1:3000/`--This default is hard-coded in the `BridgeServer` constructor unless a different prefix is passed at startup.--## Supported Endpoints--### `GET /health`--Returns basic bridge health metadata, including:--- `status`-- assembly `version`-- `uptime_seconds`-- detected `revit_version`-- `active_document`--This is the fastest way to confirm the add-in loaded and the listener is reachable.--### `GET /tools`--Returns the tool catalog built by `BridgeCommandFactory.GetToolCatalog()`.--Use this endpoint when you want to verify what the C# layer currently advertises, rather than relying only on top-level documentation.--### `POST /execute`--Executes a routed Revit command.--Expected JSON shape:--```json-{- "request_id": "req-123",- "tool": "revit.health",- "payload": {- "request_id": "req-123"- }-}-```--Operational details:--- the request body is parsed as JSON-- the tool name is routed through `BridgeCommandFactory`-- the request is queued into `CommandQueue`-- `ExternalEvent.Raise()` hands execution to the Revit UI thread-- the HTTP response waits for queue completion or timeout--## Response Model--Bridge responses are serialized from `CommandResponse`:--- `status`-- `tool`-- `result`-- optional `message`-- optional `stack_trace`--Timeout handling is implemented in `CommandQueue.WaitForResponse()` with a default 30 second limit.--## Error Semantics--Unknown routes return `404`.--Unhandled exceptions inside request processing return `500` with a JSON error object. Command execution exceptions are converted into `CommandResponse` objects with `status = "error"`.--## Operational Rule--Treat `/health` and `/tools` as diagnostics, and `/execute` as the only mutation-capable entrypoint. If you are debugging live automation, check `/health` first before assuming a tool-routing problem.diff --git a/docs/build-and-install-scripts.md b/docs/build-and-install-scripts.mddeleted file mode 100644index 08a9de3..0000000--- a/docs/build-and-install-scripts.md+++ /dev/null@@ -1,79 +0,0 @@-# Build And Install Scripts--The `scripts/` directory is the operational entry surface for building, packaging, installing, and running the stack.--## Script Roles--### `scripts/build-addin.ps1`--Builds the C# add-in for a selected Revit version.--Key behavior:--- blocks unsafe execution from `C:\Windows`-- prefers MSBuild discovered through `vswhere`-- falls back to `dotnet build`-- passes `RevitVersion` into `RevitBridge.csproj`--### `scripts/package.ps1`--Creates a distribution package under `dist\RevitMCP`.--Key behavior:--- builds add-in binaries for one or more Revit versions-- copies versioned binaries into `dist\bin\{year}`-- attempts PyInstaller packaging for the Python server-- always builds a wheel as fallback-- writes `default.json` and `README.txt` into the distribution payload--### `scripts/install.ps1`--Installs from a prepared distribution package.--Key behavior:--- auto-triggers packaging if `dist\RevitMCP` is missing-- copies bridge binaries into `C:\ProgramData\RevitMCP\bin`-- installs the add-in manifest into the selected Revit add-in directory-- copies default configuration into `C:\ProgramData\RevitMCP\config`--### `scripts/install-addin.ps1`--Performs the minimal manifest copy for a chosen Revit year.--This is the narrowest install path and is useful when the binaries are already built.--### `scripts/setup.ps1`--Acts as the orchestration script.--It runs:--1. build-2. package-3. optional install--### `scripts/start-server.ps1`--Prepares and launches the Python MCP server.--Key behavior:--- creates `.env` from `.env.example` if needed-- checks Python availability-- installs the Python package in editable mode-- optionally probes `http://127.0.0.1:3000/health` in bridge mode-- launches `python -m revit_mcp_server`--### `scripts/run-server.ps1`--This is the thinnest launch path and only executes `python -m revit_mcp_server`.--## Safety Pattern--The more powerful scripts include a path guard that refuses execution from `C:\Windows`. That is an intentional operational safeguard, not decoration.--## Working Rule--Use `setup.ps1` when you want the full build-package-install path. Use `start-server.ps1` when the add-in is already in place and you only need to validate or run the Python side.diff --git a/docs/configuration-reference.md b/docs/configuration-reference.mddeleted file mode 100644index 628464e..0000000--- a/docs/configuration-reference.md+++ /dev/null@@ -1,61 +0,0 @@-# Configuration Reference--This document explains how the Python MCP server resolves runtime configuration from environment variables and `.env` files.--## Source Of Truth--Runtime configuration is defined in [packages/mcp-server-revit/src/revit_mcp_server/config.py](../packages/mcp-server-revit/src/revit_mcp_server/config.py).--The `Config` settings model is built with `pydantic-settings` and uses the `MCP_REVIT_` prefix.--## `.env` Resolution Order--Before the settings model is instantiated, `config.py` attempts to load `.env` from these locations in order:--1. repository root-2. current working directory-3. package root-4. fallback `load_dotenv()` from the current directory--This matters because local development, packaged execution, and script-driven execution may all start from different working directories.--## Core Settings--- `MCP_REVIT_WORKSPACE_DIR`: required root workspace path-- `MCP_REVIT_ALLOWED_DIRECTORIES`: required allowed directory list-- `MCP_REVIT_BRIDGE_URL`: optional bridge endpoint, used in bridge mode-- `MCP_REVIT_MODE`: `mock` or `bridge`-- `MCP_REVIT_AUDIT_LOG`: audit output path-- `MCP_REVIT_LOG_LEVEL`: log verbosity for the Python process--## Allowed Directory Parsing--`allowed_directories` is declared as `List[DirectoryPath]`, but `config.py` accepts a raw string and splits it on semicolons before validation.--Implications:--- Windows-style values such as `C:\work;C:\exports` are supported directly-- every path must resolve to an existing directory because `DirectoryPath` enforces existence-- malformed JSON in env values falls back to raw string handling through the custom `_RawEnvSource`--## Bridge Mode Enum--Execution mode is represented by `BridgeMode`:--- `mock`-- `bridge`--The default is `mock`, which keeps local test and CI runs safe when Revit is not available.--## Workspace Enforcement Hook--The `Config.workspace_allowed()` helper resolves an incoming path and checks whether it is relative to any configured allowed directory.--That means effective path validation depends on both:--- correct `MCP_REVIT_ALLOWED_DIRECTORIES`-- callers resolving paths consistently before writing files--## Operational Rule--If the server behaves differently across shells or launchers, check the working directory first. In this repo, `.env` discovery is intentionally flexible, so configuration drift usually comes from which launcher script set the process working directory.diff --git a/docs/execution-modes.md b/docs/execution-modes.mddeleted file mode 100644index 8762666..0000000--- a/docs/execution-modes.md+++ /dev/null@@ -1,56 +0,0 @@-# Execution Modes--The server supports two runtime modes, defined by `BridgeMode` in [config.py](../packages/mcp-server-revit/src/revit_mcp_server/config.py).--## `mock` Mode--`mock` is the default mode.--Behavior:--- the Python MCP process stays fully functional-- tool requests are handled without a live Revit process-- bridge traffic is replaced by deterministic mock responses-- workspace and audit behavior still run--Why it exists:--- local development without Revit-- CI validation on machines that do not have Autodesk Revit installed-- regression tests that need stable outputs--## `bridge` Mode--`bridge` mode forwards tool calls to the local Revit add-in over HTTP.--Behavior:--- the Python server validates input and routes calls-- the bridge client sends requests to `MCP_REVIT_BRIDGE_URL`-- the C# add-in queues work onto Revit's UI thread through `ExternalEvent`-- responses flow back through the Python layer to the MCP client--Requirements:--- Windows-- installed Revit bridge add-in-- running Revit session-- reachable localhost bridge endpoint--## Why The Split Matters--This repo uses one codebase for two very different environments:--- deterministic test and automation environments-- real Revit automation environments with UI-thread constraints--That is why the Python package contains both:--- `bridge/mock.py`-- `bridge/client.py`--The MCP-facing interface stays stable while the execution backend changes underneath it.--## Operational Guidance--Use `mock` when you need repeatable validation or when Revit is unavailable. Use `bridge` only when the add-in is installed and the target workflow genuinely needs live Revit API execution.diff --git a/docs/extending-the-stack.md b/docs/extending-the-stack.mddeleted file mode 100644index e2f00b8..0000000--- a/docs/extending-the-stack.md+++ /dev/null@@ -1,73 +0,0 @@-# Extending The Stack--Adding a new capability in this repository usually touches more than one layer. The clean path is cross-cutting by design.--## Layers Involved--A typical end-to-end tool addition spans:--1. Python schema and config-aware input validation-2. Python handler registration-3. bridge transport contract-4. C# routing in `BridgeCommandFactory`-5. live Revit API execution logic-6. tests-7. documentation--## Python Layer--The Python side owns the MCP-facing contract.--Typical files involved:--- [schemas.py](../packages/mcp-server-revit/src/revit_mcp_server/schemas.py)-- [tools/handlers.py](../packages/mcp-server-revit/src/revit_mcp_server/tools/handlers.py)-- [mcp_server.py](../packages/mcp-server-revit/src/revit_mcp_server/mcp_server.py)--This is where payload shape, handler registration, and mode-specific behavior start.--## Bridge Layer--If the tool requires live Revit execution, the bridge must know how to route it.--Typical files involved:--- [BridgeCommandFactory.cs](../packages/revit-bridge-addin/src/Bridge/BridgeCommandFactory.cs)-- [CommandQueue.cs](../packages/revit-bridge-addin/src/Bridge/CommandQueue.cs)-- [ExternalEventHandler.cs](../packages/revit-bridge-addin/src/Bridge/ExternalEventHandler.cs)--The queue and `ExternalEvent` machinery usually do not need a new abstraction per tool, but the route and execution method do.--## Documentation Surface--A real tool addition should update the docs surface too:--- `README.md` if the capability changes the public positioning-- `docs/tools.md` for catalog coverage-- focused operational docs if the behavior introduces new runtime expectations--If the capability changes install, security, or mode assumptions, the surrounding docs should move with it.--## Validation Loop--For a safe addition:--1. add schema and handler coverage-2. add or update Python tests-3. compile the add-in-4. validate the bridge route-5. run a live Revit check if the feature is not mock-only--## Common Failure Mode--The most common drift pattern in this repo is partial implementation:--- a tool name is documented-- a route exists in one layer-- another layer is missing or disabled--That creates apparent capability without reliable execution.--## Working Rule--Treat new tool work as a stack change, not a single-file change. If a feature does not move through schema, routing, execution, validation, and documentation together, the repo becomes harder for clients and operators to trust.diff --git a/docs/install.md b/docs/install.mddeleted file mode 100644index 4cd1cda..0000000--- a/docs/install.md+++ /dev/null@@ -1,268 +0,0 @@-# Installation Guide--This guide covers installation for both mock mode (no Revit required) and bridge mode (Windows with Revit).--## Prerequisites--### Mock Mode-- Python 3.11 or later-- pip package manager-- Git--### Bridge Mode (Additional)-- Windows 10/11-- Autodesk Revit 2024-2026-- .NET Framework 4.8-- Visual Studio 2019/2022 or MSBuild tools-- Revit SDK (installed with Revit or available from Autodesk Developer Network)--## Mock Mode Setup--Mock mode runs the complete MCP server with deterministic responses, suitable for CI, testing, and development without Revit.--### 1. Clone Repository--```bash-git clone https://github.com/YOUR_ORG/mcp-revit-bridge.git-cd mcp-revit-bridge-```--### 2. Create Virtual Environment--```bash-python -m venv venv-```--Activate the environment:-- Windows: `venv\Scripts\activate`-- Linux/Mac: `source venv/bin/activate`--### 3. Install Python Package--```bash-pip install -e packages/mcp-server-revit[dev]-```--This installs the MCP server with development dependencies (ruff, mypy, pytest).--### 4. Configure Environment--Set required environment variables:--```powershell-# PowerShell (Windows)-$env:MCP_REVIT_MODE = "mock"-$env:WORKSPACE_DIR = "C:\revit-workspace"-$env:MCP_REVIT_ALLOWED_DIRECTORIES = "C:\revit-workspace;C:\temp"-```--```bash-# Bash (Linux/Mac)-export MCP_REVIT_MODE="mock"-export WORKSPACE_DIR="/home/user/revit-workspace"-export MCP_REVIT_ALLOWED_DIRECTORIES="/home/user/revit-workspace:/tmp"-```--Or use the provided script:--```powershell-.\scripts\dev.ps1-```--### 5. Verify Installation--```bash-python -m pytest packages/mcp-server-revit/tests-```--All tests should pass.--### 6. Run Mock Server--```bash-python -m revit_mcp_server-```--The server listens on stdin/stdout for MCP protocol messages.--### 7. Run Demo Client--```bash-python packages/client-demo/demo.py-```--Expected output:-- Health check: `{"status": "healthy", "mode": "mock"}`-- Document opened: Mock response with document path-- Export quantities: Mock CSV file created in workspace-- Audit log: JSON file with request tracking--## Bridge Mode Setup--Bridge mode connects the MCP server to a running Revit instance via the .NET add-in.--### 1. Complete Mock Mode Setup--Follow steps 1-3 from Mock Mode Setup.--### 2. Set Environment Variable--```powershell-$env:REVIT_SDK = "C:\Program Files\Autodesk\Revit 2024\SDK"-```--Adjust path to your Revit version and SDK location.--### 3. Build Bridge Add-in--```powershell-.\scripts\build-addin.ps1-```--This compiles [RevitBridge.csproj](../packages/revit-bridge-addin/RevitBridge.csproj) to a DLL.--Expected output: `packages/revit-bridge-addin/bin/Release/RevitBridge.dll`--### 4. Install Add-in Manifest--```powershell-.\scripts\install-addin.ps1 -RevitYear 2024-```--This copies [RevitBridge.addin](../packages/revit-bridge-addin/RevitBridge.addin) to `%ProgramData%\Autodesk\Revit\Addins\2024\`.--### 5. Launch Revit--Start Revit. The add-in loads automatically and starts the HTTP bridge on `http://localhost:3000/`.--Verify in Revit:-- Check the Add-Ins tab for "Revit Bridge" (if UI is implemented)-- Bridge server runs silently in background--### 6. Configure MCP Server for Bridge Mode--Update environment:--```powershell-$env:MCP_REVIT_MODE = "bridge"-$env:MCP_REVIT_BRIDGE_URL = "http://localhost:3000"-```--Or edit [examples/revit-mcp-config.json](../examples/revit-mcp-config.json):--```json-{- "mode": "bridge",- "bridge_url": "http://localhost:3000",- "workspace_dir": "C:\\revit-workspace",- "allowed_directories": ["C:\\revit-workspace"]-}-```--### 7. Run Bridge Server--```bash-python -m revit_mcp_server-```--### 8. Run Demo Client--```bash-python packages/client-demo/demo.py-```--Expected output:-- Health check: `{"status": "healthy", "mode": "bridge", "revit_version": "2024"}`-- Real Revit operations execute via the bridge--## Configuration Reference--### Environment Variables--| Variable | Required | Default | Description |-|----------|----------|---------|-------------|-| `MCP_REVIT_MODE` | Yes | - | `mock` or `bridge` |-| `WORKSPACE_DIR` | Yes | - | Root directory for file operations |-| `MCP_REVIT_ALLOWED_DIRECTORIES` | Yes | - | Semicolon-separated list of allowed paths |-| `MCP_REVIT_BRIDGE_URL` | Bridge only | `http://localhost:3000` | Bridge HTTP endpoint |-| `MCP_REVIT_AUDIT_LOG` | No | `workspace/audit.jsonl` | Audit log file path |-| `REVIT_SDK` | Build only | - | Path to Revit SDK for building add-in |--### Configuration File--Alternative to environment variables: use a JSON config file.--```json-{- "mode": "mock",- "workspace_dir": "/path/to/workspace",- "allowed_directories": ["/path/to/workspace", "/path/to/data"],- "bridge_url": "http://localhost:3000",- "audit_log": "workspace/audit.jsonl"-}-```--Load with:--```bash-python -m revit_mcp_server --config examples/revit-mcp-config.json-```--## Troubleshooting--### Issue: Workspace Violation Error--**Error**: `WorkspaceViolation: Path outside allowed directories`--**Fix**:-1. Verify `WORKSPACE_DIR` and `MCP_REVIT_ALLOWED_DIRECTORIES` are set-2. Ensure paths use absolute paths (not relative)-3. On Windows, use double backslashes or forward slashes: `C:\\workspace` or `C:/workspace`-4. Check directory exists and has read/write permissions--### Issue: Schema Validation Failed--**Error**: `SchemaValidationError: Field 'document_path' is required`--**Fix**:-1. Check tool input matches schema in [docs/tools.md](tools.md)-2. Review error message for missing/invalid fields-3. Run tests to see valid examples: `pytest packages/mcp-server-revit/tests/test_tools.py -v`--### Issue: Bridge Connection Refused--**Error**: `BridgeError: Connection refused to http://localhost:3000`--**Fix**:-1. Verify Revit is running with the add-in loaded-2. Check add-in manifest is installed: `%ProgramData%\Autodesk\Revit\Addins\2024\RevitBridge.addin`-3. Verify DLL path in manifest points to the built DLL-4. Check Windows Firewall isn't blocking localhost:3000-5. Review Revit Journal file for add-in load errors--### Issue: Add-in Build Failed--**Error**: `MSBuild error: RevitAPI reference not found`--**Fix**:-1. Set `REVIT_SDK` environment variable to correct SDK path-2. Verify Revit SDK is installed (comes with Revit or download separately)-3. Check [RevitBridge.csproj](../packages/revit-bridge-addin/RevitBridge.csproj) references match your Revit version-4. Ensure Visual Studio or MSBuild tools are installed--### Issue: Mock Mode Files Not Created--**Error**: Export tools don't create output files in mock mode--**Fix**:-1. Verify `WORKSPACE_DIR` exists and is writable-2. Check `MCP_REVIT_MODE=mock` is set-3. Review audit log for errors: `cat workspace/audit.jsonl`-4. Ensure no file permission issues in workspace directory--## Next Steps--- Review [tool catalog](tools.md) for available operations-- Understand [architecture](architecture.md) and trust boundaries-- Read [security model](security.md) for production deployments-- Explore [examples](../examples/) for workflow configurationsdiff --git a/docs/logging-and-audit.md b/docs/logging-and-audit.mddeleted file mode 100644index 4e939cf..0000000--- a/docs/logging-and-audit.md+++ /dev/null@@ -1,64 +0,0 @@-# Logging And Audit--This repository records operational information in two different layers:--- Python-side audit logging-- C# bridge-side runtime logging--## Python Audit Recorder--The audit implementation lives in [packages/mcp-server-revit/src/revit_mcp_server/security/audit.py](../packages/mcp-server-revit/src/revit_mcp_server/security/audit.py).--`AuditRecorder.record()` writes one JSON line per tool invocation with:--- UTC timestamp-- tool name-- request ID-- payload-- response--This is the structured trail for MCP-level actions.--## Bridge Runtime Logs--The Revit add-in initializes Serilog in [App.cs](../packages/revit-bridge-addin/src/Bridge/App.cs).--Current behavior:--- log file path is created under `%APPDATA%\RevitMCP\Logs\bridge.jsonl`-- logs roll daily-- bridge startup, shutdown, request receipt, and execution errors are recorded--This is the operational trail for the .NET side of the system.--## Why Two Layers Exist--The Python process and the Revit add-in do not share a runtime or process boundary.--Because of that:--- Python audit logs tell you what the MCP layer believed it asked for-- bridge logs tell you what the Revit-hosted runtime actually received and executed--When debugging production issues, both logs matter.--## What To Expect In Incidents--If the MCP server validates and sends a request successfully, but Revit fails to execute it:--- Python audit may still look normal-- bridge log will often hold the actionable failure--If a path is rejected or payload shape is wrong before the bridge is contacted:--- Python audit and validation behavior will matter more than the bridge log--## Operational Rule--Never treat one log as the whole story. For live bridge failures, correlate:--1. Python audit entry-2. bridge runtime log entry-3. any client-visible error response--That three-point check is the fastest way to separate schema problems, transport problems, and live Revit execution problems.diff --git a/docs/marketplaces.md b/docs/marketplaces.mddeleted file mode 100644index 4518b44..0000000--- a/docs/marketplaces.md+++ /dev/null@@ -1,114 +0,0 @@-# MCP Marketplaces and Client Distribution--This project is prepared for the major MCP discovery paths that can be handled from a public GitHub repository.--Some marketplaces can index the repository automatically once the official MCP Registry entry exists. Others still require a maintainer-owned account, OAuth approval, or a manual web form. Those final publication clicks cannot be completed from the repository alone.--## Primary Listing--### Official MCP Registry--Status: configured.--Files and automation:--- [server.json](../server.json) is valid for the official registry and points to the v0.1.1 MCPB release artifact.-- [.github/workflows/publish-mcp.yml](../.github/workflows/publish-mcp.yml) publishes with GitHub OIDC on version tags or manual workflow dispatch.-- [.github/workflows/publish-pypi.yml](../.github/workflows/publish-pypi.yml) publishes the optional Python package to PyPI when triggered manually after PyPI trusted publishing is configured.-- [packages/mcp-server-revit/README.md](../packages/mcp-server-revit/README.md) contains the required `mcp-name` ownership marker for PyPI verification if the package is also published to PyPI.--Manual publish from a maintainer machine after installing the official publisher:--```powershell-mcp-publisher login github-mcp-publisher publish-```--Automated publish from GitHub:--```powershell-git tag v0.1.1-git push origin v0.1.1-```--The official registry is the feed most downstream MCP galleries and aggregators are expected to scrape.--### GitHub MCP Registry and VS Code MCP Gallery--Status: covered by the official MCP Registry path.--GitHub and VS Code surface MCP servers from registry metadata. After the official registry publish succeeds, this server should be discoverable through the MCP surfaces that consume that registry. No separate VS Code extension is required for a standard stdio MCP server.--The repository also includes [.vscode/mcp.json](../.vscode/mcp.json) so users can install the server into a VS Code workspace directly.--## Client Configurations--### VS Code / GitHub Copilot--The workspace config is already committed at `.vscode/mcp.json`.--For user-level install:--```powershell-code --add-mcp "{`"name`":`"revit`",`"type`":`"stdio`",`"command`":`"python`",`"args`":[`"-m`",`"revit_mcp_server.mcp_server`"],`"env`":{`"MCP_REVIT_MODE`":`"bridge`",`"MCP_REVIT_BRIDGE_URL`":`"http://127.0.0.1:3000`",`"MCP_REVIT_WORKSPACE_DIR`":`"C:\\RevitProjects`",`"MCP_REVIT_ALLOWED_DIRECTORIES`":`"C:\\RevitProjects`"}}"-```--### Claude Desktop, Cursor, Windsurf, Cline, Roo Code, Continue, and Similar Clients--Most desktop MCP clients accept this shape:--```json-{- "mcpServers": {- "revit": {- "command": "python",- "args": ["-m", "revit_mcp_server.mcp_server"],- "env": {- "MCP_REVIT_MODE": "bridge",- "MCP_REVIT_BRIDGE_URL": "http://127.0.0.1:3000",- "MCP_REVIT_WORKSPACE_DIR": "C:\\RevitProjects",- "MCP_REVIT_ALLOWED_DIRECTORIES": "C:\\RevitProjects"- }- }- }-}-```--If the Python package was installed from PyPI, the console script can be used instead:--```json-{- "mcpServers": {- "revit": {- "command": "revit-mcp-server",- "env": {- "MCP_REVIT_MODE": "bridge",- "MCP_REVIT_BRIDGE_URL": "http://127.0.0.1:3000",- "MCP_REVIT_WORKSPACE_DIR": "C:\\RevitProjects",- "MCP_REVIT_ALLOWED_DIRECTORIES": "C:\\RevitProjects"- }- }- }-}-```--## Third-Party Directories--These directories usually need either an official registry entry, repository URL submission, or maintainer account verification.--| Directory | Current best path |-| --- | --- |-| PulseMCP | Already mirrors this repo. After official registry publish, claim or ask them to replace the temporary mirror with the official registry entry. |-| MCP.Directory | Submit the GitHub repository URL and optional PyPI package URL through their server submission form. |-| Glama | Let Glama index the official registry entry, then claim/verify the maintainer page if needed. |-| Smithery | This Revit server is local stdio and Windows/Revit-dependent, so use MCPB/local distribution or a manual listing rather than hosted HTTP unless a remote bridge is added. |-| MCP.so / MCP Market / MCP Store / Conare / Aibase | Submit the GitHub repository URL and use the client config above. These sites generally crawl README, GitHub metadata, and registry data. |--## Release Checklist--1. Build and attach the `.mcpb` artifact to the GitHub release.-2. Update `server.json` version, artifact URL, and SHA-256 if the artifact changes.-3. Run `mcp-publisher validate`.-4. Publish to the official MCP Registry.-5. Verify discovery through the registry API.-6. Submit or claim listings on third-party directories.diff --git a/docs/revit-addin-lifecycle.md b/docs/revit-addin-lifecycle.mddeleted file mode 100644index e930155..0000000--- a/docs/revit-addin-lifecycle.md+++ /dev/null@@ -1,75 +0,0 @@-# Revit Add-in Lifecycle--The Revit-side runtime starts in [packages/revit-bridge-addin/src/Bridge/App.cs](../packages/revit-bridge-addin/src/Bridge/App.cs).--## Startup Path--`App` implements `IExternalApplication`, so Revit calls:--- `OnStartup()`-- `OnShutdown()`--During `OnStartup()` the add-in:--1. initializes Serilog file logging-2. captures the running Revit version-3. creates a shared `CommandQueue`-4. creates `RevitCommandExecutor` and wraps it in `ExternalEvent`-5. constructs and starts `BridgeServer`-6. builds the ribbon UI-7. hooks `DocumentChanged` to keep `ActiveDocumentName` updated--This is the full bootstrap chain that makes the localhost bridge usable.--## Queue And UI Thread Handoff--The important separation is:--- `BridgeServer` receives HTTP requests off the Revit UI thread-- `CommandQueue` stores pending requests and completion handles-- `ExternalEvent.Raise()` transfers execution to `RevitCommandExecutor`-- `RevitCommandExecutor.Execute()` drains the queue on the Revit API thread--That pattern is what makes live Revit automation safe inside Autodesk's threading model.--## Ribbon Surface--`CreateModernRibbonInterface()` creates:--- a `RevitMCP` tab-- a `Connection` panel-- a `Tools` panel--It wires button commands for:--- connect-- disconnect-- status-- settings-- help--The ribbon is more than cosmetic: it exposes operational status and provides a manual control surface for the bridge lifecycle.--## Runtime State--`App` keeps a few static values available to the rest of the add-in:--- `RevitVersion`-- `ActiveDocumentName`-- `Server`--Those values are used indirectly by the health endpoint and operator diagnostics.--## Shutdown Path--`OnShutdown()`:--- stops the bridge server-- disposes the `ExternalEvent`-- flushes logs--If shutdown errors occur, they are logged and returned as `Result.Failed`.--## Operational Rule--If the bridge looks healthy from the Python side but tools still do nothing, inspect the add-in lifecycle first. Most hard failures in this repo start before tool routing, during startup, ribbon initialization, or `ExternalEvent` creation.diff --git a/docs/security.md b/docs/security.mddeleted file mode 100644index e263909..0000000--- a/docs/security.md+++ /dev/null@@ -1,273 +0,0 @@-# Security Model--MCP Revit Bridge implements defense-in-depth security with workspace sandboxing, schema validation, audit logging, and safe defaults.--## Trust Boundaries--```-┌─────────────────────────────────────────────────────────────┐-│ External Client (untrusted) │-└─────────────────────┬───────────────────────────────────────┘- │ MCP Protocol (stdio)- │ JSON messages-┌─────────────────────▼───────────────────────────────────────┐-│ MCP Server (Python) │-│ - Schema validation (Pydantic) │-│ - Workspace enforcement │-│ - Audit logging │-│ - Tool routing │-└─────────────────────┬───────────────────────────────────────┘- │ HTTP POST (localhost only)- │ {"tool": "...", "payload": {...}}-┌─────────────────────▼───────────────────────────────────────┐-│ Bridge Add-in (.NET) │-│ - HTTP listener (127.0.0.1:3000) │-│ - ExternalEvent queue │-│ - Revit API operations │-└─────────────────────┬───────────────────────────────────────┘- │ Revit API-┌─────────────────────▼───────────────────────────────────────┐-│ Revit Process │-│ - Document operations │-│ - File I/O │-│ - Export operations │-└─────────────────────────────────────────────────────────────┘-```--## Workspace Sandboxing--All file operations are restricted to allowed directories configured at server startup.--### Configuration--```python-# Environment variables-WORKSPACE_DIR = "C:\\revit-workspace"-MCP_REVIT_ALLOWED_DIRECTORIES = "C:\\revit-workspace;C:\\exports;C:\\templates"-```--### Enforcement--The `WorkspaceMonitor` class validates every file path:--```python-from revit_mcp_server.security import WorkspaceMonitor--monitor = WorkspaceMonitor(allowed_dirs=[Path("C:\\workspace")])-safe_path = monitor.validate_path("C:\\workspace\\output.csv") # OK-unsafe_path = monitor.validate_path("C:\\system32\\file.txt") # Raises WorkspaceViolation-```--### Path Resolution Rules--1. All paths are resolved to absolute paths-2. Symbolic links are resolved to their targets-3. Path traversal attempts (`..`, `.`) are blocked-4. Paths must be children of allowed directories (using `Path.is_relative_to()`)--### Bypass Prevention--- Paths are validated before any I/O operation-- Mock mode also enforces workspace constraints-- Validation occurs in both Python server and (planned) C# bridge--## Schema Validation--All tool inputs are validated against Pydantic models before execution.--### Input Validation--```python-from revit_mcp_server.schemas import ExportSchedulesInput--# Valid input-valid = ExportSchedulesInput(- document_path="C:\\workspace\\model.rvt",- schedule_names=["Door Schedule", "Window Schedule"],- output_dir="C:\\workspace\\exports"-)--# Invalid input - raises ValidationError-invalid = ExportSchedulesInput(- document_path=123, # Wrong type- schedule_names="not a list", # Wrong type- output_dir=None # Missing required field-)-```--### Schema Coverage--All 25 tools have defined schemas in [schemas.py](../packages/mcp-server-revit/src/revit_mcp_server/schemas.py):--- Input schemas: Define required/optional fields, types, constraints-- Output schemas: Structure response data consistently-- Validation errors: Return clear messages to client--## Audit Logging--Every tool invocation is logged with structured data.--### Log Format--```json-{- "timestamp": "2025-01-07T10:30:45.123Z",- "request_id": "req_abc123",- "tool": "revit.export_schedules",- "payload": {- "document_path": "C:\\workspace\\model.rvt",- "schedule_names": ["Door Schedule"],- "output_dir": "C:\\workspace\\exports"- },- "response": {- "success": true,- "exports": ["C:\\workspace\\exports\\Door_Schedule.csv"]- },- "duration_ms": 1250,- "mode": "bridge"-}-```--### Log Location--Default: `{WORKSPACE_DIR}/audit.jsonl`--Configure with:-```bash-export MCP_REVIT_AUDIT_LOG="/var/log/revit-mcp/audit.jsonl"-```--### Log Security--- Append-only (no modification of past entries)-- Includes all tool invocations (successful and failed)-- Records file paths for output artifacts-- Tamper-evident via chronological timestamps--### Use Cases--- Compliance auditing-- Debugging failed operations-- Usage analytics-- Security incident investigation--## Safe Defaults--The server ships with secure defaults that must be explicitly relaxed.--### Default Configuration--- Mode: Not set (must be explicitly configured as `mock` or `bridge`)-- Workspace: Not set (must be configured before first use)-- Allowed directories: Empty (must be explicitly listed)-- Bridge URL: `http://localhost:3000` (localhost only, not exposed externally)-- Audit logging: Enabled (cannot be disabled)--### Network Security--The bridge HTTP listener:-- Binds only to `127.0.0.1` (localhost)-- Does not implement authentication (relies on localhost boundary)-- Does not use HTTPS (localhost traffic is trusted)-- Should never be exposed to external networks--**Do not**:-- Port forward bridge endpoint-- Bind bridge to `0.0.0.0`-- Proxy bridge through a reverse proxy accessible externally--### Destructive Operations Policy--Operations that modify models or delete data are disabled by default in mock mode and logged extensively in bridge mode.--Destructive operations:-- Model modification (element creation/deletion)-- Document saves-- File deletions-- Batch operations on multiple documents--Enable cautiously in production:-```json-{- "allow_destructive": true,- "destructive_confirm": true-}-```--## Tool Allow-List--While all 25 tools are exposed by default, you can restrict available tools for specific deployments.--### Configuration--```json-{- "allowed_tools": [- "revit.health",- "revit.export_schedules",- "revit.export_quantities"- ]-}-```--Tools not in the allow-list return an error when invoked.--### Use Cases--- Limit CI/CD pipelines to read-only export operations-- Restrict automated workflows to specific QA tools-- Create role-specific tool subsets--## Mock Mode Security--Mock mode provides the same security guarantees as bridge mode without requiring Revit.--### Mock Mode Features--- Workspace sandboxing: Enforced identically to bridge mode-- Schema validation: Same Pydantic models-- Audit logging: Full request/response logging-- Deterministic outputs: Predictable mock data for testing--### CI/CD Safety--Mock mode is safe for CI environments:-- No external network access-- No Revit dependency-- No system modifications outside workspace-- Repeatable outputs for regression testing--## Security Checklist--Before deploying to production:--- [ ] Configure `WORKSPACE_DIR` to a dedicated directory-- [ ] Set `MCP_REVIT_ALLOWED_DIRECTORIES` to minimum required paths-- [ ] Verify bridge binds to `127.0.0.1` only (default)-- [ ] Review audit log location and retention policy-- [ ] Test workspace violations raise errors (not silently fail)-- [ ] Verify schema validation blocks malformed inputs-- [ ] Confirm destructive operations are appropriately restricted-- [ ] Run in mock mode first to validate configuration-- [ ] Document incident response procedures-- [ ] Set up log monitoring/alerting--## Threat Model--### In Scope--- Malicious MCP client attempting path traversal-- Untrusted input attempting to corrupt Revit models-- Unauthorized file access outside workspace-- Tool invocation without audit trail--### Out of Scope--- Physical access to machine running bridge-- Compromised Revit process-- Operating system vulnerabilities-- Revit API bugs or security issues (vendor responsibility)--## Reporting Security Issues--See [SECURITY.md](../SECURITY.md) for vulnerability reporting procedures.diff --git a/docs/target-frameworks-and-dependencies.md b/docs/target-frameworks-and-dependencies.mddeleted file mode 100644index d9d188a..0000000--- a/docs/target-frameworks-and-dependencies.md+++ /dev/null@@ -1,68 +0,0 @@-# Target Frameworks And Dependencies--This repository is intentionally polyglot. The Python MCP server and the Revit add-in do not share the same runtime constraints.--## Python Package--The Python package metadata lives in [packages/mcp-server-revit/pyproject.toml](../packages/mcp-server-revit/pyproject.toml).--Current characteristics:--- package name: `revit-mcp-server`-- Python requirement: `>=3.11`-- validation and settings stack: `pydantic`, `pydantic-settings`-- transport stack: `httpx`-- environment loading: `python-dotenv`-- development and test dependencies are defined inline rather than split into a separate requirements file--## Revit Add-in Targets--The add-in project file is [packages/revit-bridge-addin/RevitBridge.csproj](../packages/revit-bridge-addin/RevitBridge.csproj).--It conditionally targets:--- `net48` for Revit 2024-- `net8.0-windows` for Revit 2025 and 2026--That dual-target behavior is one of the most important build facts in the repo.--## Revit API Reference Strategy--The add-in first tries to bind against locally installed Revit assemblies:--- `RevitAPI.dll`-- `RevitAPIUI.dll`--If those are not present, it falls back to NuGet packages:--- `Nice3point.Revit.Api.RevitAPI`-- `Nice3point.Revit.Api.RevitAPIUI`--This makes CI and local developer environments more forgiving, while still supporting direct machine installs with real Autodesk binaries.--## Additional Add-in Dependencies--The C# layer also references:--- `Serilog`-- `Serilog.Sinks.File`-- `System.Text.Json`-- `IronPython` 2.7 on `net48`-- `IronPython` 3.4.1 on `net8.0-windows`--The conditional IronPython dependency exists because the repo exposes an `execute_python` bridge command.--## Temporary Compile Exclusions--`RevitBridge.csproj` currently removes several command directories from compilation:--- `src\Commands\Core\**\*.cs`-- `src\Commands\Advanced\**\*.cs`-- `src\Commands\Specialized\**\*.cs`-- `src\Commands\Enhancements\**\*.cs`--That means the source tree advertises a broader command surface than the compiled binary necessarily includes at the moment.--## Operational Rule--When a build succeeds locally but not in CI, check target framework and dependency resolution before debugging the business logic. In this repo, version-conditional framework selection is part of normal operation, not an edge case.diff --git a/docs/testing-workflow.md b/docs/testing-workflow.mddeleted file mode 100644index 6d6d527..0000000--- a/docs/testing-workflow.md+++ /dev/null@@ -1,72 +0,0 @@-# Testing Workflow--Automated tests in this repository are concentrated on the Python MCP package under [packages/mcp-server-revit/tests](../packages/mcp-server-revit/tests/).--## Current Test Surface--The existing test files include:--- `test_config.py`-- `test_server.py`-- `test_tools.py`-- `conftest.py`--## What Is Covered--From the current test layout and code, the automated suite primarily covers:--- configuration loading-- environment variable handling-- server-level tool dispatch-- mock-mode execution behavior-- tool registration and handler behavior--This is a useful baseline because it validates the MCP-facing Python layer without requiring a live Revit session.--## What Is Not Covered At The Same Depth--The C# bridge side does not have an equally visible automated test surface in this repo.--That means several important behaviors are still validated mostly through build or manual testing:--- `HttpListener` startup in Revit-- `ExternalEvent` execution on the UI thread-- live Revit API mutation behavior-- ribbon and icon loading-- add-in startup and shutdown inside Revit--## Practical Testing Strategy--In practice the repo supports two different validation loops:--### Fast Loop--Use Python tests in mock mode to validate:--- schemas-- config behavior-- handler routing-- bridge-client abstraction behavior--### Slow Loop--Use manual Revit runs to validate:--- add-in load behavior-- localhost bridge reachability-- real document operations-- export tools against actual Revit models--## Why Mock Mode Matters--Because `mock` is the default mode, CI and developer machines can still validate the MCP server without:--- Windows-only Revit installs-- Autodesk licensing concerns-- UI-thread execution constraints--That is the main reason the Python-side tests are valuable even though they do not exercise the full live stack.--## Working Rule--Treat Python tests as contract and routing validation, not full production proof. Any PR that changes bridge routing, Revit API behavior, or build targets still needs at least one live Revit validation pass before it should be trusted operationally.diff --git a/docs/tool-registry-phases.md b/docs/tool-registry-phases.mddeleted file mode 100644index 61571ad..0000000--- a/docs/tool-registry-phases.md+++ /dev/null@@ -1,75 +0,0 @@-# Tool Registry Phases--The main routing surface for live Revit commands is [BridgeCommandFactory.cs](../packages/revit-bridge-addin/src/Bridge/BridgeCommandFactory.cs).--## Why This File Matters--`BridgeCommandFactory` does two jobs:--- routes inbound `tool` names to execution methods-- publishes the bridge-side tool catalog through `GetToolCatalog()`--That makes it the practical source of truth for what the add-in can actually expose at runtime.--## Batch-Based Growth--The file is organized in functional batches rather than a single flat tool list.--Observed batch themes include:--- original health and document tools-- document management-- geometry creation-- component placement-- view creation-- parameters and properties-- sheets and documentation-- advanced exports-- selection and annotation-- structure and MEP-- editing and worksharing-- groups, links, phases, and design options-- universal reflection access-- LLM-oriented power tools such as `execute_python`--This structure is helpful because it shows how the tool surface expanded over time.--## Catalog Drift Risk--The file also contains several important signals that operators should not ignore:--- some tools are commented out in the execution switch-- some tools still appear in `GetToolCatalog()`-- the `.csproj` currently removes broad command directories from compilation--That means three different states can exist at once:--1. source file exists-2. tool name appears in catalog-3. compiled add-in actually executes the implementation--Those states are not guaranteed to match.--## Practical Consequence--If a client sees a tool in documentation or even in `/tools`, that does not automatically guarantee the compiled binary can execute the full command path without compatibility issues.--Examples of temporary compatibility comments already appear in the registry around:--- cable tray-- MEP systems-- render settings-- revision cloud-- text type-- room boundary-- project location--## Working Rule--When adding or enabling a tool, update all three layers together:--- execution switch-- advertised catalog-- build or compilation status--If only one layer changes, this repo becomes harder to reason about and clients will overestimate what the bridge can do.diff --git a/packages/mcp-server-revit/pyproject.toml b/packages/mcp-server-revit/pyproject.tomlindex 04ccefe..f5173dc 100644--- a/packages/mcp-server-revit/pyproject.toml+++ b/packages/mcp-server-revit/pyproject.toml@@ -1,6 +1,6 @@[project]name = "revit-mcp-server"-version = "0.1.1"+version = "1.0.0"description = "Model Context Protocol server for Autodesk Revit via a local bridge"readme = "README.md"requires-python = ">=3.11"diff --git a/packages/revit-bridge-addin/src/Bridge/AdditionalCommands.cs b/packages/revit-bridge-addin/src/Bridge/AdditionalCommands.csindex cf4fce8..9d348b6 100644--- a/packages/revit-bridge-addin/src/Bridge/AdditionalCommands.cs+++ b/packages/revit-bridge-addin/src/Bridge/AdditionalCommands.cs@@ -92,7 +92,7 @@ namespace RevitBridge.Bridgedialog.AddSeparator();dialog.AddInfoSection("Documentation",- "GitHub: github.com/your-repo/revit-mcp-server\n" ++ "GitHub: github.com/Sam-AEC/Autodesk-Revit-MCP-Server\n" +"Docs: See README.md for full documentation");dialog.AddInfoSection("Support",@@ -105,7 +105,7 @@ namespace RevitBridge.Bridge{Process.Start(new ProcessStartInfo{- FileName = "https://github.com/anthropics/claude-desktop",+ FileName = "https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server",UseShellExecute = true});}diff --git a/packages/revit-bridge-addin/src/Bridge/App.cs b/packages/revit-bridge-addin/src/Bridge/App.csindex 7738eb9..b355fd5 100644--- a/packages/revit-bridge-addin/src/Bridge/App.cs+++ b/packages/revit-bridge-addin/src/Bridge/App.cs@@ -81,6 +81,16 @@ namespace RevitBridge.Bridgestring settingsIconPath = Path.Combine(iconPath, "settings.png");string helpIconPath = Path.Combine(iconPath, "help.png");+ // Dynamically generate theme-adaptive icons on startup to guarantee they are never missing and adapt to Revit's Dark/Light theme!+ try+ {+ IconGenerator.GenerateAllIcons(iconPath);+ }+ catch (Exception ex)+ {+ Log.Error(ex, "Failed to dynamically generate ribbon icons");+ }+// Log if icons are missingif (!File.Exists(connectIconPath))Log.Warning("Icon not found: {IconPath}", connectIconPath);diff --git a/packages/revit-bridge-addin/src/UI/IconGenerator.cs b/packages/revit-bridge-addin/src/UI/IconGenerator.csindex eb92263..d5ba282 100644--- a/packages/revit-bridge-addin/src/UI/IconGenerator.cs+++ b/packages/revit-bridge-addin/src/UI/IconGenerator.cs@@ -7,202 +7,260 @@ using System.Windows.Media.Imaging;namespace RevitBridge.UI{/// <summary>- /// Generates icon images for Revit ribbon buttons+ /// Generates high-end, vector-drawn icon images for Revit ribbon buttons/// </summary>public static class IconGenerator{+ private static bool IsDarkTheme()+ {+ try+ {+ // UIThemeManager is in Autodesk.Revit.UI (Revit 2024+)+ return Autodesk.Revit.UI.UIThemeManager.CurrentTheme == Autodesk.Revit.UI.UITheme.Dark;+ }+ catch+ {+ // Fallback for older Revit versions+ return false;+ }+ }+/// <summary>- /// Creates a Connect icon (green play button with network)+ /// Creates a Connect icon (network node bridge with emerald accent)/// </summary>public static BitmapSource CreateConnectIcon(int size = 32){var visual = new DrawingVisual();using (var context = visual.RenderOpen()){- // Background circle- var greenBrush = new SolidColorBrush(Color.FromRgb(76, 175, 80)); // Material Green- context.DrawEllipse(greenBrush, null, new Point(size / 2.0, size / 2.0), size / 2.0, size / 2.0);-- // Play/Connect symbol (white)- var whiteBrush = Brushes.White;+ bool isDark = IsDarkTheme();+ var primaryBrush = isDark ? Brushes.White : new SolidColorBrush(Color.FromRgb(30, 41, 59));+ var accentBrush = new SolidColorBrush(Color.FromRgb(46, 125, 50)); // Emerald Green+ var softFillBrush = new SolidColorBrush(Color.FromArgb(40, 46, 125, 50)); // Semi-transparent green+ var pen = new Pen(primaryBrush, size * 0.06) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round, LineJoin = PenLineJoin.Round };+ var accentPen = new Pen(accentBrush, size * 0.06) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round, LineJoin = PenLineJoin.Round };++ // Left node+ context.DrawEllipse(softFillBrush, pen, new Point(size * 0.25, size * 0.65), size * 0.12, size * 0.12);+ // Right node+ context.DrawEllipse(softFillBrush, pen, new Point(size * 0.75, size * 0.65), size * 0.12, size * 0.12);++ // Connecting bridge lines+ context.DrawLine(pen, new Point(size * 0.37, size * 0.65), new Point(size * 0.63, size * 0.65));++ // Server/AI node (Top center)var geometry = new PathGeometry();- var figure = new PathFigure { StartPoint = new Point(size * 0.35, size * 0.25) };- figure.Segments.Add(new LineSegment(new Point(size * 0.35, size * 0.75), true));- figure.Segments.Add(new LineSegment(new Point(size * 0.75, size * 0.5), true));- figure.IsClosed = true;+ var figure = new PathFigure { StartPoint = new Point(size * 0.5, size * 0.18), IsClosed = true };+ figure.Segments.Add(new LineSegment(new Point(size * 0.65, size * 0.45), true));+ figure.Segments.Add(new LineSegment(new Point(size * 0.35, size * 0.45), true));geometry.Figures.Add(figure);- context.DrawGeometry(whiteBrush, null, geometry);+ context.DrawGeometry(softFillBrush, accentPen, geometry);- // Small network dots- double dotSize = size * 0.08;- context.DrawEllipse(whiteBrush, null, new Point(size * 0.15, size * 0.15), dotSize, dotSize);- context.DrawEllipse(whiteBrush, null, new Point(size * 0.85, size * 0.15), dotSize, dotSize);- context.DrawEllipse(whiteBrush, null, new Point(size * 0.85, size * 0.85), dotSize, dotSize);+ // Connector lines from bottom nodes to top server node+ context.DrawLine(pen, new Point(size * 0.25, size * 0.53), new Point(size * 0.42, size * 0.4));+ context.DrawLine(pen, new Point(size * 0.75, size * 0.53), new Point(size * 0.58, size * 0.4));}return RenderVisual(visual, size, size);}/// <summary>- /// Creates a Disconnect icon (red stop button)+ /// Creates a Disconnect icon (network node bridge with broken links and crimson cancel slash)/// </summary>public static BitmapSource CreateDisconnectIcon(int size = 32){var visual = new DrawingVisual();using (var context = visual.RenderOpen()){- // Background circle- var redBrush = new SolidColorBrush(Color.FromRgb(244, 67, 54)); // Material Red- context.DrawEllipse(redBrush, null, new Point(size / 2.0, size / 2.0), size / 2.0, size / 2.0);-- // Stop square (white)- var whiteBrush = Brushes.White;- var rect = new Rect(size * 0.3, size * 0.3, size * 0.4, size * 0.4);- context.DrawRectangle(whiteBrush, null, rect);+ bool isDark = IsDarkTheme();+ var primaryBrush = isDark ? Brushes.White : new SolidColorBrush(Color.FromRgb(30, 41, 59));+ var accentBrush = new SolidColorBrush(Color.FromRgb(211, 47, 47)); // Crimson Red+ var pen = new Pen(primaryBrush, size * 0.06) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round, LineJoin = PenLineJoin.Round };++ // Left node+ context.DrawEllipse(null, pen, new Point(size * 0.25, size * 0.65), size * 0.12, size * 0.12);+ // Right node+ context.DrawEllipse(null, pen, new Point(size * 0.75, size * 0.65), size * 0.12, size * 0.12);++ // Top server node+ var geometry = new PathGeometry();+ var figure = new PathFigure { StartPoint = new Point(size * 0.5, size * 0.18), IsClosed = true };+ figure.Segments.Add(new LineSegment(new Point(size * 0.65, size * 0.45), true));+ figure.Segments.Add(new LineSegment(new Point(size * 0.35, size * 0.45), true));+ geometry.Figures.Add(figure);+ context.DrawGeometry(null, pen, geometry);++ // Broken connections+ context.DrawLine(pen, new Point(size * 0.25, size * 0.53), new Point(size * 0.35, size * 0.46));+ context.DrawLine(pen, new Point(size * 0.75, size * 0.53), new Point(size * 0.65, size * 0.46));++ // Crimson cancel slash+ var slashPen = new Pen(accentBrush, size * 0.08) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };+ context.DrawLine(slashPen, new Point(size * 0.4, size * 0.35), new Point(size * 0.6, size * 0.55));+ context.DrawLine(slashPen, new Point(size * 0.6, size * 0.35), new Point(size * 0.4, size * 0.55));}return RenderVisual(visual, size, size);}/// <summary>- /// Creates a Status icon (blue info with chart)+ /// Creates a Status icon (sleek dashboard grid with active blue communication indicator)/// </summary>public static BitmapSource CreateStatusIcon(int size = 32){var visual = new DrawingVisual();using (var context = visual.RenderOpen()){- // Background circle- var blueBrush = new SolidColorBrush(Color.FromRgb(33, 150, 243)); // Material Blue- context.DrawEllipse(blueBrush, null, new Point(size / 2.0, size / 2.0), size / 2.0, size / 2.0);-- // Info symbol (white) - combination of 'i' and chart bars- var whiteBrush = Brushes.White;- var whitePen = new Pen(whiteBrush, size * 0.06);-- // Chart bars- double barWidth = size * 0.12;- double spacing = size * 0.08;- double startX = size * 0.25;- double baseY = size * 0.7;-- // Three bars of different heights- context.DrawRectangle(whiteBrush, null, new Rect(startX, baseY - size * 0.15, barWidth, size * 0.15));- context.DrawRectangle(whiteBrush, null, new Rect(startX + barWidth + spacing, baseY - size * 0.25, barWidth, size * 0.25));- context.DrawRectangle(whiteBrush, null, new Rect(startX + (barWidth + spacing) * 2, baseY - size * 0.35, barWidth, size * 0.35));+ bool isDark = IsDarkTheme();+ var primaryBrush = isDark ? Brushes.White : new SolidColorBrush(Color.FromRgb(30, 41, 59));+ var accentBrush = new SolidColorBrush(Color.FromRgb(2, 136, 209)); // Autodesk Blue+ var softFillBrush = new SolidColorBrush(Color.FromArgb(40, 2, 136, 209)); // Semi-transparent blue+ var pen = new Pen(primaryBrush, size * 0.06) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round, LineJoin = PenLineJoin.Round };+ var accentPen = new Pen(accentBrush, size * 0.06) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };++ // Outer dashboard window+ context.DrawRoundedRectangle(null, pen, new Rect(size * 0.15, size * 0.15, size * 0.7, size * 0.7), size * 0.08, size * 0.08);++ // Grid lines inside status card+ context.DrawLine(pen, new Point(size * 0.25, size * 0.35), new Point(size * 0.5, size * 0.35));+ context.DrawLine(pen, new Point(size * 0.25, size * 0.55), new Point(size * 0.45, size * 0.55));++ // Glowing blue pulse/indicator dot+ context.DrawEllipse(softFillBrush, accentPen, new Point(size * 0.68, size * 0.65), size * 0.12, size * 0.12);+ context.DrawEllipse(accentBrush, null, new Point(size * 0.68, size * 0.65), size * 0.05, size * 0.05);}return RenderVisual(visual, size, size);}/// <summary>- /// Creates a Settings icon (gear)+ /// Creates a Settings icon (geometrical gear wheel)/// </summary>public static BitmapSource CreateSettingsIcon(int size = 32){var visual = new DrawingVisual();using (var context = visual.RenderOpen()){- // Background circle- var grayBrush = new SolidColorBrush(Color.FromRgb(96, 125, 139)); // Material Blue Gray- context.DrawEllipse(grayBrush, null, new Point(size / 2.0, size / 2.0), size / 2.0, size / 2.0);-- // Gear shape (simplified)- var whiteBrush = Brushes.White;- double centerX = size / 2.0;- double centerY = size / 2.0;- double outerRadius = size * 0.35;- double innerRadius = size * 0.15;- int teeth = 8;+ bool isDark = IsDarkTheme();+ var primaryBrush = isDark ? Brushes.White : new SolidColorBrush(Color.FromRgb(30, 41, 59));+ var pen = new Pen(primaryBrush, size * 0.06) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round, LineJoin = PenLineJoin.Round };- var geometry = new PathGeometry();- var figure = new PathFigure();+ double cX = size / 2.0;+ double cY = size / 2.0;+ double rOuter = size * 0.25;+ double rInner = size * 0.12;+ // Center shaft circle+ context.DrawEllipse(null, pen, new Point(cX, cY), rInner, rInner);++ // Gear teeth+ int teeth = 6;+ double toothHeight = size * 0.08;for (int i = 0; i < teeth; i++){- double angle1 = (Math.PI * 2 * i) / teeth;- double angle2 = (Math.PI * 2 * (i + 0.4)) / teeth;- double angle3 = (Math.PI * 2 * (i + 0.6)) / teeth;- double angle4 = (Math.PI * 2 * (i + 1)) / teeth;-- Point p1 = new Point(centerX + outerRadius * Math.Cos(angle1), centerY + outerRadius * Math.Sin(angle1));- Point p2 = new Point(centerX + outerRadius * Math.Cos(angle2), centerY + outerRadius * Math.Sin(angle2));- Point p3 = new Point(centerX + innerRadius * Math.Cos(angle3), centerY + innerRadius * Math.Sin(angle3));- Point p4 = new Point(centerX + innerRadius * Math.Cos(angle4), centerY + innerRadius * Math.Sin(angle4));-- if (i == 0)- figure.StartPoint = p1;-- figure.Segments.Add(new LineSegment(p2, true));- figure.Segments.Add(new LineSegment(p3, true));- figure.Segments.Add(new LineSegment(p4, true));+ double angle = (Math.PI * 2 * i) / teeth;+ double cos = Math.Cos(angle);+ double sin = Math.Sin(angle);++ Point pStart = new Point(cX + rOuter * cos, cY + rOuter * sin);+ Point pEnd = new Point(cX + (rOuter + toothHeight) * cos, cY + (rOuter + toothHeight) * sin);++ var toothPen = new Pen(primaryBrush, size * 0.08) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };+ context.DrawLine(toothPen, pStart, pEnd);}- figure.IsClosed = true;- geometry.Figures.Add(figure);- context.DrawGeometry(whiteBrush, null, geometry);+ // Outer gear ring+ context.DrawEllipse(null, pen, new Point(cX, cY), rOuter, rOuter);+ }- // Center hole- context.DrawEllipse(grayBrush, null, new Point(centerX, centerY), size * 0.12, size * 0.12);+ return RenderVisual(visual, size, size);+ }++ /// <summary>+ /// Creates a Help icon (question mark inside a circular balloon)+ /// </summary>+ public static BitmapSource CreateHelpIcon(int size = 32)+ {+ var visual = new DrawingVisual();+ using (var context = visual.RenderOpen())+ {+ bool isDark = IsDarkTheme();+ var primaryBrush = isDark ? Brushes.White : new SolidColorBrush(Color.FromRgb(30, 41, 59));+ var accentBrush = new SolidColorBrush(Color.FromRgb(0, 150, 136)); // Teal+ var softFillBrush = new SolidColorBrush(Color.FromArgb(40, 0, 150, 136)); // Semi-transparent teal+ var pen = new Pen(primaryBrush, size * 0.06) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };++ // Balloon outline+ context.DrawEllipse(softFillBrush, pen, new Point(size / 2.0, size / 2.0), size * 0.35, size * 0.35);++ // Question mark text drawing+ var formattedText = new FormattedText(+ "?",+ System.Globalization.CultureInfo.InvariantCulture,+ FlowDirection.LeftToRight,+ new Typeface(new FontFamily("Segoe UI"), FontStyles.Normal, FontWeights.Bold, FontStretches.Normal),+ size * 0.45,+ primaryBrush,+ 96);++ context.DrawText(formattedText, new Point(size * 0.38, size * 0.2));}return RenderVisual(visual, size, size);}/// <summary>- /// Creates a generic RevitMCP icon (branded)+ /// Creates a branded RevitMCP icon (gorgeous isometric cyan/teal/blue 3D BIM cube)/// </summary>public static BitmapSource CreateBrandIcon(int size = 32){var visual = new DrawingVisual();using (var context = visual.RenderOpen()){- // Gradient background- var gradient = new LinearGradientBrush(- Color.FromRgb(33, 150, 243),- Color.FromRgb(21, 101, 192),- 45);- context.DrawRectangle(gradient, null, new Rect(0, 0, size, size));-- // 3D cube representing Revit model- var whiteBrush = Brushes.White;- var whitePen = new Pen(whiteBrush, size * 0.04);-- // Front face- Point p1 = new Point(size * 0.3, size * 0.5);- Point p2 = new Point(size * 0.7, size * 0.5);- Point p3 = new Point(size * 0.7, size * 0.8);- Point p4 = new Point(size * 0.3, size * 0.8);-- var frontFace = new PathGeometry();- var frontFigure = new PathFigure { StartPoint = p1, IsClosed = true };- frontFigure.Segments.Add(new LineSegment(p2, true));- frontFigure.Segments.Add(new LineSegment(p3, true));- frontFigure.Segments.Add(new LineSegment(p4, true));- frontFace.Figures.Add(frontFigure);- context.DrawGeometry(whiteBrush, whitePen, frontFace);-- // Top face- Point p5 = new Point(size * 0.5, size * 0.25);- Point p6 = new Point(size * 0.9, size * 0.25);- var topFace = new PathGeometry();- var topFigure = new PathFigure { StartPoint = p5, IsClosed = true };- topFigure.Segments.Add(new LineSegment(p6, true));- topFigure.Segments.Add(new LineSegment(p2, true));- topFigure.Segments.Add(new LineSegment(p1, true));- topFace.Figures.Add(topFigure);- var topBrush = new SolidColorBrush(Color.FromArgb(180, 255, 255, 255));- context.DrawGeometry(topBrush, whitePen, topFace);-- // Right face- var rightFace = new PathGeometry();- var rightFigure = new PathFigure { StartPoint = p2, IsClosed = true };- rightFigure.Segments.Add(new LineSegment(p6, true));- rightFigure.Segments.Add(new LineSegment(new Point(size * 0.9, size * 0.55), true));- rightFigure.Segments.Add(new LineSegment(p3, true));- rightFace.Figures.Add(rightFigure);- var rightBrush = new SolidColorBrush(Color.FromArgb(150, 255, 255, 255));- context.DrawGeometry(rightBrush, whitePen, rightFace);+ double cX = size / 2.0;++ // High-end Gradient Brushes+ var topBrush = new LinearGradientBrush(Color.FromRgb(0, 188, 212), Color.FromRgb(0, 150, 136), 45); // Cyan to Teal+ var leftBrush = new LinearGradientBrush(Color.FromRgb(33, 150, 243), Color.FromRgb(21, 101, 192), 90); // Blue to Dark Blue+ var rightBrush = new LinearGradientBrush(Color.FromRgb(0, 150, 136), Color.FromRgb(0, 105, 92), 90); // Dark Teal++ var pen = new Pen(Brushes.White, size * 0.04) { LineJoin = PenLineJoin.Round };++ // Isometric vertices+ Point topPt = new Point(cX, size * 0.15);+ Point leftPt = new Point(size * 0.15, size * 0.38);+ Point rightPt = new Point(size * 0.85, size * 0.38);+ Point centerPt = new Point(cX, size * 0.58);+ Point botLeftPt = new Point(size * 0.15, size * 0.78);+ Point botRightPt = new Point(size * 0.85, size * 0.78);+ Point bottomPt = new Point(cX, size * 0.95);++ // Top Face+ var topGeo = new PathGeometry();+ var topFig = new PathFigure { StartPoint = topPt, IsClosed = true };+ topFig.Segments.Add(new LineSegment(leftPt, true));+ topFig.Segments.Add(new LineSegment(centerPt, true));+ topFig.Segments.Add(new LineSegment(rightPt, true));+ topGeo.Figures.Add(topFig);+ context.DrawGeometry(topBrush, pen, topGeo);++ // Left Face+ var leftGeo = new PathGeometry();+ var leftFig = new PathFigure { StartPoint = leftPt, IsClosed = true };+ leftFig.Segments.Add(new LineSegment(botLeftPt, true));+ leftFig.Segments.Add(new LineSegment(bottomPt, true));+ leftFig.Segments.Add(new LineSegment(centerPt, true));+ leftGeo.Figures.Add(leftFig);+ context.DrawGeometry(leftBrush, pen, leftGeo);++ // Right Face+ var rightGeo = new PathGeometry();+ var rightFig = new PathFigure { StartPoint = rightPt, IsClosed = true };+ rightFig.Segments.Add(new LineSegment(centerPt, true));+ rightFig.Segments.Add(new LineSegment(bottomPt, true));+ rightFig.Segments.Add(new LineSegment(botRightPt, true));+ rightGeo.Figures.Add(rightFig);+ context.DrawGeometry(rightBrush, pen, rightGeo);}return RenderVisual(visual, size, size);@@ -231,5 +289,18 @@ namespace RevitBridge.UIencoder.Save(stream);}}++ /// <summary>+ /// Generates all ribbon button icons and saves them to the specified directory+ /// </summary>+ public static void GenerateAllIcons(string iconDir)+ {+ SaveIcon(CreateConnectIcon(32), Path.Combine(iconDir, "connect.png"));+ SaveIcon(CreateDisconnectIcon(32), Path.Combine(iconDir, "disconnect.png"));+ SaveIcon(CreateStatusIcon(32), Path.Combine(iconDir, "status.png"));+ SaveIcon(CreateSettingsIcon(32), Path.Combine(iconDir, "settings.png"));+ SaveIcon(CreateBrandIcon(32), Path.Combine(iconDir, "brand.png"));+ SaveIcon(CreateHelpIcon(32), Path.Combine(iconDir, "help.png"));+ }}}diff --git a/packages/revit-bridge-addin/src/UI/ModernDialog.xaml b/packages/revit-bridge-addin/src/UI/ModernDialog.xamlindex 0c14159..ac21255 100644--- a/packages/revit-bridge-addin/src/UI/ModernDialog.xaml+++ b/packages/revit-bridge-addin/src/UI/ModernDialog.xaml@@ -6,69 +6,98 @@Width="600"WindowStartupLocation="CenterScreen"ResizeMode="NoResize"- Background="#F5F5F5"+ Background="Transparent"WindowStyle="None"AllowsTransparency="True"><Window.Resources><!-- Modern Button Style --><Style x:Key="ModernButton" TargetType="Button">- <Setter Property="Background" Value="#2196F3"/>+ <Setter Property="Background" Value="{DynamicResource HeaderBrush}"/><Setter Property="Foreground" Value="White"/>- <Setter Property="FontSize" Value="14"/>+ <Setter Property="FontSize" Value="13"/><Setter Property="FontWeight" Value="SemiBold"/>- <Setter Property="Padding" Value="20,10"/>+ <Setter Property="Padding" Value="24,10"/><Setter Property="BorderThickness" Value="0"/><Setter Property="Cursor" Value="Hand"/><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="Button"><Border Background="{TemplateBinding Background}"- CornerRadius="4"+ CornerRadius="6"Padding="{TemplateBinding Padding}"><ContentPresenter HorizontalAlignment="Center"- VerticalAlignment="Center"/>+ VerticalAlignment="Center"/></Border></ControlTemplate></Setter.Value></Setter><Style.Triggers><Trigger Property="IsMouseOver" Value="True">- <Setter Property="Background" Value="#1976D2"/>+ <Setter Property="Opacity" Value="0.9"/></Trigger><Trigger Property="IsPressed" Value="True">- <Setter Property="Background" Value="#0D47A1"/>+ <Setter Property="Opacity" Value="0.8"/></Trigger></Style.Triggers></Style><!-- Secondary Button Style --><Style x:Key="SecondaryButton" TargetType="Button" BasedOn="{StaticResource ModernButton}">- <Setter Property="Background" Value="#757575"/>+ <Setter Property="Background" Value="Transparent"/>+ <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>+ <Setter Property="BorderThickness" Value="1"/>+ <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>+ <Setter Property="Template">+ <Setter.Value>+ <ControlTemplate TargetType="Button">+ <Border Background="{TemplateBinding Background}"+ BorderBrush="{TemplateBinding BorderBrush}"+ BorderThickness="{TemplateBinding BorderThickness}"+ CornerRadius="6"+ Padding="{TemplateBinding Padding}">+ <ContentPresenter HorizontalAlignment="Center"+ VerticalAlignment="Center"/>+ </Border>+ </ControlTemplate>+ </Setter.Value>+ </Setter><Style.Triggers><Trigger Property="IsMouseOver" Value="True">- <Setter Property="Background" Value="#616161"/>+ <Setter Property="Background" Value="{DynamicResource BgBrush}"/></Trigger></Style.Triggers></Style>- <!-- Stat Card Style -->+ <!-- Stat Card Style with Elegant Shadows and Hover Effects --><Style x:Key="StatCard" TargetType="Border">- <Setter Property="Background" Value="White"/>+ <Setter Property="Background" Value="{DynamicResource CardBgBrush}"/>+ <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>+ <Setter Property="BorderThickness" Value="1"/><Setter Property="CornerRadius" Value="8"/>- <Setter Property="Padding" Value="15"/>- <Setter Property="Margin" Value="5"/>+ <Setter Property="Padding" Value="16"/>+ <Setter Property="Margin" Value="6"/><Setter Property="Effect"><Setter.Value>- <DropShadowEffect Color="#000000" Opacity="0.1" BlurRadius="10" ShadowDepth="2"/>+ <DropShadowEffect Color="#000000" Opacity="0.06" BlurRadius="8" ShadowDepth="1"/></Setter.Value></Setter>+ <Style.Triggers>+ <Trigger Property="IsMouseOver" Value="True">+ <Setter Property="BorderBrush" Value="{DynamicResource HeaderBrush}"/>+ <Setter Property="Effect">+ <Setter.Value>+ <DropShadowEffect Color="#000000" Opacity="0.12" BlurRadius="12" ShadowDepth="3"/>+ </Setter.Value>+ </Setter>+ </Trigger>+ </Style.Triggers></Style></Window.Resources>- <Border CornerRadius="8" Background="White">+ <Border x:Name="MainWindowBorder" CornerRadius="8" Background="{DynamicResource CardBgBrush}"><Border.Effect>- <DropShadowEffect Color="#000000" Opacity="0.3" BlurRadius="20" ShadowDepth="5"/>+ <DropShadowEffect Color="#000000" Opacity="0.25" BlurRadius="20" ShadowDepth="5"/></Border.Effect><Grid>@@ -79,7 +108,7 @@</Grid.RowDefinitions><!-- Header -->- <Border Grid.Row="0" Background="#2196F3" CornerRadius="8,8,0,0">+ <Border x:Name="HeaderBorder" Grid.Row="0" Background="{DynamicResource HeaderBrush}" CornerRadius="8,8,0,0"><Grid><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/>@@ -88,7 +117,7 @@</Grid.ColumnDefinitions><!-- Icon/Logo -->- <Viewbox Grid.Column="0" Width="40" Height="40" Margin="15,0,10,0">+ <Viewbox Grid.Column="0" Width="36" Height="36" Margin="15,0,10,0"><Canvas Width="24" Height="24"><Path Fill="White" Data="M12,2L2,7V17L12,22L22,17V7M12,4.4L19.2,8.2V15.8L12,19.6L4.8,15.8V8.2"/></Canvas>@@ -98,14 +127,14 @@<StackPanel Grid.Column="1" VerticalAlignment="Center"><TextBlock x:Name="DialogTitle"Text="RevitMCP Bridge Status"- FontSize="18"+ FontSize="16"FontWeight="SemiBold"Foreground="White"/><TextBlock x:Name="DialogSubtitle"Text="AI-Powered Revit Automation"- FontSize="12"- Foreground="#E3F2FD"- Opacity="0.9"/>+ FontSize="11"+ Foreground="White"+ Opacity="0.85"/></StackPanel><!-- Close Button -->@@ -131,7 +160,7 @@</ScrollViewer><!-- Footer -->- <Border Grid.Row="2" Background="#FAFAFA" CornerRadius="0,0,8,8" BorderBrush="#E0E0E0" BorderThickness="0,1,0,0">+ <Border x:Name="FooterBorder" Grid.Row="2" Background="{DynamicResource FooterBgBrush}" CornerRadius="0,0,8,8" BorderBrush="{DynamicResource FooterBorderBrush}" BorderThickness="0,1,0,0"><StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="20,0"><Button x:Name="ActionButton"Content="OK"diff --git a/packages/revit-bridge-addin/src/UI/ModernDialog.xaml.cs b/packages/revit-bridge-addin/src/UI/ModernDialog.xaml.csindex 912bb66..6267370 100644--- a/packages/revit-bridge-addin/src/UI/ModernDialog.xaml.cs+++ b/packages/revit-bridge-addin/src/UI/ModernDialog.xaml.cs@@ -8,8 +8,62 @@ namespace RevitBridge.UI{public partial class ModernDialog : Window{+ private readonly Brush _bgBrush;+ private readonly Brush _cardBgBrush;+ private readonly Brush _textPrimaryBrush;+ private readonly Brush _textSecondaryBrush;+ private readonly Brush _borderBrush;+ private readonly Brush _headerBrush;+ private readonly Brush _footerBgBrush;+ private readonly Brush _footerBorderBrush;+public ModernDialog(){+ // Detect Revit Theme+ bool isDark = false;+ try+ {+ isDark = Autodesk.Revit.UI.UIThemeManager.CurrentTheme == Autodesk.Revit.UI.UITheme.Dark;+ }+ catch+ {+ // Fallback if UIThemeManager is not available+ }++ // Establish professional, Revit-aligned color system+ if (isDark)+ {+ _bgBrush = new SolidColorBrush(Color.FromRgb(43, 43, 43)); // Dark charcoal+ _cardBgBrush = new SolidColorBrush(Color.FromRgb(51, 51, 51)); // Medium charcoal+ _textPrimaryBrush = new SolidColorBrush(Color.FromRgb(224, 224, 224)); // Soft white+ _textSecondaryBrush = new SolidColorBrush(Color.FromRgb(170, 170, 170)); // Slate gray+ _borderBrush = new SolidColorBrush(Color.FromRgb(68, 68, 68)); // Charcoal border+ _headerBrush = new SolidColorBrush(Color.FromRgb(31, 31, 31)); // Rich near-black header+ _footerBgBrush = new SolidColorBrush(Color.FromRgb(37, 37, 37)); // Footer background+ _footerBorderBrush = new SolidColorBrush(Color.FromRgb(48, 48, 48)); // Footer border+ }+ else+ {+ _bgBrush = new SolidColorBrush(Color.FromRgb(240, 240, 240)); // Professional light gray+ _cardBgBrush = new SolidColorBrush(Color.FromRgb(255, 255, 255)); // Flawless white+ _textPrimaryBrush = new SolidColorBrush(Color.FromRgb(34, 34, 34)); // Dark charcoal text+ _textSecondaryBrush = new SolidColorBrush(Color.FromRgb(85, 85, 85)); // Muted slate text+ _borderBrush = new SolidColorBrush(Color.FromRgb(208, 208, 208)); // Professional border gray+ _headerBrush = new SolidColorBrush(Color.FromRgb(29, 58, 86)); // Sleek corporate Revit Blue/Slate+ _footerBgBrush = new SolidColorBrush(Color.FromRgb(245, 245, 245)); // Off-white footer+ _footerBorderBrush = new SolidColorBrush(Color.FromRgb(224, 224, 224)); // Footer separator+ }++ // Expose as DynamicResources before initializing components so XAML bindings compile and evaluate perfectly+ Resources["BgBrush"] = _bgBrush;+ Resources["CardBgBrush"] = _cardBgBrush;+ Resources["TextPrimaryBrush"] = _textPrimaryBrush;+ Resources["TextSecondaryBrush"] = _textSecondaryBrush;+ Resources["BorderBrush"] = _borderBrush;+ Resources["HeaderBrush"] = _headerBrush;+ Resources["FooterBgBrush"] = _footerBgBrush;+ Resources["FooterBorderBrush"] = _footerBorderBrush;+InitializeComponent();// Enable dragging by clicking anywhere on the header@@ -51,7 +105,7 @@ namespace RevitBridge.UIFontSize = 32,VerticalAlignment = VerticalAlignment.Center,HorizontalAlignment = HorizontalAlignment.Center,- Foreground = iconColor ?? new SolidColorBrush(Color.FromRgb(33, 150, 243))+ Foreground = iconColor ?? new SolidColorBrush(Color.FromRgb(33, 150, 243)) // Blue};Grid.SetColumn(iconText, 0);grid.Children.Add(iconText);@@ -67,7 +121,7 @@ namespace RevitBridge.UI{Text = label,FontSize = 12,- Foreground = new SolidColorBrush(Color.FromRgb(117, 117, 117)),+ Foreground = (Brush)FindResource("TextSecondaryBrush"),Margin = new Thickness(0, 0, 0, 5)};@@ -76,7 +130,7 @@ namespace RevitBridge.UIText = value,FontSize = 18,FontWeight = FontWeights.SemiBold,- Foreground = new SolidColorBrush(Color.FromRgb(33, 33, 33))+ Foreground = (Brush)FindResource("TextPrimaryBrush")};textStack.Children.Add(labelText);@@ -97,16 +151,16 @@ namespace RevitBridge.UIText = title,FontSize = 14,FontWeight = FontWeights.SemiBold,- Foreground = new SolidColorBrush(Color.FromRgb(66, 66, 66)),+ Foreground = (Brush)FindResource("TextPrimaryBrush"),Margin = new Thickness(0, 0, 0, 8)};var contentBorder = new Border{- Background = new SolidColorBrush(Color.FromRgb(250, 250, 250)),- CornerRadius = new CornerRadius(4),- Padding = new Thickness(12),- BorderBrush = new SolidColorBrush(Color.FromRgb(224, 224, 224)),+ Background = (Brush)FindResource("BgBrush"),+ CornerRadius = new CornerRadius(6),+ Padding = new Thickness(14),+ BorderBrush = (Brush)FindResource("BorderBrush"),BorderThickness = new Thickness(1)};@@ -114,7 +168,7 @@ namespace RevitBridge.UI{Text = content,FontSize = 12,- Foreground = new SolidColorBrush(Color.FromRgb(97, 97, 97)),+ Foreground = (Brush)FindResource("TextSecondaryBrush"),TextWrapping = TextWrapping.Wrap,FontFamily = new FontFamily("Consolas")};@@ -157,17 +211,7 @@ namespace RevitBridge.UI{var card = new Border{- Background = Brushes.White,- CornerRadius = new CornerRadius(8),- Padding = new Thickness(15),- Margin = new Thickness(5),- Effect = new System.Windows.Media.Effects.DropShadowEffect- {- Color = Colors.Black,- Opacity = 0.1,- BlurRadius = 10,- ShadowDepth = 2- }+ Style = (Style)FindResource("StatCard")};var stack = new StackPanel { HorizontalAlignment = HorizontalAlignment.Center };@@ -186,7 +230,7 @@ namespace RevitBridge.UIFontSize = 20,FontWeight = FontWeights.Bold,HorizontalAlignment = HorizontalAlignment.Center,- Foreground = new SolidColorBrush(Color.FromRgb(33, 150, 243)),+ Foreground = new SolidColorBrush(Color.FromRgb(33, 150, 243)), // Autodesk BlueMargin = new Thickness(0, 0, 0, 4)};@@ -195,7 +239,7 @@ namespace RevitBridge.UIText = label,FontSize = 11,HorizontalAlignment = HorizontalAlignment.Center,- Foreground = new SolidColorBrush(Color.FromRgb(117, 117, 117))+ Foreground = (Brush)FindResource("TextSecondaryBrush")};stack.Children.Add(iconText);@@ -211,7 +255,7 @@ namespace RevitBridge.UIvar separator = new Border{Height = 1,- Background = new SolidColorBrush(Color.FromRgb(224, 224, 224)),+ Background = (Brush)FindResource("BorderBrush"),Margin = new Thickness(0, 15, 0, 15)};ContentPanel.Children.Add(separator);diff --git a/revitmcp.config.json.example b/revitmcp.config.json.exampledeleted file mode 100644index eaea4f5..0000000--- a/revitmcp.config.json.example+++ /dev/null@@ -1,12 +0,0 @@-{- "revitVersion": "2024",- "installScope": "CurrentUser",- "installPaths": {- "allUsers": "C:\\ProgramData\\Autodesk\\Revit\\Addins",- "currentUser": "%APPDATA%\\Autodesk\\Revit\\Addins"- },- "build": {- "configuration": "Release",- "sdkPath": ""- }-}diff --git a/server.json b/server.jsonindex 6678d6b..aa4dddc 100644--- a/server.json+++ b/server.json@@ -17,13 +17,13 @@"source": "github","subfolder": "packages/mcp-server-revit"},- "version": "0.1.1",+ "version": "1.0.0","packages": [{"registryType": "mcpb",- "identifier": "https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server/releases/download/v0.1.1/revit-mcp-server-0.1.1.mcpb",+ "identifier": "https://github.com/Sam-AEC/Autodesk-Revit-MCP-Server/releases/download/v1.0.0/revit-mcp-server-1.0.0.mcpb","fileSha256": "feb1f736e892a079715d08f17a1fdc3643013b27febc2d373899c60636d9bcb8",- "version": "0.1.1",+ "version": "1.0.0","transport": {"type": "stdio"},