As part of Thursday's agreements, which avoided salary arbitration, each player would get a $50,000 bonus for making an All-Star roster or winning a Gold Glove.
Flaherty made $1.5 million last year and McFarlane $523,500.
Flaherty has provided above-average defense to compensate for an unproductive bat. He hit .217 with three homers and 15 RBI in a career-low 74 games in 2016.
McFarland was 2-2 with a 6.93 ERA in 16 relief appearances last year, when he was slowed by a left knee injury and made 13 minor league appearances.