The judge ordered the exam after Salvatore Perrone repeatedly interrupted his arraignment on Wednesday.
Perrone was indicted last month on three counts of first-degree murder and three counts of second-degree murder. Police say he was spotted in a surveillance footage leaving the scene of the last shooting, on November 16, with a duffel bag.
They said a sawed-off rifle used in the killings was found in the bag. The other murders happened in July and August.
Perrone's unusual outbursts included a demand for his personal attorney and complaint about a lack of access to his cell phone.
"I have not been given any access to the outside world," he told the judge. "I cannot reach my personal attorney."
Taking matters into his own shackled hands, Perrone interrupted his arraignment multiple times.
"I have not been able to make a phone call to be in touch with my personal attorney," he said. "Everything has been taken away from me. My money, my cellular phone and any phone numbers I have."
The once-traveling apparel salesman is facing charges stemming from the heinous murders of three businessmen. Each was taken from their family members, who filled half of the courtroom to see the proceedings.
"And how do I reach my attorney? Are we in the United States of America?" Perrone asked.
Even though his court-appointed attorney, William Martin, stood beside him, Perrone kept asking for an attorney he claims is in Philadelphia.
"I would describe him as a person who has issues," Martin said.
Perrone also wanted access to his sister.
When asked if she was in court, he turned around for several minutes staring at the spectators. Family members of the victims glared back.
Mourad Gebeli's father, Mohamed, was one of the victims.
"I wanted to reach him," Mourad said. "I wanted to reach him and get my hands on him."
After Perrone pleaded not guilty to the charges, many of the victim's family members left quietly, not wanting to comment.
Get Eyewitness News Delivered