State Sen. Harry J. McGuirk officially announced today that he will challenge Gov. Harry Hughes in the Democratic gubernatorial primary. He quickly stirred the political pot by saying he was seriously considering Lt. Gov. Samuel W. Bogley to be the No. 2 man on his ticket.

Bogley, who stood just outside a rear door as McGuirk talked, said, "I think under the circumstances the governor can understand why I wanted to come down here and check out other opportunities that might be available. He and I agreed last year that we were going to go our separate ways politically, so, I'm here.

"Either Bogley is in the right place at the right time," he added, "or I just signed on as a passenger on the political Titanic of 1982."

While Bogley mused about his political future, McGuirk told the crowd of some 325 people, many of them his fellow legislators, that he was serious about challenging Hughes. "I do not want to see our state lag because of confusion and mental chaos in the decision-making process," McGuirk said.

Among those who came to hear McGuirk, 58, a member of the legislature for the last 22 years and of the Senate for 15, was Jeanne Mandel, wife of former governor Marvin Mandel. "I'm just returning the courtesy that the senator showed for my husband when he came home [from prison] in December," she said. "His face in the crowd at the airport was a very bright light."

Also present was Senate President James Clark Jr., Senate Majority Leader Rosalie Abrams, and Paul Weisengoff, McGuirk's protege in the House of Delegates, who says he will file for McGuirk's Senate seat in early June if McGuirk still is in the governor's race.

"I'm not a kamikaze pilot. If the signs aren't there I will get out of the race . . . " McGuirk said. "But I don't expect to be back in the Senate next year."

Most of the legislators insisted they had come merely as a courtesy. "A button does not an endorsement make," said Sen. Victor L. Crawford (D-Montgomery), sporting a "McGuirk and Who? in '82" button.

While most of the delegates stood noncommittally near the back of the room, David Shapiro (D-Baltimore) who was involved in a spat with Hughes recently when he tried to bring a convict to dine with the governor, stood up front applauding enthusiastically. Weisengoff was another who was pleased. "Right here in this room you've got all the money and all the political clout you need to win an election," he said.

As the room emptied, McGuirk made a point of saying hello to Bogley and having his picture taken with him. "I really don't know what I'm going to do," said Bogley. "Obviously, I can't take a side in the governor's race as long as I'm lieutenant governor. I might run for Prince George's county executive. But if I could, I'd love to run for [U.S.] Senate, perhaps as an independent."