# Registers the External MCP proxy with Claude Desktop. # # .\install.ps1 install, or update an existing entry # .\install.ps1 -DryRun show what would change, write nothing # .\install.ps1 -Name staffngo-staging -Config .\config.staging.yml # # This only locates node and hands over to install.mjs, which holds the logic — the same one the shell # script uses, rather than a second implementation that would drift from it. [CmdletBinding()] param( [switch] $DryRun, [string] $Name, [string] $Config, [string] $NodePath ) $ErrorActionPreference = 'Stop' $here = Split-Path -Parent $MyInvocation.MyCommand.Path if (-not $NodePath) { $command = Get-Command node -ErrorAction SilentlyContinue if (-not $command) { Write-Error "node was not found on PATH. Install Node.js, or pass -NodePath 'C:\Program Files\nodejs\node.exe'." exit 1 } $NodePath = $command.Source } # The path recorded in Claude's configuration is this one, so it has to be the real executable rather # than a shim: Claude Desktop starts the process itself, outside any shell that would resolve an alias. $arguments = @((Join-Path $here 'install.mjs'), '--node', $NodePath) if ($DryRun) { $arguments += '--dry-run' } if ($Name) { $arguments += @('--name', $Name) } if ($Config) { $arguments += @('--config', (Resolve-Path $Config).Path) } & $NodePath @arguments exit $LASTEXITCODE