We present theory and implementation for a new approach for studying solvent effects: the multiconfigurational self-consistent reaction-field (MCSCRF) method. The atom, molecule, or supermolecule is assumed to be surrounded by a linear, homogeneous, continuous medium described by its macroscopic dielectric constant. The electronic structure of the compound is described by a multiconfigurational self-consistent field (MCSCF) wave function. The wave function is fully optimized with respect to all variational parameters in the presence of the surrounding polarizable dielectric medium. We develop a second-order convergent optimization procedure for the solvent states. The solvent integrals are evaluated by an efficient and general algorithm. The flexible description of the electronic structure allows us to accurately describe ground, excited, or ionized states of the solute. Deficiencies in the calculation can therefore be assigned to the cavity model rather than the description of the solute.