The 'Star Girl' band will play a free gig as part of the festival of shows that will be held at Hyde Park during the London Olympics in July and August.
McFly's show will be held at Hyde Park on August 4. The event will be free to enter on the day subject to capacity.
The festival kicks off with the BT London Live Opening Ceremony Celebration Concert on July 27, which will feature performances from Stereophonics, Duran Duran, Paolo Nutini and Snow Patrol.
Feeder, Sir Tom Jones, Dodgy, Cast, Levellers, the cast of We Will Rock You, Amy Macdonald, Paul Carrack and Kenny Thomas are the other acts to have been confirmed for other free shows between July 28 - August 11.
Giant screens will be used at Hyde Park during the shows so that people can watch the live Olympic events.
Blur, The Specials and New Order will then headline the closing ceremony gig at Hyde Park on August 12.
McFly's Harry Judd recently confirmed his engagement to violinist Izzy Johnston, while Tom Fletcher married Giovanna Falcone earlier this month.
Watch the video for McFly's 'Star Girl' below: