The Reagan administration charged last night that Nicaragua "may be directly involved" in plans to attack Americans in neighboring Honduras, and has warned the Sandinista government that the United States will "react accordingly" if such attacks are carried out.

The U.S. warning, contained in a note using exceptionally strong language, also tied the Sandinista leadership indirectly to the assassinations June 19 of six U.S. citizens, including four marines, at an outdoor cafe in San Salvador, saying Nicaragua has supported and influenced the Salvadoran rebel group that claimed responsibility. The note warned of "serious repercussions" if any such incident happened again.

The note, presented last night to the Nicaraguan Foreign Ministry by U.S. Ambassador Harry Bergold and made public today by Nicaraguan officials, produced a sharply worded reply by the Nicaraguan Foreign Ministry that was delivered to the U.S. Embassy here tonight.

Nicaragua called the U.S. accusations "absurd" and charged the Reagan administration with "intolerable threats" and seeking to create a pretext for "direct military aggression against the Nicaraguan people."

"Nicaragua rejects any suggestion at all of responsibility for what happened June 19 in San Salvador or in any other similar situation that could occur in that or any other country," the Foreign Ministry note said. "These are things we neither do nor promote."

The Nicaraguan reply also accused the Reagan administration of practicing "state terrorism" by organizing and financing anti-Sandinista guerrillas who have been fighting to overthrow the government here for more than three years. It suggested that if the United States has proof of Nicaraguan complicity in terrorism, Washington should take its case to the World Court in The Hague.

In Washington, administration officials refused to spell out the nature of the possible U.S. response to further terrorist-type attacks in Central America, Washington Post staff writer Joanne Omang reported. But they said the note was not intended to presage any U.S. military effort.

"The intent is very clearly not to lay the basis for some action, but to prevent action that would otherwise occur," one State Department official said.

He said the warning was intended to refer to terrorist acts against any U.S. citizen, not just officials, and to refer only to acts that could be linked to Nicaraguan backing. It would not apply to the killings of at least seven Americans in El Salvador that have been blamed on right-wing death squads, also believed to be responsible for the deaths of thousands of Salvadorans.

A senior White House official said the warning "has been made abundantly explicit" to Nicaragua previously through diplomatic channels. "We're not setting anyone up for anything. We're just making our position very clear," he said.

The U.S. response to any terrorist act, he continued, "will be appropriate to the loss, and the time and place of our response will be of our own choosing." If a terrorist incident involved a large-scale loss of life, "the response would have to be appropriate to it," he said.

The U.S. note was part of a growing administration campaign against attacks that U.S. officials call international terrorism, such as the hijacking last month of a U.S. airliner by Lebanese Shiite Moslem extremists demanding release of Shiite prisoners held by Israel. President Reagan earlier this month included Nicaragua -- along with Iran, Cuba, Libya and North Korea -- on a list of five countries he branded as outlaw nations supporting terrorism.

"The Nicaraguan government should use its influence to discourage attacks against U.S. personnel, personnel who are not, as they know, involved in combat," said the diplomatic note handed by Bergold to Saul Arana, head of the Foreign Ministry's North American department.

"I consider it of utmost importance that the government of Nicaragua clearly and fully understand that any Nicaraguan-supported terrorist attacks against U.S. personnel in Honduras would be viewed as the direct responsibility of the government of Nicaragua, and that the United States should be expected to react accordingly," the U.S. note went on.

"It should be understood also that while this warning is addressed to possible acts of terrorism against U.S. citizens in Honduras because of specific available intelligence, U.S. reaction to terrorist acts in other countries of Central America, or elsewhere, will be based on the same principles. A repetition anywhere in Central America of the June 19 murders of U.S. citizens in El Salvador will have serious consequences for the perpetrators and for those who assist them."

Reagan's national security adviser, Robert C. McFarlane, said in Washington today that Nicaragua justifies internal repression by citing "a phony threat" from the United States.

"We are not going to invade," he said at a briefing. "The president has made that emphatically clear." However, McFarlane said, "I think this could be a decisive year" for the conflict between the Sandinistas and U.S.-backed rebels known as contras, or counterrevolutionaries, whose strength he put at 20,000, by far the highest figure ever cited by an administration official.

About 1,000 U.S. military personnel have been stationed in Honduras for the past two years. Thousands more have done temporary duty there as part of an almost continuous series of military exercises that U.S. officials say are designed to intimidate Nicaragua and prepare U.S. forces for any possible military action in Central America.

In addition, the United States maintains a large embassy in Tegucigalpa, the Honduran capital.

The U.S. note did not specify which group it was charging with preparing for terrorist attacks on Americans in Honduras. Honduran sources with close ties to the left there have said, however, that the most active group in recent months has been the Revolutionary Central American Workers Party, whose Salvadoran branch claimed responsibility for the San Salvador attack on U.S. citizens.

A number of the party's members and sympathizers have taken refuge in Nicaragua, these sources said recently. In addition, Nicaragua has offered refuge and logistic support to other groups in the Salvadoran rebel alliance, the Farabundo Marti National Liberation Front, Salvadoran rebel officials have said.

The message added new accusations to charges President Reagan made July 8 in a speech to the American Bar Association in which he called Nicaragua "one of the world's principal refuges for international terrorists."

The Hous of Representatives last month specifically authorized U.S. military action in Nicaragua in the event that U.S. citizens or allies are threatened by attack, hijacked, kidnaped or otherwise become victims of terrorism, or if Nicaragua imports high-performance jets or nuclear weapons.

Officials in Washington, Omang reported, said the reference to a strong reaction to the San Salvador killings refers in part to an expected request to Congress for an emergency fund to train foreign military and police against terrorism.

The Sandinista government has been predicting a U.S. attack here for months. Defense Minister Humberto Ortega said last weekend, for example, that more than 2,000 rifles are in the hands of members of the volunteer militia to repel such an attack.

Several PT76 tanks have been stationed throughout Managua as part of what Sandinista officials say is readiness for U.S. attacks. Hugo Torres, head of the Popular Sandinista Army's political section, said Tuesday that the CIA could stage an attack on the U.S. Embassy here to create conditions for such an attack.