BOSTON -- One reason for Gov. Michael S. Dukakis' surprising early foot in the Democratic presidential congestion is his campaign treasurer, Robert A. Farmer, a man who loves to raise money.

"I've known a lot of people who could raise money," says John Sasso, Dukakis' young campaign manager, "but I never knew anyone who enjoyed it so much."

Farmer, a tall man who will be 49 this month, has a bland manner that conceals a zealot's drive and the single-mindedness of a bill collector.

In his first quarterly report to the Federal Election Commission, the Massachusetts governor put down $4.2 million, twice as much as any of his six competitors during the same period. For the next quarter, including the usually unproductive summer months, Farmer set a goal of $3.3 million.

"The money has made Dukakis competitive all over the country," said Kirk O'Donnell, who was counselor to then-House Speaker Thomas P. (Tip) O'Neill Jr. and now heads the Center for National Policy. With his war chest, Dukakis has been able to hire staff nationwide and to set up campaign offices in 19 states. He is giving notice he will contest for every Democratic vote from South Boston to southern California.

In one historic night, June 15, at a local kickoff salute to the governor, Farmer raised $2 million, which, if peanuts to Republicans, set a high in Democratic annals. Boston politicians still speak of it with awe: "No supper, not even a place to sit down." Yet about 2,500 people paid $1,000 apiece to stand around nibbling on scanty hors' d'oeuvres and marveling at the turnout.

Farmer had rounded up 200 people to make the calls. His operatives told disappointed local fans, who had wanted to give house parties, that they had to make the sacrifice for one gigantic event to show a doubting country that this was "a national campaign."

On Sept. 29, Farmer is planning this quarter's local tribute at the World Trade Center. Some will pay $1,000 for admission, others $100. The core organizing group comprises the $1,000 contributors to the June event. No reason, Farmer tells them briskly, that just because they have given the legal limit, they can't solicit their friends.

Farmer's ripple reach-out technique is based on his thesis that "there are 234 million people in this country and most of them have not been asked to participate in a presidential election."

Although the weapon of choice for fund-raisers is usually the telephone, Farmer travels the country like a candidate, meeting around the clock with "people of influence, prestige and stature in their communities."

Democratic National Committee Finance Chairman Don Sweitzer once watched Farmer in action. "He brings in people who are comfortable and have made a few bucks and want to try something else. He presses. He disarms. He smiles . . . . He tells them, 'When this is over and Dukakis is in the White House, you can sit back in your living room and tell your kids you had a hand in electing him.' "

Those who agree to serve on the large Dukakis finance committee soon find there's nothing ceremonial about it. When Farmer ran the 1986 DNC gala, which brought in a record $1.7 million, he corralled Democratic senators as finance committee members. He did not hestitate to dun them, either.

Farmer is a native of Ohio, son of a well-to-do Republican sand merchant. A Republican himself, he made his first million before he was 40. As a student at Harvard Law School, he founded a successful workbook publishing company. He retired five years ago because he "wanted to get involved," a friend said. In 1980, he raised Massachusetts money for independent John Anderson, and in 1984, was treasurer for Sen. John Glenn (D-Ohio).

He met Dukakis in 1979 when the governor, turned out of office after one term, was in exile at Harvard's Kennedy school of government. He offered to help him. He was at the cash register for Dukakis' 1982 comeback and has been there ever since. He believes in Dukakis, cites his philosophy of economic opportunity and open communication. He calls him "a Democrat who can win."

Said Tom Mathews, a veteran Democratic politico who got to know Farmer during the Anderson effort, "Bob is good because he has no agenda but his candidate."

Phil Schaefer, a San Francisco broker and Democratic money man, recalls that after the Gary Hart campaign in which he was involved evaporated, Farmer called him. Farmer invited him to the June 15 gala, bade him to speak from the platform, arranged an interview with the governor under the Paul Revere chandelier -- and signed him up as a finance committee member.

"He's inclusive; he's charming," Schaefer said. "But you pay the price."