Mounting bracket for sliding door with magnetic lock