Here in the heart of Brazilian farm country, where rich red soil has combined with years of plantation experience to help make this the world's leading coffee producer, the talk is of losers and winners in the 1986 coffee crisis and of bigger losses and profits possibly to come.

A six-month drought has destroyed more than half of Brazil's coffee crop, leaving many local farmers devastated while promising large financial gains for speculators with coffee beans to hoard, as the cost of a cup of coffee rises around the world.

Amid the rolling hills of this fertile region there is a vast network of growers, brokers, roasters, grocers and government officials involved in coffee production and sharing an interest in preventing coffee markets from turning into chaos.

High prices have already choked Brazil's traditionally heavy consumption of coffee, curbing domestic sales and prompting many restaurants and businesses to stop offering the customary free cups.

American consumers, who drink more than one-fourth of the coffee sold for import worldwide, are starting to feel the pinch as well. The wholesale price of coffee in the United States has risen from about $2.50 a pound in June to more than $3.50 last week.

International coffee sales, governed up to now by an international agreement due to dissolve in mid-February, face an uncertain future. A self-destruct clause in the agreement says that if coffee prices stay above an average $1.50 per pound for 30 days, and they have been well over that mark lately, the coffee agreement's export quotas for producing nations are suspended. It would then be every country for itself, with the 48 exporting states that signed the International Coffee Agreement free to dump as many sacks of beans as they can.

Coffee makers and marketers here worry about two things: On the one hand, they don't want prices to shoot so high that masses of consumers will abandon coffee for other beverages; on the other, they don't want prices to plummet in a coffee war that could collapse the coffee organization altogether and shrink the profits that Brazilian farmers and stockpilers still hope to earn on their remaining beans.

Under pressure to maintain some semblance of commercial order, Brazilian President Jose Sarney is scheduled to meet Thursday with Colombian President Belisario Betancur on the border between their two countries. Colombia is the world's second largest coffee producer and, with Brazil, carries considerable clout in the international market.

Whatever happens, Jose Soares da Silva is already one of the losers. Six rainless months in 1985 left his coffee trees lifeless. Instead of the leafy, six-foot-high trunks he is accustomed to seeing at this time of year, da Silva now looks out on a 30-acre holding of stunted bushes, in many cases little more than waist high, their thin branches baked bare by the sun.

With the ruin of da Silva's crop went the hope the 60-year-old farmer harbored of retiring this year and turning his small property, located on the outskirts of the town of Jales, over to his eldest son. A bad year is not one to quit on, nor to leave as an inheritance.

Da Silva feels cheated by coffee. Its reputation as a stable crop -- a sure cash producer, he thought, when he invested in it six years ago -- had captured his imagination and his money.

"I didn't expect to get rich, but I did figure on living more comfortably," he said.

His faith in coffee shaken, da Silva climbed onto a tractor one morning a few weeks ago and, with the help of two sons and two hired hands, angrily uprooted a portion of his dried-up crop. In that stripped field he sowed rice and corn, two late-planting crops that should yield enough to sustain da Silva in this difficult year, providing the rain, which finally began to fall this month, continues.

Valentin Viola is among this year's winners. He is the mayor of Jales, a modestly prosperous cluster of shaded streets and tidy houses set among undulating fields of volcanic soil, about 360 miles northwest of the metropolis of Sao Paulo.

In addition to running the local government, Viola is one of four middlemen in the area who buy coffee beans from growers and resell them to exporters.

The buyers make money by paying farmers less than exporters subsequently offer for the coffee beans. Growers sell to the middlemen during the September-to-December planting season to obtain cash to cover loan payments and finance the purchase of seeds and fertilizers. In September last year the going price for a 132-pound sack of cleaned coffee was 420,000 cruzeiros (then about $50). Today, such bags are worth 3.2 million cruzeiros (now about $290).

Viola denied allegations that he is hoarding coffee. He said he has already resold most of his stock for export. But Antonio Carlos Souza, the state agricultural office representative in the area, suspects the mayor, as well as other middlemen, large growers and exporters, of squirreling away large amounts of coffee, waiting for world prices to rise even higher before unloading the precious bags.

Not since 1963 has there been a Brazilian drought as destructive as the one that began in mid-1985. Rainfall was far below normal in four key agricultural states -- Rio Grande do Sul, Santa Catarina, Parana and Sao Paulo -- killing coffee and reducing yields of corn, rice, oranges and soybeans by a fifth and the output of cotton and beans by more than 40 percent, compared with 1984 production. Cattle are bone-thin from lack of pasture, and milk production is down. The government estimates that drought losses nationwide will exceed $9.1 billion.

The slump in agricultural output is expected to depress Brazil's economic growth rate this year, compared with 1985, when it reached an impressive 7.4 percent. Higher food costs due to poor harvests will feed Brazilian inflation which, at 230 percent last year, was among the highest in South America.

Brazilian officials also are concerned about the 500,000 or more migrant farm workers who will have nothing to do during the harvest season several months from now. As a possible harbinger, about 200 migrant laborers seized the city hall in a town near here two months ago, demanding that the government find work for them. After police forcibly removed the demonstrators, state officials ordered a temporary make-work program to employ some of the migrants.

The disaster in the countryside is also likely to complicate Sarney's agrarian reform plan, already a subject of political controversy. The plan, scaled down from more ambitious first drafts, calls for 1.4 million would-be farmers to be given land in undesignated areas totaling 172,000 square miles over the next four years. But if existing growers are having trouble paying bills because of the drought, the government's drive to give property to the landless may well find itself slowed further.

While thousands of farmers and consumers suffer the effects of the drought, the coffee shortage has one partially compensating feature for Brazil's balance of payments. Skykrocketing coffee prices mean higher export earnings for Brazil on sales of coffee left over from last year's ample harvest and surviving this year's scorching weather.

Industry experts say Brazil has about 27 million coffee sacks in storage, and 15 million more are forecast to be harvested this year, compared with a harvest of 32.6 million in 1985. Economic analysts estimate that Brazilian coffee sales abroad could earn $4 billion in 1986, compared with $2.6 billion last year.

Hard currency gained from coffee sales will offset the expensive purchase of foreign rice, beans, corn, milk and meat that Brazil must import to substitute for damaged crops. To free as much coffee for export as possible, the government has allowed domestic coffee prices to climb steeply.

"Coffee is not essential, it's only a custom," said Minister of Commerce and Industry Roberto Gusmao, recently advising Brazilians to buy beans and grind them themselves if they really must have coffee.

Coffee experts also fretted about the long-term harm the drought has done to Brazil's crop. Damaged trees have required either pruning or uprooting, and some analysts forecast a depressed 1987 harvest as well.

Without government financial assistance for replanting, more growers like da Silva, it is feared, will abandon coffee. Corn stalks, rice plants and sugar cane already can be seen sprouting beside coffee bushes in this region, reflecting a diversification from other crops in what was once Brazil's main coffee-producing state.