I'll answer my own question in case anyone else has a similar doubt:
Install slim MCR
You can install a reduced-size (slim) MCR using an installer_input.txt file and the complete MCR at the command line using:
./install -inputFile installer_input.txt
An example installer_input.txt looks like:
mode silent
destinationFolder /opt/mcr
agreeToLicense yes
product.MATLAB_Runtime___Core true
product.MATLAB_Runtime___Numerics true
product.MATLAB_Runtime___Java_Addin true
product.MATLAB_Runtime___Optimization_Toolbox_Addin true
Only the products outlined in this text file will be actually installed
Get product names from ID
The next problem is how to get these product names from the the IDs in "requiredMCRProducts.txt". (e.g. 35000)
Again, the complete MCR is required - look in the folder called "productdata". There is a list of files by product ID, which each contain the name of the product. (e.g. Core)
Related issues: