The rules aren't embedded into the client; it's "just" a virtual tabletop where you enforce the rules the same way you would playing with a friend in person. Cards have to be imported but it's fairly automatic (basically just clicking a few buttons after startup), so you could either only import the sets you want or just not use the ones you don't want (which is also how it tends to work when playing informally in person; it's not like you usually have a judge to enforce that you or your friends are playing by whatever rules you agree to).
FOSS Magic clients are in a legal gray area at best. My mental model is that Wizards de facto tolerate clients like XMage and Forge because their UX is awful, but if you made something that's actually as user-friendly as MTGO/Arena, they'd sue you and you would lose.
No individual card text (limited to just the mechanics) is copyrightable but the setlist of cards might be. It would come down to how much creativity went into curating the list of cards that is released. It gets especially murky because new cards are always being released and old cards are being retired, so they obviously put a lot of creative energy into that process. You'd have to avoid pre-made decks as well.
Unless you have funding from an eccentric MTG-loving billionaire, I see why you'd comply with the cease-and-desist.
Hasbro had the legal president too, as they were involved in the Scrabble lawsuit, which I think is mostly where the concept of not being able to use patent law for game rules, but did set the trend on aggressive trademark interpretation.
I expect the genie is mostly out of the bottle at this point. I'm fairly confident that people can do X and Y actual illegal things on the Internet, we can have our card game, but I hope it can happen with a site or decentralized system easier than doing on Tor.
Best to do this stuff in person I find.