Retinal prostheses can restore the basic visual function of patients with retinal degeneration, which relies on effective electrical stimulation to evoke the physiological activities of retinal ganglion cells (RGCs). Current electrical stimulation strategies have defects such as unstable effects and insufficient stimulation positions, therefore, it is crucial to determine the optimal pulse parameters for precise and safe electrical stimulation. Biphasic voltages (cathode-first) with a pulse width of 25 ms and different amplitudes were used to ex vivo stimulate RGCs of three wild-type (WT) mice using a commercial microelectrode array (MEA) recording system. An algorithm is developed to automatically realize both spike-sorting and electrical response identification for the spike signals recorded. Measured from three WT mouse retinas, the total numbers of RGC units and responsive RGC units were 1193 and 151, respectively. In addition, the optimal pulse amplitude range for electrical stimulation was determined to be 0.43 V-1.3 V. The processing results of the automatic algorithm we proposed shows high consistency with those using traditional manual processing. We anticipate the new algorithm can not only speed up the elaborate electrophysiological data processing, but also optimize pulse parameters for the electrical stimulation strategy of neural prostheses.