I’ve made a video on creating a Remote API script for Cubase 12 for the Akai MPK Mini Mk2.
While it’s possible to follow along to make modifications to the script, it seems like a better idea to provide the script that you can unzip into the “Local” folder in the remote folder for Cubase (which is in your documents folder, buried inside Steinberg), and then you’ll be good to go.
The file is here: akai_mpk_mini_mk2_remote_script