I have not worked with triggering macros through the kmtrigger:// protocol, so I do not know.
I do also not know how to make a GreaseMonkey script.
If you search the forum, there is other who have asked to trigger a macro when certain webpages are active:
But Keyboard Maestro does not support it.
It is not possible to just trigger it with at hotkey?
Else you need to find someone with GreaseMonkey skills.
And if the kmtrigger:// opens a new window, then just start the macro with closing the first window.