The mass spectrum analyzer (MSA) will perform in situ observations of ions and magnetic fields around Phobos as part of the Martian Moons eXploration (MMX) mission to investigate the origin of the Martian moons and physical processes in the Martian environment. MSA consists of an ion energy mass spectrometer and two magnetometers which will measure velocity distribution functions and mass/charge distributions of low-energy ions and magnetic field vectors, respectively. For the MMX scientific objectives, MSA will observe solar wind ions, those scattered at the Phobos surface, water-related ions generated in the predicted Martian gas torus, secondary ions sputtered from Phobos, and escaping ions from the Martian atmosphere, while monitoring the surrounding magnetic field. MSA will be developed from previous instruments for space plasma missions such as Kaguya, Arase, and BepiColombo/Mio to contribute to the MMX scientific objectives.