A deterministic importance solver has been implemented as an internal subroutine in the Serpent 2 Monte Carlo code for the purpose of producing weight-window meshes for variance reduction. The routine solves the adjoint transport problem using the response matrix method with coupling coefficients obtained from a conventional forward Monte Carlo simulation. The methodology can be applied to photon and neutron external source problems, and the solver supports multiple energy groups and several mesh types. Importances can be generated with respect to multiple responses, and an iterative global variance reduction sequence enables distributing the transported particle population evenly throughout the geometry. This paper describes the methodology applied in the response matrix solver and presents a verification for the generated importance functions through simple demonstrations. A practical example involving a photon shielding problem is included for performance evaluation.