This project is dedicated to dark sector searches using the high-intensity electron beam of the MESA accelerator. The MAGIX spectrometers will be commissioned using the Extracted Beam (EB) mode. A Dark Photon search in visible decay mode using a tantalum target in EB mode will be performed covering the mass of the hypothetical X17 particle. The theoretical work aims to set the framework to analyze the dark sector searches in the MESA energy range. The goal is to extend the already existing framework to calculate the QED background expected in the MESA energy range in order to be able to interpret any possible signal within the dark photon model.