A person familiar with the situation says infielder Casey McGehee has agreed to terms on a contract with Miami, where he played last year and won the NL Comeback Player of the Year award. McGehee, 32, was designated for assignment June 30 by the San Francisco Giants. McGehee lost his starting job at third base with the Giants to Matt Duffy and was demoted to the minors earlier this season.