The sword-wielding white supremacist accused of fatally stabbing a black man in Midtown because of his race is mulling an insanity defense, his lawyer said in court Wednesday.

Justice Charles Solomon asked the lawyer for defendant James Harris Jackson, 28, whether he planned to file notice of a psychiatric defense. The deadline to file such a claim is closing in.

Lawyer Patrick Brackley said he and his client were still in the process of making that decision and will inform the court by June 15.

The Army veteran is charged with first-degree murder and other raps for the slaying of can-and-bottle recycler Tim Caughman March 20.

The Maryland racist allegedly traveled to the Big Apple from Baltimore to murder black people, hoping a media frenzy would follow. He was particularly “angered by black men mixing with white women,” court papers state.