How can I create a custom behavior for a URL scheme?
I found my answer using AppleScript:

https://support.shotgunsoftware.com/entries/127152-Launching-External-Applications-using-Custom-Protocols-under-OSX


Create an AppleScript that uses on open location this_URL
Save as Application
Edit the Info.plist of the Application with:

&lt;key&gt;CFBundleURLTypes&lt;/key&gt;
&lt;array&gt;
  &lt;dict&gt;
    &lt;key&gt;CFBundleURLName&lt;/key&gt;
    &lt;string&gt;Magnet&lt;/string&gt;
    &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
    &lt;array&gt;
      &lt;string&gt;magnet&lt;/string&gt;
    &lt;/array&gt;
  &lt;/dict&gt;
&lt;/array&gt;