  The logic MMSNP is a restricted fragment of existential second-order logic
which allows to express many interesting queries in graph theory and finite
model theory. The logic was introduced by Feder and Vardi who showed that every
MMSNP sentence is computationally equivalent to a finite-domain constraint
satisfaction problem (CSP); the involved probabilistic reductions were
derandomized by Kun using explicit constructions of expander structures. We
present a new proof of the reduction to finite-domain CSPs which does not rely
on the results of Kun. This new proof allows us to obtain a stronger statement
and to verify the more general Bodirsky-Pinsker dichotomy conjecture for CSPs
in MMSNP. Our approach uses the fact that every MMSNP sentence describes a
finite union of CSPs for countably infinite $\omega$-categorical structures;
moreover, by a recent result of Hubi\v{c}ka and Ne\v{s}et\v{r}il, these
structures can be expanded to homogeneous structures with finite relational
signature and the Ramsey property. This allows us to use the
universal-algebraic approach to study the computational complexity of MMSNP.
