Pitching analytics guru Brian Bannister is leaving the Red Sox

Marco Hernandez could be a valuable utility option for the Red Sox next season. –Jim Davis/Globe Staff

Brian Bannister, the Red Sox director and then vice president of pitching development since 2015 and an assistant pitching coach on the big league staff from 2016-19, is leaving the team to join the San Francisco Giants front office.

Bannister confirmed his departure — first reported by Jon Morosi of — via Twitter.

“It was a dream to call Fenway my office, and to be a very small part of a historic run in Boston,’’ Bannister wrote on Twitter.