Can you use a melee spell attack to make an opportunity attack? You can't if the spell attack is created by casting a spell. When a creature triggers an opportunity attack from you, you can use your reaction to make a melee attack against it.
Do spells provoke attacks of opportunity 2e?
Cast a Spell does not inherently trigger Attacks of Opportunity. Cast a Spell, on its own, is not a Manipulate action (it does not have the manipulate trait), it is not inherently a ranged attack, it is not a move action (it does not have the move trait), therefore it does not provoke attacks of opportunity on its own.
Do spells count as attacks?
Attack roll spells count as attack actions.