  We measure the complete set of transition frequencies necessary to laser cool
and trap MgF molecules. Specifically, we report the frequency of multiple low
$J$ transitions of the $X^2\Sigma^+(v^{\prime\prime}=0,1) \rightarrow
A^2\Pi_{1/2}(v^\prime=0)$, $X^2\Sigma^+(v^{\prime\prime}=1,2) \rightarrow
A^2\Pi_{1/2}(v^\prime=1)$, and $X^2\Sigma^+(v^{\prime\prime}=1) \rightarrow
B^2\Sigma^+(v^{\prime}=0)$ bands of MgF. The measured
$X^2\Sigma^+(v^{\prime\prime}=1)\rightarrow B^2\Sigma^+(v^\prime=0)$ spectrum
allowed the spin-rotation and hyperfine parameters of the $B^2\Sigma^+(v=0)$
state of MgF to be determined. Furthermore, we demonstrate optical cycling in
MgF by pumping molecules into the $X^2\Sigma^+(v=1,2)$ states. Optical pumping
enhances the spectroscopic signals of transitions originating in the
$N^{\prime\prime}=1$ level of the $X^2\Sigma^+(v^{\prime\prime}=1,2)$ states.
