The company that publishes True Confessions magazine announced an agreement Thursday to buy the National Enquirer and its sister publication, the Weekly World News, for $412.5 million in cash.

Macfadden Holdings Inc., a privately held magazine publishing company based in New York City, formed a joint venture with Boston Ventures Limited Partnership III, a media investment company, to buy GP Group Inc., of Lantana, Fla.Trustees for GP Group, which publishes both tabloids, announced in December they would sell the papers in keeping with a suggestion in the trust established by the late Enquirer founder and GP Group president, Generoso Pope Jr.

Pope, pioneer of the sensational gossipy style that made the En-quirer a market leader among supermarket tabloids, died Oct. 2, 1988, of a heart attack.

Macfadden chairman Peter Callahan said GP Group's headquarters will remain in Lantana.