President Reagan's campaign to save the MX missile suffered another serious setback yesterday when it was revealed that a majority of the Joint Chiefs of Staff had advised Reagan against going ahead with his proposed "Dense Pack" deployment scheme for the intercontinental nuclear weapon.

The chairman of the Joint Chiefs, Army Gen. John W. Vessey Jr., disclosed to the Senate Armed Services Committee that the military chiefs had recommended against Dense Pack by a 3-to-2 majority. The chiefs of the Army, Navy and Marine Corps opposed Dense Pack, while Vessey and the Air Force chief endorsed it.

At the same committee hearing yesterday, Defense Secretary Caspar W. Weinberger was warned by several senators of both parties that changing deployment schemes for the MX had damaged the weapon's credibility.

Later yesterday, the House, which had voted 245 to 176 on Tuesday to delete MX production money from this year's defense appropriations bill, also voted to hold back some research money for the weapon while Congress examines Dense Pack.

President Reagan had proposed deploying the weapon by 1986 in so closely spaced a formation outside Warren Air Force Base near Cheyenne, Wyo., that attacking Soviet missiles would destroy each other overhead.

The developments of the past two days put the Reagan administration suddenly on the defensive about its entire effort to modernize the American arsenal of nuclear weapons, of which invulnerable deployment of the MX missile was to be the centerpiece.

The White House, State Department and Pentagon all launched public counterstrikes against MX opponents while privately pondering how to avoid an all-out fight with Congress.

Reagan will "take the message to the American people," according to White House spokesman Larry Speakes, and would "speak out forcefully and often" over the next several days to try to reverse the House vote against MX when the Senate takes up the defense appropriation bill.

One administration aide planning this counteroffensive portrayed Reagan as "ticked off" by the House vote and determined to make the case for the MX before the Senate votes next week.

But Weinberger was warned by several members of the Senate Armed Services Committee that the MX is also in deep trouble in the Senate. "We have a lack of credibility on this whole issue," Sen. William S. Cohen (R-Maine) told the defense secretary.

"The problem we have here, and I speak as a politician," Sen. Henry M. Jackson (D-Wash.) told Weinberger, "is that the MX has suffered a serious debasing by reason of a whole series of basing modes.

"The public has gotten the idea that it's a boondoggle, a Rube Goldberg," Jackson said of Dense Pack. "You can't explain it."

Sen. Dan Quayle (R-Ind.) said Reagan's entire rearmament blueprint has been called into question. In contrast to the pro-defense attitude of last year, he said, "my mail has gone 180 degrees in the other direction. There is a definite perception of the public that the Pentagon and the services are out of control."

While Weinberger was bearing the brunt of this criticism from a panel strongly suppportive of the Pentagon in the past, Secretary of State George P. Shultz was hearing more bad news at a NATO meeting in Brussels. The Danish Parliament voted Tuesday to stop contributing money to NATO's deployment of American Pershing and cruise missiles in West Germany.

Washington Post correspondent Michael Getler, who is traveling with Shultz, reported from Brussels that the House vote against the MX would enable European opponents of Pershing and cruise missile deployment to argue that the United States was refusing to put new nuclear weapons on its own soil while pressing NATO partners to do so.

Shultz, trying to minimize the impact of the House MX vote for Europeans, said upon arriving in Brussels yesterday that he wanted to "emphasize" that the United States already has 1,000 nuclear Minuteman missiles deployed on its own soil. What was at issue with the MX, he said, "is a modernization of that weapon and a shift in the basing mode."

Another high State Department official, who declined to be quoted by name, told Washington Post diplomatic correspondent John M. Goshko that the House vote on the MX and the Danish vote on Pershing and cruise missiles were "very serious matters."

Not only would those actions fuel the anti-nuclear movement in Europe, said the official, particularly in the Nordic nations on NATO's vital northern flank, but also "plays into the hands of of the NATO reduction types here in Washington," such as the majority of the Senate Appropriations Committee who recently voted to freeze the number of U.S. troops in Europe at the 1981 level. The official also said the setback on the MX undercuts U.S. negotiators at the U.S.-Soviet arms talks at Geneva, who he said have been counting on the missile for leverage in bargaining over both strategic and theater nuclear weapons.

Weinberger, early in his Senate Armed Services Committee testimony yesterday, said that denying production money for the MX would amount to "telling the world we are disarming unilaterally."

In about the only sympathetic remarks Weinberger heard from the committee yesterday, Sen. John C. Stennis of Mississippi, ranking Democrat, said "if the Congress is not going to back the president in this kind of far-reaching decision, we are in a bad fix."

Late in the hearing, Sen. Sam Nunn (D-Ga.) elicited from Vessey that a majority of the Joint Chiefs, who advise the president on military decisions, had recommended against Dense Pack deployment of MX. "Some of the chiefs were concerned that the president was being pushed into a basing decision before all the technical uncertainties of the basing system were resolved," he said.

Vessey confirmed to reporters after the hearing that he was one of the two military chiefs who nevertheless favored going ahead with Dense Pack. He smiled in apparent confirmation when it was suggested that Air Force Chief of Staff Gen. Charles A. Gabriel also must have supported Dense Pack because his service designed it. "I don't remember him being against it," Vessey replied. Of the three remaining chiefs -- Gen. E.C. Meyer of the Army, Adm. James D. Watkins of the Navy, and Commandant Robert H. Barrow of the Marine Corps -- one qualified his opposition by saying he could endorse going ahead with Dense Pack if "it would help" the president reach an arms control agreement with the Soviets, according to Vessey, who declined to identify him.

Vessey stressed that all the chiefs, in assessing Dense Pack shortly before the president public recommended it on Nov. 22, agreed that the MX missile itself was needed. He said they split only over the Dense Pack deployment scheme.

It is highly unusual, if not unprecedented, for a president and secretary of defense to recommend to Congress deployment of a major nuclear weapon without first winning endorsement from the Joint Chiefs of Staff. Members of Congress historically have been reluctant to reject the advice of the chiefs.

When asked by Nunn why he recommended Dense Pack to Reagan after the majority of the chiefs had opposed going ahead with it, Weinberger said "provisions in the statutes" give Defense Department civilians the responsibility for making such decisions.