Margecany ( German Margaret or Margetzan, Hungarian Margitfalva - to 1902 Margitfalu ) is a municipality in eastern Slovakia.

The town was first mentioned in writing in 1235. Since 1960 also the place Rolova Huta ( German Phőnikszhuta Phoenix hut or Rhollhütte, Hungarian) belongs to the municipality. Significant for the community is primarily the railway junction; here branches off from the main route Košice - Žilina Banská Bystrica from the route.