A federal judge ruled yesterday that Glenn I. Wright, charged with masterminding the July 19 kidnaping of the wife of a wealthy Mexico City businessman from a Washington hotel, is mentally competent to stand trial.

District Judge Oliver Gasch had ordered Wright, 42, to undergo psychiatric tests at St. Elizabeths Hospital after Wright's lawyer indicated he might argue in a trial that Wright was insane when the crime was committed.

Gasch has had Wright held at the hospital instead of at D.C. Jail for the past several weeks because Wright was considered suicidal, according to pretrial testimony.

Wright and two codefendants were charged with kidnaping Edith Rosenkranz, 60, from the Sheraton Washington Hotel where she was participating in a bridge tournament. Rosenkranz was released unharmed after three days.

A St. Elizabeths' staff psychiatrist, Dr. Edward S. Hume, testified in a hearing on Tuesday that Wright suffers from a mental disorder but is not mentally ill. Wright is able to understand the charges against him and is competent to assist his lawyer in a trial, Hume testified.

Hume said Wright was under pressure last summer brought on by the impending failure of a business venture and hoped to raise money by ransoming Rosenkranz.

The psychiatrist testified that Wright also was troubled by the death of a friend who had been murdered in Wright's apartment.

Gasch scheduled a Nov. 14 hearing on Wright's request that he be tried separately from a second defendant, Dennis Moss, who is also in custody. A third defendant, Orland D. Tolden, has pleaded guilty to conspiracy to commit kidnaping and is awaiting sentencing.