Isn't this exactly what xdg-open does?
https://wiki.archlinux.org/index.php/Xdg-utils
https://askubuntu.com/questions/527166/how-to-set-subl-proto...
I suppose if you want to support text mode (ie use from mutt without running a gui) - you'd have to use mailcap - but that assumes the login flow works in a text mode browser like w3m...