← Files Meetings (Beta)ARCHIVED FILE
scripts/launch_meetings_mcp
1.76 KB · Oct 8, 2026 · 12:02 UTC
#!/bin/sh
set -eu
if [ "$#" -lt 1 ]; then
printf '%s\n' 'ChatGPT Meetings could not start: missing MCP server path.' >&2
exit 64
fi
# Desktop app launchers do not inherit the user's interactive-shell PATH.
PATH="${PATH:-/usr/bin:/bin}:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
export PATH
if [ -n "${CHATGPT_MEETINGS_NODE_PATH:-}" ]; then
if [ ! -x "$CHATGPT_MEETINGS_NODE_PATH" ]; then
printf '%s\n' "ChatGPT Meetings could not start: CHATGPT_MEETINGS_NODE_PATH is not executable: $CHATGPT_MEETINGS_NODE_PATH" >&2
exit 126
fi
exec "$CHATGPT_MEETINGS_NODE_PATH" "$@"
fi
cache_root=${XDG_CACHE_HOME:-${HOME:-}/.cache}
codex_resources=
case "${CODEX_CLI_PATH:-}" in
*/*) codex_resources=${CODEX_CLI_PATH%/*} ;;
esac
for candidate in \
"${CODEX_MCP_NODE_PATH:-}" \
"${CODEX_BROWSER_USE_NODE_PATH:-}" \
"${CODEX_ELECTRON_RESOURCES_PATH:-}/cua_node/bin/node" \
"$codex_resources/cua_node/bin/node" \
"$cache_root/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node"
do
if [ -n "$candidate" ] && [ -x "$candidate" ]; then
exec "$candidate" "$@"
fi
done
application_roots=${CHATGPT_MEETINGS_APPLICATIONS_ROOTS:-/Applications:${HOME:-}/Applications}
old_ifs=$IFS
IFS=:
for applications_root in $application_roots; do
IFS=$old_ifs
for application in \
"$applications_root"/Codex*.app \
"$applications_root"/ChatGPT*.app
do
candidate="$application/Contents/Resources/cua_node/bin/node"
if [ -x "$candidate" ]; then
exec "$candidate" "$@"
fi
done
IFS=:
done
IFS=$old_ifs
if command -v node >/dev/null 2>&1; then
exec node "$@"
fi
printf '%s\n' 'ChatGPT Meetings could not find a Node runtime. Reinstall or update the ChatGPT app, or set CHATGPT_MEETINGS_NODE_PATH to an executable Node runtime.' >&2
exit 127
SHA-256: def2a0a802aba8e2a5c6cd1fb8528f7644403ff353ddaefd78cebb2f19173781