Method of interaction
As a command
When calling mql(1) as a command, you can either pass the input on a file or on stdin. The output is given on stdout.
You can capture the output by redirecting it to a file (e.g., append "> /tmp/x13wd93pq" to the command line). Alternatively, set up a pipe between your application and the mql(1) program. See your system manual pages for how to do this.
See the mql(1) man-page for details of command-line options and command-line syntax.