The deal was announced by the team Monday night.
The 6-foot, 209-pound Coffee, out of Alabama, is expected to be Frank Gore's backup this season in coach Mike Singletary's power running offense. Coffee ran for 1,383 yards and 10 touchdowns last season for the Crimson Tide. He finished his collegiate career with 2,107 yards on 410 carries with 14 TDs, and 42 catches for 351 yards and two touchdowns.
First-round pick wide receiver Michael Crabtree remains San Francisco's last unsigned draft pick. He could hold out when the team hold its first training camp practice Saturday.