THat will not work since the MCU pin voltage is referenced to ground, and the PMOS gate-source voltage is referenced to the MOSFET source (which is 12V). So the MCU pin will not properly control the PMOS if it is directly connected (it will never be able to turn the PMOS off). Also, even if you could directly connect the MCU pin to the PMOS gate, it would invert the logic output (MCU LO produces HI signal, and MCU HI signal produces LO signal). This is because a PMOS turns on when the gate voltage falls below the source pin voltage by a large enough amount (the opposite of NMOS).
You would need a pull-up resistor and a pull-down NMOS to drive the gate of the PMOS, and the MCU drives the NMOS. This will also correct the logic inversion.