notion-local-ops operator
Overview
This project has two runtime modes on macOS:
./scripts/dev-tunnel.shfor foreground dev sessions- launchd-managed services for long-lived local MCP + cloudflared keepalive
Prefer launchd when the goal is “stay up even if a shell/tmux pane dies”.
Quick reference
- Install persistent services:
./scripts/install-launchd.sh - Check service + endpoint status:
./scripts/launchd-status.sh - Reload Python code without dropping the tunnel:
./scripts/launchd-reload.sh - Force restart after dependency/config changes:
./scripts/launchd-restart.sh all - Remove launchd services:
./scripts/uninstall-launchd.sh
Operational rules
- Keep the MCP supervisor and
cloudflaredas separate launchd services. - Treat
launchd-reload.shas the default code-update path; it sendsHUPto the supervisor so a fresh child server becomes ready before the old one drains. - Use
launchd-restart.sh mcpafter.venv/ dependency changes. - Use
launchd-restart.sh cloudflaredafter tunnel config changes. - If install fails because the port is already bound, stop manual
dev-tunnel.shprocesses first.
Debug order
./scripts/launchd-status.sh- Check local
http://127.0.0.1:8766/mcp - Check public
https://<hostname>/mcpif the tunnel config has a hostname - Inspect logs under
~/Library/Logs/notion-local-ops-mcp/
Common traps
dev-tunnel.shis not a durable keepalive service; closing the wrapper shell can still take everything down.- launchd plists live under
~/Library/LaunchAgents/; do not commit installed plist artifacts back into the repo. - launchd gets a minimal environment. Always set runtime env vars through
.envor the install-time render path, not by assuming your interactive shell exports them.
Source: catoncat/notion-local-ops-mcp — distributed by TomeVault.