An optical klystron (OK), which means for harmonic generation FEL, is designed and constructed with NdFeB magnets. The analysis equations for designing the OK are listed. The design result was checked by 3-dimensional electromagnetic computation software, the Opera3d. The buncher of the OK and its induction field in the middle plane of the OK, computed with Opera3d are respectively shown. The measured B-H curve of the magnet used in the computation is given. The computed induction field in the beam axis by Opera3d matches well with the field measured by 0.1mm 0.1mm hall probe. The typical parameters of the optical klystron are listed. The magnet gaps of the three OK undulator sections can be independently tuned from 40mm to 140mm. After the OK spontaneous emission is got at the beam