Three bishops, two choirs, Mayor Walter Washington and members of the City Council, 2,000 worshipers, and a kilted bagpiper joined forces yesterday to say goodbye to the retiring dean of the Washington Cathedral.

Dean Francis B. Sayre will retire tomorrow on his 65th birthday after 27 years as dean of the Cathedral.

Yesterday's service was billed officially on the order of service as the "celebration" of Dean Sayre's ministry rather than a farewell. The dean himself had forbidden any eulogies according to Washington Episcopal Bishop John T. Walker.

Nevertheless the guest preacher, the Rt. Rev. J. Brooke Mosley, assistant bishop of Delaware and a seminary classmate of the dean's, found an easy link between Dean Sayre's accomplishments during his tenure here and the scripture lesson for the day.

Christians, Bishop Mosley pointed out, are expected by God to "discover new standards of justice . . . freedom . . . and righteousness." In so doing, he continued, "we shall often disagree."

The controversy that grows from such disagreements should be welcomed, Bishop Mosley continued, since "controversy can be creative. We are often led to some of the highest ethical standards through controversy."

Dean Sayre's 27-year tenure at the Cathedral has been marked by his involvement in major issues of the day in national and civic affairs as well as the church. The stands he has taken on such issues as civil rights, the Vietnam war, and American foreign policy have often embroiled him in bitter controversy.

Yesterday's service was an amalgam of formal liturgy, over which the dean himself resided, and warmly human and personal touches.

Cathedral workers, who are found more customarily with accounting ledgers than prayer books, read parts of the lessons and brought the gifts for the communion service.

In the traditional liturgical prayer "for those who have died" the liturgist interjected, "especially thy servants Martin and Hubert," in acknowledement of yesterday's observance of the birthday of Martin Luther King, Jr. and the death of Seanator Hubert Humphrey.

Bishop Walker, who will succeed Dean Sayre, praised him as a man who "has served the nation, the community, the Cathedral with Faithfulness and diligence . . . He has left his mark upon this city, upon this nation, and upon the Church."

The final tribute yesterday was completely unscheduled.

As the service ended, the beaming dean moved down the aisle in a stately recessional to the skirl of bagpipes and the applause of the congregation. Halfway down the aisle, a tiny girl in a kelly green dress slipped from her mother's grasp and rushed at the approaching churchman with both arms outstretched.

The procession halted while the dean knelt down and gathered his youngest godchild, Allisin Sayre Chapin, 4 in his arms.