I think personality type is definitely inherited in that parents pass on their tendencies and traits, just like they also pass down physical features like hair colour and height (I'm sure the mechanisms are different).
But of course, with each individual having inherited a mix of traits from their ancestors- with some being 'stronger' than others (J,P,E, I, S, N etc) - there's no guarantee that you'll inherit your parent's exact personality type. You can inherit other traits that would be in the 'gene bag', passed down from your mother/father/grandparents etc.. So a child can be born with a completely different type from their same gender parent....perhaps taking on a combination of traits from their mother and father, or from a distant grandparent.
In my experience, when I look at children and their parents - I can see similarities in personality, as well as physical appearance. For example, my mother and I have similar features - we're both short with a snub nose, and have same fingers, arms, and feet. My mother is isfj, and I'm also isfj - my mother was in social work and I'm in counselling. My daughter is esfj - she's inherited her 'sfj' from me. She is caring and compassionate like me and her grandmother, but more extroverted like her father (who is istp but probably in between istp/estp). I don't think this is a coincidence.
I'm not sure how much environment plays a role, but I think genetics is the strongest contributor.