The 49ers have signed wide receiver Max McCaffrey to their 53-man roster off the Packers’ practice squad, a league source said.

McCaffrey is the older brother of Panthers rookie running back Christian McCaffrey and his dad, Ed, is a former NFL wide receiver who was a Stanford teammate of 49ers general manager John Lynch. In addition, the McCaffrey family has ties to 49ers head coach Kyle Shanahan.

Ed McCaffrey spent the final nine seasons of his 13-year career with the Broncos when Mike Shanahan was the head coach. Kyle Shanahan, who was a wide receiver at Duke and Texas, would run routes with Ed McCaffrey and Broncos wideout Rod Smith when he was in high school.

Max McCaffrey, 23, entered the NFL as an undrafted free agent with the Raiders in 2016 after he had 117 passes for 1,341 yards and 12 touchdowns at Duke. He has also spent time with the Saints and Jaguars. He was with Jacksonville for five games this season and had a one catch for four yards.

The 49ers have not announced a corresponding roster move. Undrafted rookie wide receiver Victor Bolden was sidelined with an ankle injury in a win at Houston on Sunday and could be a candidate for injured reserve with just three games left in the season.

The NFL Network first reported the 49ers’ signing of McCaffrey.

Twitter: @Eric_Branch