Defect engineering is a key approach for tailoring the properties of the emerging two-dimensional semiconductors. Here, we report an atomic engineering of the W vacancy in monolayer WSe2 by single potassium atom decoration. The K decoration alters the energy states and reshapes the wave-function such that previously hidden mid-gap states become visible with well-resolved multiplets in scanning tunneling spectroscopy. Their energy levels are in good agreement with first principle calculations. More interestingly, the calculations show that an unpaired electron donated by the K atom can lead to a local magnetic moment, exhibiting an on-off switching by the odd-even number of electron filling. Experimentally the Fermi level is pinned above all defect states due to the graphite substrate, corresponding to an off state. The close agreement between theory and experiment in the off state, on the other hand, suggest a possibility of gate-programmable magnetic moments at the defects.