Mayor Bill de Blasio is finally waving in the right direction when it comes to handling crisis mental-health emergencies — but just barely.

With great fanfare, the mayor on Monday announced that trained mental health workers will soon start joining cops in responding to emergency calls involving people in psychotic crisis.

But it’s only being piloted in two “high-need” precincts, in Harlem and the Bronx, to start. And first lady Chirlane McCray’s ThriveNYC will lead the effort — despite Thrive’s well-established record of mismanagement.

Public Advocate Jumaane Williams politely but pointedly noted that he’s been pushing on this front for years, flagging the doubling (from 2009 to 2018) of 911 calls regarding emotionally disturbed persons.

Which, by the way, cops are not allowed to say anymore; the mayor announced the term “EDP” is forbidden. When politicians focus on new labels you should be suspicious of how much substance is changing.

De Blasio was supposed to report on this issue a year ago, but even the members of the task force that produced it haven’t seen the final draft, let alone the public.

Yet suddenly, here comes a new $37 million initiative — $23 million for new mental health response teams to intervene pre-crisis, plus $14 million to focus on those whose untreated serious mental illness poses a risk of violent behavior — under Thrive’s aegis.

Williams plainly deserved much, perhaps most, of the credit here. Instead, City Hall blatantly sidelined him.

We have no doubt that every member of the NYPD looks forward to having someone else — hopefully, someone better trained — take point on mental health-related public safety crises.

Let’s all just hope that the mayor’s serious about making the change — rather than mouthing the right sentiments to get past the political crisis of the ongoing failure of his signature program.