A cosmic ray Muon Flexible Framework for Spectral Generation for Monte Carlo Applications (MUFFSgenMC) has been developed to support state-of-the-art cosmic ray muon detection and tomographic applications. The flexible framework allows for easy, fast creation of source terms for popular Monte Carlo applications such as GEANT4 and MCNP, simplifying the process of simulations. The flexible framework contains a variety of analytical, numerical, and parametric models that capture the main characteristics of the muon energy and angular distributions in the range 0 to 90 and at arbitrary energies. The primary model for muon energy distribution is an implementation of the Smith and Duller phenomenological model. The predictions for muon energies in ranging from 1 GeV to 1 TeV and zenith angles 0 to 90 are validated against an extensive series of experimental spectrum measurements. Finally, the open source code available on Matlab’s Mathworks File Exchange (https://www.mathworks.com/ matlabcentral/fileexchange/65585-muffsgenmc) was written to allow users to easily modify and expand the code. MUFFSgenMC can facilitate the study of cosmic ray muons for nuclear nonproliferation applications and will enable development of new muon-based detection and imaging techniques by providing an easy source term generator. 1