#!/bin/sh
# Claude Desktop's "Add to Claude Desktop" extension runs this. It finds Oriole Voice where it
# is installed — /Applications first, then wherever Spotlight knows it — and runs the app's own
# read-only MCP server, so the extension never carries a copy of the server or a hard-coded path.
app="/Applications/Oriole Voice.app"
[ -x "$app/Contents/MacOS/oriole" ] || app=$(/usr/bin/mdfind "kMDItemCFBundleIdentifier == 'com.chrisporat.oriolevoice'" | /usr/bin/head -n 1)
[ -x "$app/Contents/MacOS/oriole" ] || { echo "Oriole Voice is not installed. Get it at https://oriolevoice.com." >&2; exit 1; }
exec "$app/Contents/MacOS/oriole" mcp
