You can create your own custom RPCs to perform actions on the M server and to retrieve data from the M server. Then you can call these RPCs from your client application. Creating an RPC requires you to perform the following two steps:
Write and test the M entry point that will be called by the RPC.
Add the RPC entry that invokes the M entry point, in the REMOTE PROCEDURE file (#8994).