We simplify and extend the construction of half-BPS solutions to 11-dimensional supergravity, with isometry superalgebra D(2, 1; γ) ⊕ D(2, 1; γ). Their space-time has the form AdS 3 ×S 3 ×S 3 warped over a Riemann surface Σ. It describes near-horizon geometries of M2 branes ending on, or intersecting with, M5 branes along a common string. The general solution to the BPS equations is specified by a reduced set of data (γ, h, G), where γ is the real parameter of the isometry superalgebra, and h and G are functions on Σ whose differential equations and regularity conditions depend only on the sign of γ. The magnitude of γ enters only through the map of h, G onto the supergravity fields, thereby promoting all solutions into families parametrized by |γ|. By analyzing the regularity conditions for the supergravity fields, we prove two general theorems: (i) that the only solution with a 2-dimensional CFT dual is AdS 3 ×S 3 ×S 3 × R 2 , modulo discrete identifications of the flat R 2 , and (ii) that solutions with γ < 0 cannot have more than one asymptotic higherdimensional AdS region. We classify the allowed singularities of h and G near the boundary of Σ, and identify four local solutions: asymptotic AdS 4 /Z 2 or AdS 7 regions; highly-curved M5-branes; and a coordinate singularity called the "cap". By putting these "Lego" pieces together we recover all known global regular solutions with the above symmetry, including the self-dual strings on M5 for γ < 0, and the Janus solution for γ > 0, but now promoted to families parametrized by |γ|. We also construct exactly new regular solutions which are asymptotic to AdS 4 /Z 2 for γ < 0, and conjecture that they are a different superconformal limit of the self-dual string. Finally, we construct exactly γ > 0 solutions with highly curved M5-brane regions, which are the formal continuation of the self-dual string solutions across the decompactification point at γ = 0.