Diane Abbott has revealed her staff try not to let her walk around her Hackney constituency alone after the murder of fellow Labour MP Jo Cox, as she called for parliament to consider launching an inquiry into racist and sexist abuse of MPs.

The shadow home secretary, who in 1987 became the first black woman to be elected as an MP, said she had been personally affected by the scale of abuse she has suffered, which reached a peak in recent few weeks during a furore over which way she would vote on the government’s Brexit bill.

“It kind of does get in your head, it kind of does demoralise you, and even though you know it shouldn’t, it does make you doubt yourself,” she told the Sky News programme Sophy Ridge on Sunday.

“When Jo Cox was unfortunately attacked and died, of course your first thoughts are for her husband and children and friends and family and the people of Batley and Spen who lost a great MP, but you also thought this isn’t all just abuse – maybe stuff can happen.