District of Columbia Mayor Marion Barry toured the University of Dar es Salaam today and heard his "in-house African expert ally in Washington."

That label was pinned by numerous Tanzanians on Courtland Cox, the District's minority business opportunity chief, and the apparent architect of Barry's overwhelming reception in this east African country. Cox, however, demurred.

While discussing plans for Barry's visit with Tanzania's ambassador to Washington, Paul Bomani, Cox said he simply told Bomani "we wanted something more personal for the mayor."

Thursday, he acknowledged that "even the queen didn't get this kind of reception."

Cox, an unabashed admire of Tanzanian President Julius Nyerere and his system of Ujamaa (familyhood) socialism, said there is much that Washington can learn from Tanzania.

Those put off by the socialist label should not be disturbed. "The mayor has been exposed for years to capitalism. He is not going to be indoctrinated in three days," Cox said.

Visiting the university, Barry promised to help obtain more books and supplies as well as more visiting professors to augment the struggling 3,200 student school that started in 1961 with only 14 enrolled.

Howard University civil engineering professor Neville Parker, who was a Fulbright professor, is the first and only visiting faculty member. He has pioneered a growing engineering department here.

As Parker demonstrated his department's research on using bamboo for irrigation projects and a wood water storage tanks for rural areas, Cox said, "I feel good about it. I am responsible for him being here." He said Parker's presence represents one of the major resolutions of the Sixth Pan African Conference in 1974 to emphasize science and technology as a key to national independence for African countries.

Cox, who helped organized the conference, reminisced about the grueling job of lining up translators, support staff, housing and other necessities for the 10-day meeting. He went on to link his current job with the lessons of that congress and the philosophy behind Tanzania's government.

His job of enforcing the law requiring that 25 percent of the city contracts be awarded to minority businesses correspond to the Tanzanian code that the "measure of a man should be the man himself" and that the "right to an equitable chance in the economy of the community" is a fundamental principle to be carried out, Cox said.

"I like what I see here in Tanzania," said the man who has been dubbed the Barry administration's ideologue.

The hearty response here to Barry is mainly a result of his and Barry's reputations from the civil rights movement, Cox said. He said the overflow crowds that turned out for Nyerere's August 1977 visit to Washington also helped.

The Tanzanians' preparation for Barry have been "not only warm but thorough," Cox noted. The mayor's party has had access to almost every important economic and finance unit of this government.

Consequently, it appears that Carter Dove will garner some new business here for Riggs National Bank. Robert B. Washington suggests that he has found new customers in Tanzania for a petrochemical construction business that his law firm represents. Effi Barry, the mayor's wife, also seeking business, was meeting today with the director of the Agency for International Development, on which her company is dependent for its contracts.

Although suffering a painful sore arm and drousy from medicine he had taken, Barry continued the last leg of his trip with the incessant round of meetings and receptions that has been virtually unrelieved since he left Washington two weeks ago.

From the university, he went on a breakneck speed tour of the village Museum, a collection of dozens of different bamboo and grass housing styles reflecting the various dwellings of Tanzania's 120 tribal groups.

Talks with the governor of the Bank of Tanzania, the country's central bank, and the minister of industries were squeezed in before the mayor's party left by chartered plane for a game park and tourist lodge at Lake Manyara near Arusha in the north.

Reviewing the mayor's trip here so far, Cox said he finds similarities with the Barry administration's emphasis on organization and self-reliance.

"I think some people in the District government are going to have a harder time as a result of this trip," Cox said wryly, recalling Barry's persistent notice of how Africans "do so much with so little." CAPTION: Picture, District Mayor Marion Barry and Dar es Salaam Mayor Ramadhan Nyamka watch a wood carver during a tour of a model village. Barry's aide, Courtland Cox received warm greeting from Tanzania's officials. AP