# Deploy Addon

> Deploy the built RevitMCP.dll to the correct Revit Add-ins folder for a specified version (Windows only)

- Skill: `shuotao/deploy-addon` (Agent Skill)
- Install (CLI): `npx skillmds@latest add shuotao/deploy-addon`
- Raw SKILL.md: https://api.skillmd.com/api/skills/shuotao/deploy-addon/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: shuotao (https://skillmd.com/u/shuotao)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/shuotao/deploy-addon

---


Deploy `RevitMCP.dll` to the Revit Add-ins directory for the selected version.

## Platform Check

First, detect the OS. If **not Windows**, do not attempt deployment. Instead, show:

```
⚠️  This skill deploys to Windows only.
    Run the following command on your Windows machine:

    $version = "2024"  # change to your Revit version
    $yy = $version.Substring(2)  # "24"
    Copy-Item "MCP\bin\Release.R$yy\RevitMCP.dll" `
      "$env:APPDATA\Autodesk\Revit\Addins\$version\RevitMCP\" -Force
```

Then stop.

## Usage

- **No args** → Show numbered version menu (2022-2026), ask user to choose
- **`--version {year}`** → Deploy directly to that version's directory

## Target Paths

| Version | Target Directory |
|---------|-----------------|
| 2022    | `%APPDATA%\Autodesk\Revit\Addins\2022\RevitMCP\` |
| 2023    | `%APPDATA%\Autodesk\Revit\Addins\2023\RevitMCP\` |
| 2024    | `%APPDATA%\Autodesk\Revit\Addins\2024\RevitMCP\` |
| 2025    | `%APPDATA%\Autodesk\Revit\Addins\2025\RevitMCP\` |
| 2026    | `%APPDATA%\Autodesk\Revit\Addins\2026\RevitMCP\` |

## Steps

1. **Check source DLL**: Verify `MCP/bin/Release.R{YY}/RevitMCP.dll` exists (where `{YY}` matches the target version, e.g. `Release.R24` for Revit 2024).
   - If missing → tell user to run `/build-revit --version {version}` first, then stop.

2. **Check if Revit is running**: Run `tasklist | grep -i revit` to detect Revit process.
   - **Revit NOT running** → Skip warning, proceed directly to step 3.
   - **Revit IS running** → Display:
     ```
     ⚠️  Revit is currently running. The DLL cannot be overwritten while Revit is open.
         Please close Revit before continuing.
     ```
     Ask: `Ready to deploy? (y/n)` — stop if user says no.

3. **Create target directory** if it doesn't exist:
   ```powershell
   New-Item -ItemType Directory -Force -Path "$env:APPDATA\Autodesk\Revit\Addins\{version}\RevitMCP\"
   ```

4. **Copy DLL**:
   ```powershell
   $yy = "{version}".Substring(2)  # e.g. "2024" → "24"
   Copy-Item "MCP\bin\Release.R$yy\RevitMCP.dll" "$env:APPDATA\Autodesk\Revit\Addins\{version}\RevitMCP\" -Force
   ```

5. **Verify**: Confirm the file exists at the target path and show its timestamp.

6. **Report success**:
   ```
   ✅ Deployed to %APPDATA%\Autodesk\Revit\Addins\{version}\RevitMCP\RevitMCP.dll
      → Restart Revit to load the updated add-in.
   ```

## Error Handling

| Error | Response |
|-------|----------|
| Source DLL missing | Direct user to `/build-revit --version {version}` |
| Target directory creation failed | Suggest running terminal as Administrator |
| Copy failed (access denied) | Check if Revit is still running; suggest closing it or running as Administrator |
| Verification fails after copy | Show full error and suggest manual copy command |

