David Canter, who represents McCain, announced the signing on Twitter.
Antwon Blake is expected to return after the Steelers offered him a $1.554-million contract on Monday. Blake is a restricted free agent and the Steelers have a right to match any offer made to him.
The Steelers are also expected to take a cornerback early in the draft.
McCain, 28, resuscitated his career after signing a one-year contract for the veteran minimum last March. He opened the season as the Steelers’ No. 4 cornerback, but the 5-foot-9, 187-pounder ended it as a starter because of injuries and ineffectiveness at the position.
McCain tied Gay for the team lead with three interceptions despite starting only eight regular-season games.
McCain's 22-yard interception return for a touchdown helped the Steelers stave off an upset bid in a 17-9 win at Jacksonville in early October. Besides his three interceptions, McCain recorded 24 tackles and defended five passes. He also recovered a fumble.
McCain spent his first five seasons in Houston, but fell out of favor with the Texans and they released him after the 2013 season.