Haven't ever used it myself, but...
The web site installation says...
"MPIR has an autoconf/automake/libtool based conguration system. ... Important note: by default MPIR produces libraries named libmpir, etc., and the header file mpir.h."
If you can compile (and link) externally, then the needed libraries do exist somewhere; your problem is that mex setup doesn't know about external non-TMW libraries and so it doesn't set the LIB environment variable to include that location (nor the INCLUDE path to find header files if they're not in local directory either).
To build this way under mex, you'll have to modify the default mexopts.bat file manually to include those locations needed or set them in an autostart routine so they're globally already included in the startup. Remember that mex spawns a new console process to execute under and that will be a virgin environment that only has those environment variables set that are either explicitly set in the batch file itself or were inherited from the parent.
ADDENDUM
Or, you could use the $COMPFLAGS$/$LINKFLAGS$ option variables when you call mex but that means specifying them every time which is why I suggested first to either modify the mexopts.bat file or add the flags to the base environment if you're going to be using this library a lot.