^ Well I suppose what Kirk said in This Side of Paradise doesn't count because he didn't mean anything he said he was just trying to get under Spock's skin to release him from the pores.
That being said I am absolutely sure Kirk said things about Spock being a Vulcan before and he definitely laughed at what McCoy said.
If McCoy is racist so are many other people on that ship. And heck what about all those things that Spock said about humans?
Now as for whether the TOS crew was racist against the Klingons in STVI, I would say yes. But again this was the intent
of the script even if it did not make sense with earlier stuff from other films and the TV series.