A novelist seeking a plot about a botched coup could not ask for anything better than last Sunday's Kenyan rebellion. But he might have trouble passing it off as something that could happen.

When lower-ranking Air Force officers moved out of their Nairobi base to try to overthrow President Daniel arap Moi they captured the national radio--a requirement of all coups--but they could not find any martial music to broadcast. So the brief chants of "power" in the streets were accompanied by the reggae tunes of Bob Marley and Jimmy Cliff.

They also only took the radio studios and neglected to attack the transmitting facilities, so the plug was soon pulled.

Lacking Army support, the rebels had no armor or heavy arms to take and hold key installations. Thus the coup was quickly and easily crushed by the Army and paramilitary forces.

In a few hours, however, hundreds of people were killed, thousands were detained, including most members of the Air Force, the university was closed because of student involvement, and rampaging looters helped themselves to about $50 million worth of goods.

Pessimists think the rebellion only confirmed the deterioration evident in this East African nation for the last few years and moved the country a long step in the direction of military government.

Little has been disclosed about the leadership of the coup. When the uprising failed, four Air Force men flew from Embakasi Air Base, where the rebellion began, to Dar es Salaam, Tanzania. A Tanzanian newspaper identified one of the escapees as a Col. Adipo and said he was the Embakasi commander, but diplomats and military attaches say they are not aware of such a colonel.

No politicians' names have been linked to the uprising, and tribal rivalries do not appear to have been a cause.

The brief broadcasts had no ideological content but there was a populist bent. A "People's Redemption Council" was to be formed--the same name used by Flight Lt. Jerry Rawlings in his coup in Ghana. Perhaps it was to be one of the new wave of African coups by middle-ranking, nonideological military men.

Air Force personnel are known to be more radical than their Army counterparts, partly because many have been trained at the university. In addition, many are annoyed that their technical skills do not bring them higher pay than that of soldiers of the same rank.

Even though a military coup has been put down, the result has been to thrust the Army into the center of authority for the first time since Kenya achieved independence from Britain in 1964 and became regarded as a model of stability and democracy on a tumultuous continent.

"In effect, the Army has been in power since last Sunday," said a Kenyan who closely follows the nation's political affairs. "I don't think we can move the Army out of the political life of the country."

Even with the Army holding unofficial power, he thought Moi's chances of being president a year from now were only 50-50.

For the last couple of years there has been growing concern about Kenya's deteriorating private enterprise economy, but the coup attempt now has tarnished its political image, perhaps permanently.

For the United States, the specter of instability in Kenya is a serious problem with global aspects since it is one of Washington's best friends in black Africa.

Despite some dissent on the home front, Moi has allowed the U.S. military to use Kenyan airports and the strategic Indian Ocean port at Mombasa for the Rapid Deployment Force, designed by the Pentagon to protect U.S. strategic interests in the Middle East and Persian Gulf.

The United States is spending more than $50 million to improve Mombasa harbor to allow giant American nuclear-powered aircraft carriers to berth there. With slightly less than $100 million in economic, food and military aid programmed this year, Kenya is third in Africa, behind Egypt and Sudan, as a recipient of U.S. assistance. There is $250 million in American investment in the country, second only to Britain among Western nations.

With the impact of the abortive coup bound to worsen an already serious economic situation, the United States is examining ways to pump in emergency aid. U.S. Ambassador William Harrop met with Moi Tuesday after delivering a message from President Reagan congratulating Moi on overcoming the coup attempt.

Some diplomats with a vested interest in keeping Kenya on a democratic course are hopeful that civilian rule will be maintained. They point out that the Army has been apolitical since independence, even to the point where military promotions are rarely announced.

Kenyans are also acutely conscious that they have been bordered on three sides by military dictatorships at varying times, particularly bloody ones in Uganda and Ethiopia.

"An elected government, no matter how corrupt or bad," the newspaper The Nation editorialized, is "in most cases preferable to a military junta."

The comment, however, had a double meaning in this country where the privately owned press has come under severe government pressure in the last year. The phrase "no matter how corrupt or bad" was placed in italics, to emphasize the dig at corruption alleged to be flagrant within the Moi government.

Critics, speaking privately, charge that a number of government officials have grown rich from siphoning off funds from real estate deals, massive showcase government projects and foreign exchange manipulations.

"Moi must crack down on corruption or the economy will go down the drain," a Western economist said.

"You can't have such a small affluent society when the great majority of the people are poor," said a long-time Kenyan resident while driving through the wealthy suburb of Muthaiga, where foreigners and a number of Kenyan officials live.

In recent months leading up to the coup, the government and its opponents, particularly university students and lecturers, had been on a confrontation course.

Faced with growing unrest, Moi detained opponents without trial in May for the first time since assuming the presidency in 1978 after the death of independence leader Jomo Kenyatta. Moi had won great favor by releasing Kenyatta detainees.

Seven people, including four university lecturers, are now detained. The first broadcast by the coup leaders proclaimed the release of the detainees, but the uprising was crushed before the men could be freed.

Moi also moved quickly to legalize the country's one-party system after long-time opposition leader Oginga Odinga talked about forming a socialist party. For all practical purposes, Kenya has been a one-party state for years but Parliament made it official in June, pushing a bill through all three readings without opposition in one hour and 45 minutes.

In a country that proudly proclaims its capitalism, some students openly announced that they were Marxists. A day of protest against the government was planned on the Nairobi University campus for Aug. 12.

The rising political temperature in the country may provide the best explanation of why the coup was so badly botched.

Probably the Air Force rebels simply believed that they could proclaim power and that the masses, supposedly fed up with Moi, would rise to their support and force the Army onto their side.

Except for groups of students who rushed out of their dormitories chanting "power," no such support was forthcoming. When failure was apparent, the Air Force rebels, students and the poor joined in an orgy of looting.

Latent anti-Asian feeling came to the fore with attacks on Asians' stores, homes and women. Asians say the assault on their community, which controls much of the economy, is likely to spur their exodus.

Even though the execution of the coup was botched, there is evidence of some careful planning. The timing was pegged to a period when most of the 13,000-man Army was on maneuvers near Lake Turkana in the northwest.

It is believed that the coup was originally set for this week, when Moi was scheduled to be in Tripoli, Libya, for the summit of the Organization of African Unity, but was moved up when it was feared the plot had been detected. That could explain the faulty execution.

Although the coup did not get public backing, Moi has made few public statements or appearances in the last week and few people have rushed forward to line up behind him publicly. A rally backing the president is planned Monday.

There has been no outpouring of letters to the editor of the newspapers proclaiming support as would be expected in this nation where jumping on the political bandwagon is normally the order of the day. Messages to Moi from foreign leaders have been the main sign of support.

Many analysts think that Moi, weakened by the coup attempt and beholden to the Army, will increase repression of dissent. Such action, they say, will just drive the dissidents underground and postpone more radical change.