First principles calculations are used to investigate a monatomic Co chain at the Pt(111) surface step edge. We optimize the system geometry minimizing the atomic forces and evaluate the magnetocrystalline anisotropy energy (MAE). The easy magnetization axis is found to align perpendicular to the Co-wire at an angle of approximate to 50 degrees (A-step) and approximate to 30 degrees (B-step) towards the Pt step and the calculated MAE of 2.8 meV (A-step) and 4.45 meV (B-step) are in good agreement with experiment. Our calculations show that the structural relaxation improves the quantitative description of the MAE.