McDermott coached the linebackers last season, helping Omar Gaither and Chris Gocong develop into full-time starters. He takes over for Harbaugh, who left to become head coach at Baltimore.
Bill Shuey moves from defensive quality-control coach to linebackers coach. Mike Caldwell will replace him, and Otis Smith will be the assistant secondary coach.
McDermott previously served as secondary coach from 2004-06.
Smith and Caldwell spent time in Philadelphia during their NFL careers and were coaching interns with the Eagles last season.
A veteran of 26 seasons as a coach on both the collegiate and professional levels, Whipple spent his last three (2004-06) as the Pittsburgh Steelers quarterbacks coach.
The Associated Press contributed to this report