Metal Gear Solid 3 (PS2) Metal Gear Solid: Portable Ops (PSP) Metal Gear (MSX, NES, with the MSX version being the "true" version of the game. This was also included with MGS3:Subsistence) Metal Gear 2: Solid Snake (MSX, also included with MGS3:Subsistence. There was an NES game called Metal Gear 2: Snake's Revenge but it's non-canon) Metal Gear Solid (Playstation. Was remade as MGS: The Twin Snakes for the Gamecube, but I think the Playstation version is still considered the "true" version of the game as far as storyline goes.) Metal Gear Solid 2 (PS2) Metal Gear Solid 4 (PS3)
There were also a few other Metal Gear games such as the aforementioned Snake's Revenge, Metal Gear: Ghost Babel (a Gameboy Color game released as Metal Gear Solid in North America) and the Metal Gear Acid games. None of these are part of the main Metal Gear continuity. Both Snake's Revenge and Ghost Babel are alternate timelines branching off of the first game. I haven't played any of the Acid games so I'm not sure where they branch off from the main continuity.