MIDI Command Server could be used for executing modep-ctl scripts, triggered by MIDI messages.
I suspect the MOD team may have had some issues with preventing some corner case race conditions or something while using Web UI and MIDI Program Changes at the same time. What we did is a little workaround for that - changing the pedalboard in scripts via API and forcing the whole UI to refresh, which seems to work good enough.