The 49ers made their second trade of the second day of the NFL Draft to acquire Rice tight end Garrett Celek.
San Francisco moved up to the No. 55 overall pick in the second round to take McDonald. The 49ers gave up picks No. 61 and No. 173 (sixth-round) to the Green Bay Packers.
The 6-foot-4, 267 pound tight end caught 36 passes for 458 yards and two touchdowns as a senior. He posted impressive numbers at the 2013 NFL Scouting Combine, too.
McDonald ran a 4.69, 40-yard dash to go along with 31 reps on the bench press and a 33.5-inch vertical jump. McDonald led all tight ends at the combine with the best performance in the bench press.
The first-team Conference USA performer started 28 of 48 games at Rice. He caught 119 passes for 1,504 yards (12.6 yards per receptions) with 15 touchdowns. McDonald's 119 receptions ranked sixth in school history.
McDonald was voted as a team captain in 2012 and played in the Senior Bowl.