MRCP uses the principles of magnetic resonance imaging (MRI) to create detailed images of the biliary and pancreatic ducts. The patient is placed in a magnetic field, and radiofrequency pulses are used to generate signals from hydrogen atoms in the body. These signals are then processed to produce high-resolution images. Unlike traditional cholangiography, MRCP does not require the injection of contrast dye, making it a safer option for patients with allergies or kidney issues.