My feeling is not to make a big deal out of getting a name, regular customers never care and don't ask.
Look for Server's name tag, if covered, wait till end and thank her by saying, "what's your name", Megan,
thanks Megan, enjoyed the meal....otherwise, it's a huge giveaway, who makes a deal over a Server's name.
Most of the time for casual restaurants, name tag is on, not a problem. Grocery stores I do, if no name shown,
a description is enough. You can't run through the store asking for everyone's name with 5 or 6 interactions.
Interesting the wide range of different approach's to MSing.
Live consciously....