Last year it sounded like a good idea: use $8 million to transform surplus military buildings into shelters for the homeless.

A cooperative venture involving the Army, local governments and nonprofit community groups, it would attempt to tackle one of the nation's most perplexing social problems -- the countless people who sleep in the streets, on sewer gratings and in subway tunnels.

Now, a little more than a year later, a small fraction of the $8 million has been spent on shelters, and only two of a possible 600 sites are housing homeless persons. The result has been a round of finger-pointing among Congress (which authorized the money), the Army (which owns most of the sites), local governments and community advocacy groups that deal with the homeless.

A brief survey of a dozen proposed shelter sites produces almost as many explanations for the plan's failure.

*In the middle-class Bay-area suburb of Mountain View, Calif., the city council rejected the Army's offer to turn one of its reserve facilities into a temporary shelter. In the words of councilman and vice mayor Jim Zesch, "We were concerned about becoming a magnet for homeless people from the entire area."

*In New York, the Army and Mayor Edward I. Koch agreed to open a new homeless shelter in northern Queens, using the Army's old Fort Totten. But no one bothered to tell the residents of Queens, who asked Rep. James H. Scheuer (D-N.Y.) to intervene. Scheuer telephoned Defense Secretary Caspar W. Weinberger, and within hours the project was canceled.

*In Tallahassee, Fla., the Army reserve facility was instructed in July 1983 to inform local authorities that the facility would be available as a shelter. "The city hasn't contacted us," said Janet Linthicum, a civilian employe at the reserve center. When told by a reporter that the Army facility was available, Tallahassee Mayor Kent Spriggs said: "Well, they haven't told the mayor."

*In Baltimore, the Army offered an unused barracks building, but the city was unable to come up with the money to operate it. Pat Bernstein, press secretary to Mayor William Donald Schaefer, said, "Just giving us a building without funding doesn't do us a lot of good."

*In Indianapolis, Lt. Col. Terrance Cooper at Fort Benjamin Harrison, an Army training base, said that when the notice came to make shelters available "we immediately went to the city and to the service agencies, and we were told that there wasn't a need." But Debbie Holt, the deputy clerk to the city-county council, said, "I never heard anything about this." The head of the Community Services Council, Jim Stout, said, "We do need shelters here in town."

The Defense Department's commitment to the shelter program was questioned this month when the General Accounting Office told a congressional subcommittee that $7.1 million of the $8 million approved for the program had been used for routine defense maintenance. The Pentagon responded that it had offered shelters in 600 communities, but were rebuffed by local officials.

Gerald B. Kauvar, the Defense official in charge of the homeless program, produced a list of 350 proposed Army shelter sites. A total of 208 places on the list are said to have rejected the idea because of "no funds." Another 45 are listed as "no response." The others are listed either as not needing shelters or as turning down shelters for a variety of specific reasons, such as not being available around the clock.

"In many cases, the local community group was made an offer, and they said they didn't have any funds," said GAO's Paul Wright, who prepared the critical report. "On the other hand, some people say the offers were made cynically . . . . I think local base commanders in some instances did not pave the way. In other instances, the local base commander paved the way but the community group couldn't come up with the money."

A survey of just a few proposed sites suggests that the situation may be a bit more complicated, reflecting in part the decentralized nature of the program. Hundreds of local base commanders and civilian Army employes were dealing individually with hundreds of local officials, often by word of mouth and with few clear guidelines from Washington. This year, Defense officials moved to centralize the shelter program in the Pentagon.

Many of the sites on the Pentagon's list are in small towns that have little or no need for a shelter. Jim Meldrem, the senior civilian official at the Army Reserve Center in Ames, Iowa, for example, said he received the order from Washington, but added: "When you get out here in the boondocks, we don't have people sleeping under bridges and in doorways. They just plain don't need it." The head of the local Red Cross agreed.

Military facilities tend to be located far from the center city, therefore far from the homeless "street people" the shelters are supposed to serve. In Richmond, for example, Sandra Wagener of the Richmond Emergency Shelter said the military building offered to that city was on Wallops Island, far away in the Atlantic.

"There was one offered, but it was like 350 miles from God," she said. "It was nowhere near Richmond. It was not an appropriate shelter for the Richmond area. I would have to have Greyhound buses and drivers and $5,000 for transportation."

Defense officials repeatedly cite Mountain View, Calif. -- a relatively affluent city of 60,000 -- as an example of how the Army was rebuffed by local officials who do not want to shelter the homeless in their communities.

The Army offered an old World War II barracks, roomy enough for up to 38 people. But in March 1983 the seven-member council rejected the idea, contending that nearby San Jose has the greater number of homeless people.

Defense officials say Mountain View vindicates their use of the money on other things.