I have only watched up to Season 1, Episode 23 "A Taste of Armageddon", so my knowledge on the show is limited.
Let me begin by sourcing this article, entitled Star Trek: A Phenomenon and Social Statement on the 1960s:
Racism and Improving Race Relations
Star Trek does have a strong vein of racism running through it, but this racism is not directed towards the minority regulars (that would have caused major problems), Instead, this racism was directed towards Mr. Spock (portrayed by Leonard Nimoy), the half-Human half-Vulcan first officer and science officer of the Enterprise. Spock is the only one of his people aboard the Enterprise. His pointed ears, green blood, and devotion to pure logic set him apart from the rest of the crew. As a Vulcan, a fictional race of beings, scathing comments regarding his ethniticity (and especially his pointed ears) could have been made with virtual impunity while similar comments directed toward recognized minority groups would have been greatly frowned upon. The relationship between Mr. Spock and Dr. McCoy makes this point clear. During practically every episode, McCoy badgers Spock about everything from his pointed ears to his green blood.
There are quite a number of instances in which Kirk and McCoy comment on Spock's logical nature, ethnicity (pointed ears, blood) and lack of emotion. While it is understandable that the men have ideological differences (McCoy seems to be at odd with both Kirk and Spock at times), McCoy makes it a point to make the insults personal. Similarly, Kirk makes mean-spirited remarks towards Spock frequently, although it is ambiguous whether or not these playful remarks are meant to be derisive.
I can't tell what the purpose of it is other than to repeatedly allude the audience to Spock's character, yet they seem to exaggerate the offensive nature just a tad to the point where it seems racist. The show does acknowledge it a couple of times. i.e., Kirk's clever "half-breed" memory, one of the crew members not liking Spock after they discover what the Romanulans look like, and Spock saying "I do not see why you find it necessary to insult me".
On one hand:
Spock does not react to these comments with outrage. He's an emotionless being driven by logic. This could also be the show's cue that the remark is not to be taken seriously.
The crew members are close friends. Friends tease each other.
Kirk is just being playful and it is his way of "humanizing" Spock. McCoy simply has ideological differences and likes to show it.
The other hand:
Spock's lack of response to the insults make it rather one-sided. The audience doesn't feel any "closure", just uncomfortableness, as the insults are not confronted with an equal response.
McCoy seems to badger Spock like the article says. Maybe this is just a part of his character, but as I said before, McCoy seems to like to make it a point to make it a personal insult.
Is there anything more to it or am I just a sensitive viewer?