A highly reliable method of mass-flow controller design is proposed. The controller is composed of 4 parts, i.e., control circuit, Micro-Electro-Mechanical Systems (MEMS), needle valve and step motor. Different gas flow meters and control valves are compared, and then MEMS and needle valve are selected. The MEMS, as an integrated chip, has better vibration resistance and smaller size, and its working temperature can meet the space experimental requirements. The output voltage from MEMS is amplified by subtraction amplifier circuit, through A/D sampling and software filtering, and an output voltage value is obtained, which denotes the actual gas flow. By comparing the sampling value and the set value of gas mass flow, PID algorithm is used to count step motor control parameters, including the amount of pulse and the direction. Then the needle valve adjusts gas mass flow by step motor to reach the set value of gas mass flow. The experimental results are given by using this gas mass flow controller for oxygen flow control. The whole system can neatly adjust gas flow in demand and reach the experimental requirements for space equipment. It lays the foundation of using mass flow controller in China's future space experiment.