マジ＝真面目 is already an adjective meaning.serious, truthful, sincere. マジで can be (and often is) shortened to just 「マジ」.
で I don't think serves any grammatical purpose. It's just kind of an orphaned particle.
で is a particle indicating state/manner (様態) there, as same as ずぶ濡れで歩いた or 二人で帰った, so the definition #3 is the closest in the dictionary you linked.
マジ is indeed from 真面目, but unlike the stem of a na-adjective 真面目, マジ is closer to a noun. The meaning and grammatical function resemble 本気 than 真面目.