Assuming 5V drive, you should put a low value resistor, like 200 ohms, between the microcontroller and the gate.
It insures that the current can never get above 25mA (5V/200) which is safe for the microcontroller i/o port.
It would work fine without the resistor but it's always a good idea to use it anyway.
Resistors are cheap, mosfets and microcontrollers, not so much.