In this work, an optical fiber magnetic field sensor is proposed and demonstrated based on silk fibroin hydrogel (SFH). The primary function of SFH is the carrier of material (Streptavidin magnetic nanoparticles, SMN) that is susceptible to the magnetic field. The multimode interference spectrum is obtained by configuring a single-mode -multimode -single-mode (SMS) structure. The SMS structure is consisted by sequentially connecting a single-mode fiber (SMF), a no-core fiber (NCF), and a SMF. In addition, the SMN responds to a magnetic field, and SMN will modify the effective refractive index (RI) of SFH. Hence, magnetic field sensing can be performed by coating a mixture of SMN and SFH on the SMS structure. Our experimental results show that the maximum sensitivity of the proposed sensor reaches 673.53pm/Oe, and the average sensitivity of 263pm/Oe in the magnetic field strength range from 0 to 115Oe. The proposed optical fiber sensor of the magnetic field, featuring the benefits of environmental friendliness, low cost, easy manufacturing, and simplicity of structure, can find potential application prospects in various areas such as the industry, environment, and military.