Currently, the use of fiber-optic Bragg gratings in biomedical applications, especially in the field of magnetic resonance imaging (MRI), is becoming popular. In these applications, the fiber Bragg grating (FBG) encapsulation plays a crucial role in terms of the accuracy and reproducibility of the measurements. This paper describes in detail the fabrication method of a prototype FBG sensor, which is realized by encapsulating a Bragg grating between two layers of the MR-compatible material Acrylonitrile Butadiene Styrene (ABS) by 3D printing. The sensor thus created, implemented, for example, on the chest of a human body, enables monitoring of the vital functions of the human body. The paper describes the complete procedure for the creation of the prototype sensor, including strain and temperature dependence, as well as results of long-term experimental measurements against the conventional electrocardiography (ECG) standard. Results based on the objective Bland-Altman (B-A) method confirm that the implemented sensor can be used for reliable monitoring of cardiac activity (>95% based on B-A). Taking into account the single fiber optic cable, its simple implementation, its small size and weight < 5g, the presented sensor represents an interesting alternative to conventional ECG.INDEX TERMS fibre Bragg grating, 3D printing, vital sign monitoring, heart rate, MR-compatible.