When he wrote "East is East and West is West and never the twain shall meet" it was as a proposition to be argued against. There's casual racism in some of the Barrack Room Ballads but it's a racism voiced in character and then placed on trial. "You're a better man than I am Gunga Din" was a radical statement to be making in the 1890s. In Puck of Pooks Hill- where historical figures are magicked up to tell their stories to an Edwardian brother and sister- he makes a point of including a medieval Jew among the honoured ancestors. A late story "The Village that Voted the Earth was Flat" has a bunch of cronies visiting revenge upon a pompous anti-semite.
Kipling belongs to the first generation of writers to take English literature out of its European comfort zone. He had a fore-runner (more limited in geographical reach) in Stevenson and a contemporary in Conrad. Before Kipling English fiction rarely ventured any further than Italy. Afterwards the world was its oyster. As a native of India he was able to get behind the orientalism of earlier fiction. His overview of "Mine Own People"- by which he meant Indians of all races, religions and castes- is as broad and detailed as Balzac's overview of the social strata of early 19th century France. In Kim- which is the summation of his early experience and knowledge- a boy of Irish parentage wanders the roads, keeping company- on equal terms- with (among others) a Tibetan lama, a Muslim horse-trader, a British spy-master, an aged Hindu princess and the matriarchal, polyamorous Woman of Shamli. It's a celebration of humanity in all its variety and peculiarity- and an aspirational vision of a world without frontiers.