The Mets have agreed to a two-year contract with free-agent reliever Trevor May, sources confirmed to ESPN.