The MTA will offer discount commuter rail tickets for trips within New York City funded by the taxi congestion fee, The Post has learned.

Beginning as soon as May 1, such Long Island Railroad and Metro-North trips will be discounted 10 percent, while LIRR riders who use monthly tickets will pay 20 percent less, transit officials said Friday.

The commuter rail discounts fulfill a years-long effort by politicians and advocates to bring commuter rail fares in the city closer in line with the $2.75 subway fare. Most commuter rail trips between Penn Station and the outer boroughs currently cost $4.50 to $10.75, depending on the day and time.

Many commuter rail stations are in neighborhoods not served by the subway. Railroad trips from neighborhoods that do have subway stations take significantly less time, but at a higher cost to the rider.

“The commuter rail infrastructure is low-hanging fruit,” said Danny Pearlstein of Riders Alliance advocacy group. “Making it more accessible to New Yorkers gives people more options, especially in neighborhoods that are far from the subway.”

The commuter discounts — which the MTA said will begin as a six to 12-month pilot — build on the popular Atlantic Ticket program, which offers five dollar fares for trips between select stations in Southeast Queens and Brooklyn.

The funding comes from a $50 million annual “outer borough transportation account” created as one outlet for the $415 million expected to be raised annually from controversial taxi fees passed by the state legislature in 2018.

Among the other projects receiving money: a Henry Hudson Bridge toll rebate for Bronx residents, a Cross Bay Bridge rebate for Queens residents and a long-standing discount for Staten Islanders who drive over the Verrazzano Bridge.

The fund will also help support outer borough bus service improvements and a pilot program in the works to provide for-hire vehicles to late-night commuters.

The full list of funded items was determined during last year’s budget negotiations between Gov. Andrew Cuomo and state legislative leaders, but had yet to be made public before Friday. The MTA board will vote on the commuter rail discounts when it meets next week, MTA spokesman Ken Lovett said.

Lovett said final dollar amounts for each item have yet to be determined.