The simplest way is using POSIX sockets - but you will need to do data serialization/deserialization and it is pretty slow in general. So I would not recommend using sockets.
Technically MPI can work. If you can use MPI 2.0 compliant library then you can use the client-server mechanism implemented there. Look at the documentation for MPI_Open_port and MPI_Comm_connect. The first one will give you the port name that you will need to pass this name to the client somehow. One option is to use name publishing but it may not work with any MPI library. The other option is to share it using some other mechanism (socket connection, file system or anything else).
But, in fact, I still do not see the reason why you should compile these two apps separately (unless there is a licensing issue) - you can just compile them into one package (I anticipate some code change but it is minor) and then run them as one app.