McClary was assigned to the 1st Battalion, 38th Infantry Regiment, 1st Stryker Brigade Combat Team, 4th Infantry Division based at Fort Carson, Colorado.
He was the fourth service member to be killed in the deadly blast.
The three other service members killed in last week's attack were from special operations units.
They were Army Capt. Andrew Patrick Ross, 29, of Lexington, Virginia, Army Sgt. 1st Class Eric Michael Emond, 39, of Brush Prairie, Washington, and Air Force Staff Sgt. Dylan J. Elchin, 25, of Hookstown, Pennsylvania.
Army Green Berets, Ross and Emond were assigned to the 1st Battalion, 3rd Special Forces Group (Airborne) at Fort Bragg, North Carolina. Elchin was assigned to the 26th Special Tactics Squadron at Cannon Air Force Base, New Mexico. Three other U.S. service members and an American contractor were also wounded in the attack
Three other Americans were wounded in the blast, including two service members and a contractor.
The service members were all riding in a heavily armored Mine Resistant Ambush Protected (MRAP) vehicle when the roadside bomb exploded. MRAP's are the standard patrol vehicle for U.S. forces in Afghanistan because of the protection they afford specifically for roadside bombs.
The incident marked the deadliest day for U.S. troops in Afghanistan this year.
McClary's death brings to 14 the number of American service members who have died in Afghanistan in 2018.
The deadly attack occurred south of the city of Ghazni, the scene of heavy fighting this August as Taliban fighters took over parts of the city. The city was retaken days later after heavy combat by U.S. special operations advisers sent to assist local Afghan forces.