WASHINGTON (AP) _ The Supreme Court today agreed to decide whether a Houston constable's clerk-typist wrongly was fired for saying she hoped someone assassinates President Reagan.

The justices said they will study a federal appeals court ruling that Ardith McPherson's 1981 firing violated her free-speech rights.

Ms. McPherson was on duty in Constable Walter H. Rankin's office May 30, 1981 - the day Reagan was shot in Washington by would-be assassin John Hinckley.

While listening to radio reports about the incident, Ms. McPherson told a co-worker, ''I hope if they go for him again they get him.''

The remark was reported to Rankin, who called Ms. McPherson into his office and asked her if she meant it. Testimony differs about her response. She testified she said she did not mean it; Rankin testified that she said she did.

Rankin fired her, and Ms. McPherson sued him and Harris County.

A federal trial judge twice threw out the lawsuit after ruling that no constitutionally protected rights had been violated.

But the 5th U.S. Circuit Court of Appeals last March 19 ruled for Ms. McPherson and ordered the trial judge to come up with an appropriate remedy.

The appeals court said Ms. McPherson's remark was political in nature and addressed a ''matter of public concern'' protected by constitutionally protected freedom of speech.

Weighing that freedom against the interest in maintaining discipline and efficiency in government workplaces, the 5th Circuit court said Ms. McPherson's ''potential for undermining the office's mission (was) trivial.''

''Absent evidence that a government employee's views are inconsistent with the mission of the employing agency and with the employer's role in that agency, tolerance is required,'' the appeals court said. ''However ill- considered Ardith McPherson's opinion was, it did not make her unfit for her lowly job in Constable Rankin's office.''

In seeking Supreme Court review, Harris County Attorney Mike Driscoll argued that the appeals court underestimated the impact of Ms. McPherson's comment.

''The efficiency and morale of the office was threatened,'' the county's appeal said.