  We introduce a patch to the commonly used public codes CAMB and CosmoMC that
allows the user to implement a general modification of the equations describing
the growth of cosmological perturbations, while preserving the covariant
conservation of the energy-momentum. This patch replaces the previously
publicly released code MGCAMB, while also extending it in several ways. The new
version removes the limitation of late-time-only modifications to the perturbed
Einstein equations, and includes several parametrization introduced in the
literature. To demonstrate the use of the patch, we obtain joint constraints on
the neutrino mass and parameters of a scalar-tensor gravity model from CMB, SNe
and ISW data as measured from the correlation of CMB with large scale
structure.
