Weekend riders on the MBTA's Worcester commuter rail line will be boarding buses for most of the summer as the public transit agency installs federally mandated infrastructure.

Free shuttle buses will run on weekends starting on May 26 as part of a two-phase infrastructure project. The buses will attempt to closely mirror the Worcester line's weekend train schedule.

The buses will run between Worcester and Framingham until June 17, with stops at all commuter rail stations in between.

Part 2 of project means no weekend train service between Framingham and South Station between June 23 and August 5.

The free buses will connect riders from Framingham and Wellesley Farms Station, and then to the Green Line's Riverside Station. From Riverside, riders can head to downtown Boston.

"There will be no train service or bus service to or from Auburndale, West Newton, Newtonville, Boston Landing, Yawkey, Back Bay, or South Stations during these weekends with customers encouraged instead to utilize nearby transit services or the bus connection at Riverside," the MBTA said in a release.