this post won't seem to reflect it but this matchup is 60:40 MK with an LGL (55:45 on FD/SV (SV only if the marth knows how to properly use platform cancel and has memorized the platform's pattern)/maybe BF). 65:35 without an LGL and the MK knows how to plank properly. 10:00 timer without LGL? idk, 10:00 with LGL makes this closer to a 55:45 though.
the #1 thing to stress in this matchup is a very solid ground game. you're gonna have trouble getting marth to jump some/a lot of the time. you are not only aiming to hit with forward tilts and aiming to hit with down tilts, but you're looking to work on a very tight reactionary spacing battle up close. once marth gains reads on the neutral, he is in a winning or at the very least even position vs metaknight simply because his character attributes tend towards taking momentum very easily provided the marth knows this MU and knows the angles/positions that MK has the most trouble getting out of once he's in them. marth is a character you can't afford to get hit by because he follows up very well. mix up a lot. best options in order imo are fsmash, grab, ftilt, dtilt, forward roll cross up, shfair (last two are close). i don't see proper tornado use very much in this matchup, so idk how good it is :<
another important thing to stress in this matchup is changing up horizontal/vertical juggle situations. marth has better horizontal mobility than you and takes advantage of MK very easily if you let him go parallel or below, better than most characters in the cast thanks to his excellent aerial mobility + range. you want to trick the marth to committing not only to attacks but to specific directions so you dictate when/where he goes in the air and when/where he lands. once you do that marth struggles to land a lot - and by struggle i don't necessarily means takes damage but gets into a lot of bad positions that frighten him if you take advantage of them opportunistically and passive/aggressively (i.e. sometimes hitting in the position and sometimes not so you condition certain reactions).
edgeguarding is a lot of rock/paper/scissors and a lot of position games rather than hitting games. it's good to hit marth offstage but the problem is overcommitment or shortsightedness. i'm not actually too sure on this one because my MK blows at edgeguarding/i haven't played against Kel's MK often enough and he's good at edgeguarding my marth (even though I have a lot of patterns while recovering). if you're not secure about offstage edgeguarding then the ledge trap (the proper one, not the one where you just use a lot of dumb nados and badly timed/mixed/spaced forward smashes that i see tons of MKs do nowadays...though it's getting better) is the way to go. stand just inside his roll, poke down tilt occasionally, mix up positioning (and charge, obviously) of forward smash while walking around to disguise when you start up, short hop and ff'd full hops used a little more than down tilt (baits shield getups and ledgehop aerials, both actions that are high on commitment and therefore not very good vs MK...caerful on those ledgehop aerials though, range is surprisingly good and rather deceptive), ftilt1 as much as you dtilt (riskier than dtilt though, misspaced and read = marth rising fairs from the ledge/gets more time to get up).
in terms of counterpicks, go wherever you're most comfortable. if you know how to properly abuse YI/LC timeout tactics that don't involve ledgegrabbing, those aren't bad choices at all especially since both of them are capable of messing with marth's aerial/ground games very easily though they both offer distinct advantages to marth. if norfair is available, avoid picking it unless you're REALLY good at timing out bceause marth's advantages are strong on that stage to the point where MK has a tough time dealing w/ it...at least in all cases i've seen. RC/brinstar? ehhh, brinstar > RC but it's not like marth is better than you on RC (just way underrated for marth and underpracticed by marth mains). chances are they'll ban brinstar though. frigate or delfino? i'd say delfino simply because of how gay having a lead is on there, lol.
recovering as MK. marth's ledge trap vs MK when executed properly is rock/paper/scissors vs MK. i dunno how to say something not obvious, lol...don't overuse certain options, make sure you use all of them, try to be as safe as possible, be patient, etc. one thing that's deceptive about marth's ledgetrap is the short hop though. if marth is very jumpy and properly mixes aerials and landings during his short hops, he is baiting nado, early getup attack, get up shield, get up roll, or ledge hop stuff; i don't mean stupid jumps i mean carefully timed/changed up (landing point + timing of aerial + spacing of aerial + fast fall or not) ones. the way to beat this is to time the getup attack when you think he's going to start the swing so that you catch him as he's landing. marths that are smart about their ledge trap are often smartest with their hops and are very surprised by this. even though he's baiting it, the ledgehop nado is still fairly useful in this situation if you're tricky and they have "meh" reactions. if the marth likes to walk around a lot it means they want you to jump or do a defensive action or keep resetting you to pressure. in this case you want to do the away ledgehop (i dunno how to describe the command sequence, lol, but it's noticeably different from just doing normal ledgehop and moving away after that) and see how they react, or getup->buffered ground action XX
this is just my perspective as a marth secondary/ex-marth main who plays this matchup a lot to help out a fellow marth as well observing different styles of MK through videos/gameplay at tournaments. i talked to mr-r about the ground game and how he should seek to "read the neutral" vs. MK and it worked very nicely for him against orion...if that lends any credibility to me xD