Recent developments in radiation detection technology have demonstrated the feasibility of simultaneous magnetic resonance imaging (MRI) and time-of-flight positron emission tomography (TOF-PET). In this paper we report on a compact detector module design for TOF-PET compatible with MR based on the FlexToT front-end application specific integrated circuit (ASIC), a fast, low-power front-end readout for silicon photomultiplier arrays. The module comprises scintillators, photosensors, ASICs, field-programmable gate arrays, and USB or Ethernet protocols for communication with data acquisition systems. The small footprint of the proposed design allows its use on positron emission tomography (PET) inserts for existing MRI equipment, both whole-body scanners, and dedicated organ systems. The main design features are presented together with results from the characterization of a proof-of-concept prototype in terms of radiation detection and measurements of radio frequency emission spectra from the electronic components. Ongoing work is focused on implementing and characterizing a full module inside MRI for ensuring electromagnetic compatibility, addressing proper shielding, and the possibility of simultaneous PET-MR acquisition using our compact detector module design.