For MR-guided high-dose-rate (HDR) brachytherapy, an MR-compatible afterloader was developed, required for real-time HDR brachytherapy source tracking. This afterloader should be able to function well close to the MRI scanner. The functioning of both the MR-compatible afterloader and the MRI scanner, while operating simultaneously, was investigated. Source localization was performed by a phase-only cross correlation localization method. The results demonstrate that the afterloader was able to send the source to predefined source positions, while simultaneously performing MR imaging. Combined with high-temporal resolution imaging and fast reconstruction/post-processing, this study shows the feasibility of real-time source tracking for MR-guided HDR brachytherapy.