The left-handed pitcher joined the Mets from Triple-A Buffalo after Sunday's 6-5 loss to the Yankees, while Vinny Rottino was designated for assignment.
Hampson, a 32-year-old who's fought through shoulder surgery to return to the Majors, was 4-2 with two saves and a 2.13 ERA in 28 games at Buffalo.
"It's definitely a privilege to be here," Hampson said. "It's not given. It's something that can easily never happen again. You've got to take advantage of it.
"I'm very excited. It's been a long couple years coming back from surgery and continuing to play and hope for an opportunity and look for something to open up."
Mets manager Terry Collins said the addition of Hampson will allow him to use Tim Byrdak in key situations against left-handers, while Hampson can be used in the middle of the game to get out of jams.
"I'm sure, hopefully, he's excited to here," Collins said. "I'm sure he'll be a little nervous, but he's been on this stage before. He knows what he has to do."