Building a Workstation (Piano Keyboard) PC DESK with MDF
Take a look at this online sag calculator to see the amount of sag you would get.

Using 18mm MDF shouldnt be a problem if you use a small amount of structural support.A relatively simple solution would be to fix 1 or 2 wooden beams to the underside of the desk and have them be supported by your side cabinets, which should provide enough support.



Another option would be to glue a second piece of MDF thinner than the width of your desktop to the underside of the desk top, in this way improving the strength.

Both options would not affect the aesthetics of the desk in general, as desks are usually quite low, so the viewing angle prevents you from seeing the relatively hidden structural support.

Of course if you are planning on placing the desk against a wall, you could always use a couple of L brackets to prevent sagging.