McClain, 28, was released by the Baltimore Ravens last week. Entering the final year of his contract, he was due a $3.2 million base salary.
After beginning last season on the physically unable to perform list, McClain started 10 games, recording 52 tackles and one forced fumble.
The Syracuse product has played his entire career for the Ravens after going undrafted in 2008. His best season came in 2011, when he started all 16 games, notching 84 tackles, one sack, one interception, and four passes defensed.
At 6-foot-1, 245 pounds, McClain played inside linebacker in the Ravens' 3-4 scheme. His best fit with the Bills would likely be at middle linebacker in Jim Schwartz's system.
That could mean Kiko Alonso, who finished second in the Associated Press' defensive rookie of the year voting last season, could move to weak-side linebacker in the 4-3 alignment.