Even with max Defense EV investment Magcargo still crumbles to any Fighting- and Ground-type attack, and without any Defense investment Magcargo still walls most Normal- and Flying-type attacks, meaning the logical choice is to focus on its average Special Defense to allow it to wall special attackers like Flareon and tank attacks from Chimecho much better. Flamethrower and Fire Blast are both decent STAB moves that separate it from the other Rock-types in the tier, targeting the foes that it normally walls on their generally lower Special Defense. Toxic spreads status and is Magcargo's best way of crippling the bulky Water-types that are sure to switch into it. RestTalk is recommended on this set to give Magcargo as much longevity as possible and allow it to absorb Sleep Powders and other status from the Grass-types it easily walls. When taking this route, pairing Magcargo with a Heal Bell user like Chimecho would be wise to wake it quickly. Toxic can be replaced with Yawn and pairs well with Magcargo's defensive nature by forcing a switch and giving Magcargo's team some momentum.
Sassy is the chosen nature to not lower the power of Self-Destruct or Flamethrower, and the slightly lower Speed stat is not an issue due to Magcargo's already snail's pace. A mixed defensive EV spread is doable; a spread of 252 HP / 200 Def / 56 SpD with a Sassy nature can be used, with the Defense investment preventing the 2HKO from a +2 Adamant Mawile's Hidden Power Steel while still allowing Magcargo to avoid the 2HKO from 252 SpA Modest Chimecho's Psychic. Generally, however, the additional Special Defense is preferred to allow Magcargo to beat Plusle one-on-one, and Magcargo OHKOes Mawile with Fire Blast anyway (though not with Flamethrower).
Magcargo surprisingly has a number of viable move options not listed above that can be tailored to meet the needs of your team. If running RestTalk doesn't suit your taste, Protect pairs best with Toxic to allow for residual damage buildup and additional Leftovers recovery, as well as allowing Magcargo to scout Choice Band attackers' attacks. That said, Protect's utility can be forgone in favor of additional coverage from Hidden Power Grass, which gives Magcargo some modicum of defense against the other Rock-types in the tier beyond status and will deal a ton of damage to the likes of Whiscash. Self-Destruct is pretty weak compared to the other boom attacks in the tier due to Magcargo's paltry Attack stat, but it's still a good way of crippling opposing Pokemon and allowing Magcargo to keep momentum for its team and prevent Pokemon like Huntail from freely setting up on it; obviously, this should only be run when not using RestTalk. Light Screen and Reflect are both available, with Reflect notably allowing Magcargo to avoid the OHKO from Choice Band Hitmonchan's Earthquake 75% of the time. Light Screen may be more handy overall, though, as with max Special Defense investment and behind a Light Screen, Magcargo is only 3HKOed by defensive Dewgong's Surf. Hidden Power Water can be used over Hidden Power Grass, which trades the ability to batter Whiscash and Relicanth for the ability to threaten other offensive Fire-types like Charmeleon. Both Toxic and Yawn can be used on the set at the same time, allowing Magcargo to literally pick its poison for the enemy between those two moves and its ability, Flame Body; however, doing so can leave Magcargo completely helpless against Substitute users.
Spikes support is very effective with this set due to the status and switches it forces, and Roselia has fantastic type synergy with Magcargo, though using both will create a large Ground-type weakness that can be hard to fill. Still, a switch-in to Ground-, Fighting-, and Rock-type attacks is needed when using Magcargo, making physically defensive Swalot, Pelipper, and Whiscash good teammates. Water-types are particularly dangerous to the success of this set, making defensive Bellossom and Kecleon good teammates as well. Finally, offensive Pokemon that appreciate Magcargo's ability to wall both Fire- and Flying-types should be used with it, examples including Tangela, Piloswine, and Venomoth.