  The basis elements spanning the Sato Grassmannian element corresponding to
the KP $\tau$-function that serves as generating function for rationally
weighted Hurwitz numbers are shown to be Meijer $G$-functions. Using their
Mellin-Barnes integral representation the $\tau$-function, evaluated at the
trace invariants of an externally coupled matrix, is expressed as a matrix
integral. Using the Mellin-Barnes integral transform of an infinite product of
$\Gamma$ functions, a similar matrix integral representation is given for the
KP $\tau$-function that serves as generating function for quantum weighted
Hurwitz numbers.
