This sounds like an excellent use case for Rhino.Compute!
You should take a look at this example: rhino-developer-samples/compute/cs/ComputePlugIn at 7 · mcneel/rhino-developer-samples · GitHub
Is shows you how to expose your plugin functions as endpoints for Rhino.Compute. Here are a couple of important parts:
- The functions you expose should be static like this: rhino-developer-samples/Convert3dm.cs at 7 · mcneel/rhino-developer-samples · GitHub
- Here is how the static function is exposed to compute: rhino-developer-samples/HelloRhinoComputePlugIn.cs at 7 · mcneel/rhino-developer-samples · GitHub