We study the RKKY interaction between two magnetic impurities located on the surface of a three-dimensional Dirac semimetal with two Dirac nodes in the band structure. By taking into account both bulk and surface contributions to the exchange interaction between the localized spins, we demonstrate that the surface contribution in general dominates the bulk one at distances larger than the inverse node separation due to a weaker power-law decay. We find a strong anisotropy of the surface term with respect to the spins being aligned along the node separation axis or perpendicular to it. In the many impurity dilute regime, this implies formation of quasi-one-dimensional magnetic stripes orthogonal to the node axis. We also discuss the effects of a surface spin-mixing term coupling electrons from spin-degenerate Fermi arcs.