HYANNIS, Mass. (AP) _ Long before Cape Cod's annual summer tourist migration started this Memorial Day weekend, resort operators had put aside weather almanacs for want-ads.

Their big concern: finding enough help.

''If you don't get good service, you don't have a good vacation - you have hell,'' said Walter Goodwin, owner of the 400-seat Grandma's Restaurant in Bourne.

Already, employers are making special arrangements to hire foreign workers from as far away as Brazil and the Philippines, and college students and older people from Colorado and Texas are arriving by the score to claim the jobs.

Even so, there are too few hands to go around, and the problem is not new. Goodwin said he lost $8,000 a week last summer when he had to shut part of his dining room. He could not calculate how much was lost due to over-worked and short-tempered waitresses.

Over at the 261-room Sheraton Hyannis, night manager Edward Dennis sometimes finds himself pushing a vacuum cleaner and working in the kitchen just to keep things moving.

''We're getting busier, but the help situation is getting worse,'' said Dennis. ''If it doesn't get any better, people coming down to the Cape aren't going to come back. You can't just start giving excuses to the guests.''

The problem is even hitting the beaches. In Orleans, a shortage of lifeguards might restrict swimming and crimp parking revenues.

The problem comes as no surprise: Nationwide, the pool of prospective workers aged 17-25, usually college students, is shrinking; and on the Cape, the steep cost of housing, with monthly rents starting at $600, scares many away.

But local restaurateurs, hoteliers and others in the leisure industry were galvanized into action by a report last November that said 14,000 seasonal and year-round jobs on the Cape and nearby islands went vacant last year. The list included spots that employers would have created if workers had been available. The report estimated the worker shortage translated into $47 million in lost revenue.

''There is now widespread fear that the traditional peak (May-October) will bring ruinous results in 1988,'' said the report by the Cape and Islands Labor Shortage Task Force. Based on a survey of 254 businesses, the report on labor trends was commissioned by a coalition of the New Bedford, Cape Cod and Islands Private Industry Council, the Office for Job Partnerships, and the Cape Cod Chamber of Commerce.

In an effort to find workers and keep them, business groups this year held job fairs, instituted one-stop job shops that offer employment plus housing and appealed to local residents to open their homes. There also were mass mailings to colleges and universities in the Midwest and Southwest, said Michael Frucci, executive director of the Cape Cod Chamber of Commerce.

Some took action on their own: Motels turned rooms into dormitories, and one restaurant chain bought houses to convert into worker dorms.

A Hyannis company is offering to untangle the red tape to allow Brazilians to get temporary work permits and restaurants and hotels to legally employ them.

Local employment specialists estimate at least 3,000 foreigners, chiefly Brazilian and Irish, are already working illegally on Cape Cod, but the Immigration and Naturalization Service says it will crack down this summer.

''The honeymoon is over as far as the Cape is concerned,'' said Timothy Whelan, deputy director of the Boston INS office.

A one-year grace period began last June 1, when citations were issued to employers found using illegal aliens. Starting Wednesday, employers risk fines of $250 to $10,000 per employee for repeated offenses. After the third offense, they risk criminal charges.

Employers can apply for temporary certificates to employ foreigners for seasonal work if they can prove no Americans can be found to do the job. Whelan said the INS had received 600-700 applications for the certificates, which must also go through the Department of Labor, and most were approved.

But there still is housing to contend with.

When Goodwin, the owner of Grandma's, counted up 50 job vacancies for this summer and only 12 applicants, he bought a $150,000 three-family home to house workers. He also made deals with local motel owners. The motels will rent their $70-a-night rooms to Goodwin's staffers for just $75 per person per week, provided they do their own housekeeping.

''There's a little bit of desperation,'' Frucci said, noting that inquiries from potential vacationers were up from last year. He credited a robust economy in the East and the dollar's decline, which makes a vacation at home more appealing than an overseas trip and also lures Canadians over the border.

Krista Hayes, employer services manager for the Office of Job Partnerships, said she was encouraged by the results of efforts to find workers.

''We showed the employers there are labor sources locally, and out of state, we talked about labor certification for foreign temporary summer workers,'' Mrs. Hayes said. ''Many have been approved and have their foreign workers here. A lady from Colorado has brought students here. I just can't help but say it's got to be better than last year.''