Superconducting detectors, such as microwave kinetic inductance detectors (MKIDs), are sensitive to the effects of ambient magnetic fields. There are two effects magnetic fields have on the response of MKIDs; the trapping of magnetic fields inside the superconducting materials degrades the resonator quality, and the time variation of the magnetic fields results in a baseline fluctuation. In the case of radio astronomy, this means the detector must be protected from the geomagnetic field. Here, we construct a test system to evaluate the effects described. We also evaluate the impact of the magnetic shield. We find that a shielding power of 47 dB is necessary in the case of application with a noise equivalent power of $$2.4 \times 10^{-16}\,\text {W}/\sqrt{\text {Hz}}$$ 2.4×10-16W/Hz . We also confirm that the measured shielding power obtained using permalloy films is consistent with simulations based on the finite element method to an accuracy of 1 dB. We have designed magnetic shields for the GroundBIRD CMB telescope using these results. We achieve a sufficient shielding power of 55 dB.