Cats have very sensitive noses and hate certain smells. Some smelly things are toxic - lavender, eucalyptus - but rosemary, thyme, and banana are cat-safe.
I'd guess a few dabs of essential oil on your MBP would discourage those inconvenient cat snuggle attacks.
What did work so in my case, is working on a laptop at the dinning table, because the cat knows the table is a no-go zone, at least when the humans are there. Well, it works most of the time, sometime curiosity is too strong.
Positive: put a specific cat trap on your desk or nearby. The lid of a box of printer paper, or anything similarly sized; a folded towel.
Negative: put a hard dust cover on your keyboard when you aren't using it. Now it's an uninteresting hard surface.
...that they will then sit on, because it still fits the shape of "box."
Everyone is missing the point that the keyboard itself is rectangular/box-shaped. It delineates the boundaries of a territory they can occupy and claim for themselves. Get one of those ergonomic "wave" keyboards that aren't perfectly flat and I doubt they would sit on them.
They like laptop keyboards even more. Not only are they boxy, they're heated.
Then when she's bothering me it's usually attention she wants.