From best to worst:
1. MGS 3: The third entry in the series had a weaker set of villains than the first, but almost everything else was stellar, despite the story being heavy handed it was still pretty solid. A good mix of serious story beats mixed with the usual MGS brand wackiness and jokes. The gameplay is still solid and I would consider the best of the MGS series. The Cobra unit, Ocelot, and Volgin are some of the best villains in the series, only really exceeded by FOXHOUND and Liquid from 1. The gameplay segments were also lengthy but still broken up by its entertaining story.
2. MGS 1: Easily the second best in the series, only really for the aging gameplay that doesn't quite measure up to 3. The Twin Snakes remake is also solid with gameplay and graphics improvements that save the game from the same kind of jarring effect a lot of PS1 games experience when trying to go back to playing them. FOXHOUND still sets the standard for MGS villain teams, and the likes of Psycho Mantis still remains one of the best mind screws in MGS games today. As others have said, like 3, the story manages not to get too zany or up its own ass with messages.
3: MGS 2: This is kind of a love it or hate it kind of game, I didn't mind playing as Raiden, but he just wasn't as cool as Snake, and the rest of the game just doesn't measure up to that awesome first tanker chapter. It doesn't help that Dead Cell is mostly composed bosses that just can't hold a candle to FOXHOUND or the Cobra unit, I would say they are even more lackluster than the B&B unit from 4, only Vamp manages to stand out in my mind. Solidus was ok, but he was no Liquid snake. The Big Shell was also kind of just a boring map compared to Shadow Moses, all that orange just became samey and dull after awhile. What saves this game from the bottom slot is that Big Shell was still an open space with large chunks of gameplay that managed to stay entertaining throughout, the final sword battle atop Arsenal Gear was also a nice finale. The story got weird towards the end, but ultimately still ok.
4:MGS 4: I wanted to like this game at first, the first two acts are fine, great graphics, sensible if still silly story, and good chunks of gameplay that featured the classic MGS action with some fun new tools and weapons. Then the gameplay falls off a cliff after the motorcycle chase in Europe, you end up with pathetically short gameplay segments punctuated by excruciatingly long cutscenes. There was an infographic on r/metalgearsolid a few days ago, that showed the amount of cutscenes in the game and how long the average cutscene was, for all the other MGS games, the average cutscene length was about 4-5 minutes, for MGS the average length was 9 minutes, with the larger ones being a series of scenes 20+ minutes long.
I can stand a lot of cutscenes when there's enough gameplay in between to justify it, in a 50 hour game, 7 hours of cutscenes is just fine, but in a game where the gameplay is about 15 hours, filling up 7 of those with cutscenes makes it feel like I'm watching a movie rather than playing a game. the last 2 chapters feel almost embarrassingly short, with a lame sneaking sequence back on to Shadow Moses where you are mostly sneaking past unmanned drones, and the final level on the submarine that seems to just be one hour long gameplay sequence between the intro and outro cutscenes that goes right in to the even longer epilogue cutscenes.
Coupled with the kind of lame B&B corps, and Ocelot being the only other villain made for one of the weakest boss lineups in the series. It doesn't help that the story never seemed that interesting either.
The gameplay parts that were there were good, but I don't think I've ever played another game that seemed so hellbent on having me watch it rather than play it.
For the spinoffs, I would probably place Peace Walker between MGS 3 and 2, and the ACID games right around MGS 2 on the list.