See #1585
The MenuItem definition uses function for isToggled, isVisible and isEnabled. As these are not serializable, it its not possible to configure these settings for server-provided context menu items.
Instead of functions this should be boolean flags which get converted into functions at client side.