  We prove the large deviation principle for the trajectory of a broad class of
mean field interacting Markov jump processes via a general analytic approach
based on viscosity solutions. Examples include generalized Ehrenfest models as
well as Curie-Weiss spin flip dynamics with singular jump rates.
  The main step in the proof of the large deviation principle, which is of
independent interest, is the proof of the comparison principle for an
associated collection of Hamilton-Jacobi equations.
  Additionally, we show that the large deviation principle provides a general
method to identify a Lyapunov function for the associated McKean-Vlasov
equation.
