param(
  [switch]$Install,
  [string]$ApiKey = "termi-mcp-local-dev-key",
  [string]$BackendApiBase = "http://127.0.0.1:5150/api",
  [int]$Port = 5151
)

$ErrorActionPreference = "Stop"

$repoRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$devScript = Join-Path $repoRoot "dev.ps1"

& $devScript -Only mcp -Install:$Install -McpApiKey $ApiKey -McpBackendApiBase $BackendApiBase -McpPort $Port
exit $LASTEXITCODE
