Liberal Democrat Edward M. Kennedy joined conservative Republican Ronald Reagan today in urging that U.S. military forces be deployed in the Middle East to guard American interests.

"We are going to need a presence in that subcontinent area," Kennedy said during a stop here on his presidential campaign. "I think it should be naval, naval conventional force . . . . I think the quantity of the forces should be a subject for consideration by Congress."

Kennedy disagreed with the suggestion put forth Thursday by Vice President Mondale that the 1980 Summer Olympics should be moved out of Moscow to punish the Soviets for the invasion of Afghanistan.

"I think what we should do is have American athletes go to the Olympics and win Gold Medals," Kennedy said. "We should go to Moscow and whip their . . . . " he didn't finish the sentence but he was referring to a remark President Carter made earlier about the Carter-Kennedy confrontation for the Democratic presidential nomination.

Kennedy's remarks on a U.S. military presence in the subcontinent south of the Soviet Union reflects how narrow the breath of "debate" on military subjects has become in the election campaign since the Iranian and Afghanistan crises.

Kennedy is not the most dovish member of the Senate, but he has almost always been among the liberals who look most skeptically at proposals for beefing up military spending for establishing new American bases.

President Carter, too, has appeared in the past to talk like a liberal on defense issues. Recently, however, both men have sounded like conservative Republicans in their tough talks on defense.

Kennedy sided with Carter last year when the president called for a 3 percent increase in defense spending. He has, however, expressed doubt about Carter's latest proposal, which would increase the military budget about 5 percent annually for the next five years.

Kennedy has even backed the president to a degree on the proposed MX missile, a major new weapon that oldline liberals look upon as folly. Kennedy supports research on the new missile, but he says Carter acted too hastily in coming out for its full-scale deployment.

The Democratic campaign in Iowa is to reach a peak of sorts Saturday night when Kennedy and California Gov. Edmund G. (Jerry) Brown Jr. are scheduled to appear at the same dinner in Waterloo. Carter, who has declined to leave Washington to confront his rivals here, was sending Mondale as his representative.