Jeff McFarland has an upbeat outlook on one of the day-to-day ordeals of suburban life: He is a contented commuter.

McFarland, a congressional aide, does not cope with rush-hour traffic, parking problems or exorbitant fares. Every workday morning, he boards one of Maryland's state-managed commuter trains at a railroad station near his Germantown home for what he describes as a quick, relaxing ride to work.

"For me," said McFarland, "it is absolutely perfect. I enjoy drinking a cup of coffee in the morning. The seats are more comfortable. It's faster." He pays $87 for a monthly ticket, markedly less than Metro's subway fares. He parks at the station for free. "It's by far the best way to get into town," he said.

McFarland is among thousands of Maryland riders whose devotion to the tiny commuter rail system has helped spark a turnabout. Five years ago, the rush-hour railroad was on the brink of extinction, facing ridership losses from the expanding Metro subway system and being threatened with drastic cuts in state and federal aid.

Today, the Maryland Rail Commuter Service, known as MARC, has won state and federal funds to stave off financial ruin, increased its ridership and improved its service. Millions of dollars in government money has been poured into buying new trains, building and renovating stations and expanding parking for the system, which serves commuters on routes connecting Washington with Baltimore and Frederick County.

For Montgomery County, the system is touted as a way to ease congestion in rapidly developing areas such as Germantown and Gaithersburg. "We're trying to get relief to the upper I-270 corridor," said Edward A. Daniel, a county transportation official, adding that the rail service is certain to attract new riders.

For Prince George's County, the system is hailed as a means of furnishing sorely needed transit service to outlying areas. "Almost all the stops are where Metro doesn't go," said county transit administrator Dee Allison. "Metro will probably never go to Laurel, Bowie or places like that."

Maryland is not alone in pushing for more commuter rail service for the area's booming suburbs. After more than a decade of studies and debate, Virginia officials say they are on the verge of launching a commuter railroad. It is initially slated to link Fredericksburg with Washington's Union Station.

The Maryland system, which recently added four trips, offers 32 trains a day on three lines, all terminating at Union Station. One branch extends from Brunswick, a Frederick County railroad town, and provides service to 10 stops in Montgomery, including Germantown, Gaithersburg, Rockville and Silver Spring.

Some passengers transfer from the rail system to the Metro system's Red Line at Rockville to get to Bethesda or downtown Washington. For others, the state commuter rail offers a direct route to Silver Spring from outlying areas. In contrast, Metro's Red Line reaches Silver Spring after a circuitous trip through downtown Washington.

The two other Maryland commuter branches follow the Amtrak and B&O Railroad tracks between Washington and Baltimore. The B&O route includes Prince George's stops at Laurel, Berwyn, College Park and Riverdale. The Amtrak branch has county stops at Bowie, Seabrook and New Carrollton. It also serves Baltimore-Washington International Airport.

According to State Railroad Administration statistics, passengers now take 7,100 trips a day on the three commuter rail lines. Ridership on the Amtrak branch has increased by 700 daily trips in the past two years to its current 2,700 total. The B&O Baltimore line accounts for 1,400 rides a day, 200 more than last year.

Patronage on the Brunswick line initially plummeted from 3,400 to 2,400 trips a day after Metro extended the Red Line to Rockville and Shady Grove in December 1984, but ridership later rebounded and now stands at 3,000 daily trips.

Most state commuter riders buy monthly tickets, paying as little as $52 a month to commute between College Park and Union Station. From Brunswick, the monthly rate is $119, From Baltimore's Penn Station it is $107, and from Bowie or Rockville the cost is $70. Parking at most state rail system stops is free.

In comparison, rush-hour subway trips on the Metro system cost up to $2.40 each way between downtown Washington and suburban stations, such as Rockville and Shady Grove. Parking fees at most Metro lots are $1 to $1.25 a day.

The system's advocates trace the state system's survival to a state legislative victory in 1981. Confronted with a vigorous lobbying campaign by train riders, the Maryland General Assembly prevented the financially pressed state Department of Transportation from curtailing commuter rail service.

Congress repeatedly has balked at the Reagan administration's efforts to halt federal subsidies. The system currently relies on federal aid to offset half of its $4.2 million-a-year operating deficit. The other half is provided by the state.

"Once in a while, citizens do win," said Merrill Hathaway, a federal lawyer who helped organize a train riders group that lobbied to keep the system going. Hathaway commutes from Bowie, a station scheduled for major renovation, including improved access and more parking. "It's a success story."

The system recently spent $27 million, mainly in federal funds, to buy 15 coaches and four high-speed locomotives. It has planned $13 million in improvements to stations during the next six years -- its "most ambitious effort to date," according to State Railroad Administration spokeswoman Kathleen Kujawa.

In Montgomery County, 425 more parking spaces are expected to be provided this year and next at Germantown, Barnesville and Dickerson. A new Metropolitan Grove station is scheduled to open next year near the state Motor Vehicle Administration office off Metropolitan Grove Road at the western edge of Gaithersburg.

The historic 95-year-old Dickerson station recently was restored. "We've already seen more riders in our little village station," said Inge Algel, a Dickerson commuter. "Couldn't be more pleased."

Other stations are to be improved, and the county's Ride-On bus system plans more service to the Silver Spring stop.

In Prince George's, the system plans to overhaul the Seabrook station next year and to relocate the Bowie stop to a more accessible site near Bowie State College. New underpasses will reduce hazards for pedestrians, officials say. Last year, a 77-year-old woman was struck and killed by a train at Seabrook.

A new South Laurel station, now being reviewed at public hearings, is targeted to open in four years. Officials say they eventually will add a station at Greenbelt, close to a proposed terminus of Metro's long-delayed Green Line.

The state rail system's supporters have applauded the moves. "Everyone has been delighted with the new coaches. They're nice and bright, and the air conditioning works," said Rolf Schmitt, a leader of the riders lobbying group. "The train is wonderful," said Sharon Cranford, a Gaithersburg commuter.