It depends what you want Magnemite to do.
If you want to purely trap Steel-types, then I suggest a set of Substitute, Magnet Rise, Thunderbolt, and Hidden Power Ice. If you want to revenge kill with it, use a Choice Scarf set with Thunderbolt, Hidden Power Ground, Flash Cannon, and Explosion.