I do not have any firsthand experience with this, but an initial search points to using the Apache XML-RPC libraries, similar to how XML-RPC is supported with Mathworks tools. A few resources I found are this website and this website.
That being said, I'm not 100% confident this is the most straightforward path for you to achieving your goal of "initializing with matrix values". You might be better off aligning your matrix with the convention used in the Python 3 script example below and attached case.
import xmlrpc.client
server = xmlrpc.client.ServerProxy("http://localhost:1080/RPC2")
opts = {'ModelVars':{'var':[[1,0],[0,1]]}}
server.plecs.simulate("matrix_xmlrpc",opts)