A fast, robust, accurate, and automatic registration technique based on magnetic resonance (MR) active microcoils (active markers) for registration of tracked medical devices to preprocedural MR-images is presented. This allows for a straight-forward integration of position measurement systems into clinical procedures. The presented method is useful for guidance purposes in clinical applications with high demands on accuracy and ease-of-use (e.g., neurosurgical or orthopedic applications). The determination of the positions of the active markers is integrated into the preparation phase of the actual MR imaging scan. The technique features a generic interface using DICOM standards for communication with navigation workstations linked to an MR system. The position of the active markers is fixed with respect to a reference system of an optical positioning measurement system (OPMS) and thus the coregistration of the MR system and the OPMS is established. In a phantom study, a mean overall targeting accuracy of 0.9+/-0.1 mm was achieved and compared favorably to results obtained from manual registration tests (1.8+/-0.3 mm) carried out in parallel. For a test person trained for both registration methods, workflow improvements of 3-6 min per registration step were found. The need for manual interaction is entirely eliminated thus avoiding user-bias, which is advantageous for the usage in clinical routine. The method improves the ease-of-use of tracking equipment during stereotactic guidance. The method is finally demonstrated in a volunteer study using a model of a Mayfield skull clamp with integrated active and optical reference markers.