In other sections (check out "Character Clues" and "Character Roles"), we emphasize that Kipling portrays this character as a ridiculous person. This character does actually have a name—Hurree Chunder Mukherjee—but the narrator almost never calls him that. Instead, the narrator usually calls him "the Babu." (Actually, the Babu, like Mahbub Ali, also has an official letter and a number for Secret Service records: R.17. But still, he mostly gets called "the Babu.")
A babu can mean an Indian clerk in a low-level government position, but as we discuss in our "Detailed Summary" of Chapter 2, it's also a term for a certain racist character type in British literature: the Indian person who tries really hard to fit in with British culture but can't speak proper (a.k.a. Anglo) English.
By calling Hurree Chunder "the Babu," Kipling is clearly inviting us to read his character as a common stereotype. From his awkward, overweight body to his odd, stilted English, the Babu seems to fit all of the worst assumptions about Indians that racist British people might have.
At the same time, Hurree Babu's character can surprise us. When Kim first meets the Babu when the Babu escorts him back from Simla (where Kim has been staying with Lurgan) to Lucknow (where Kim goes to school), Kim thinks, "How comes it that this man is one of us?" (9.132). Kim can't imagine how someone as stupid-seeming as the Babu can possibly have something as exciting as a price on his head as proof of his excellent, risky spy activities.
But the text gives us all kinds of hints that the Babu is not a totally one-dimensional, unaware character. When the Babu lets Kim off at the Benares train station to join the lama for his second search for the River of the Arrow, Kim asks if it is dangerous for them to be speaking English in public.
The Babu dismisses Kim's concerns by saying, "All we Babus talk English to show off" (11.128). The Babu seems to be aware (at least to some extent) of how he appears to the people around him when he speaks English with his British colleagues: as a "show-off." And of course, the Babu also gives plenty of evidence over the course of his mission against the Russian agents that he is braver than he will ever admit.
So we cannot take the Babu's appearances totally at face value. Yes—there is a lot of prejudice in the ways in which Kipling invites his readers to laugh at this guy; yet while the Babu is superstitious and easily intimidated by the customs and beliefs that he is supposed to be studying oh-so-scientifically, he is still brave enough to ask the Russian agents he has been betraying all along for a recommendation for future employment, which takes some serious cojones. So Kim appears to mock the Babu while also suggesting that he deserves some respect at the same time.
The complexity of the Babu's character might come from the fact that he stands between two cultures. While he has grown up in Bengal, India and clearly does not identify himself as a European (in fact, he calls himself an "Asiatic" (12.152)), the Babu is totally committed to the British government and to English social sciences and institutions.
The Babu might be kind of hard for us to figure out as a character because he sits outside of the categories of Sahib and native that the book keeps pressing on us. The Babu's identity is not as flexible as Kim's because he is Indian and Kim is white (which means a huge difference to a character's power in this book), but the Babu still has a lot more depth to his character than Mahbub Ali or even Lurgan. The fact that he is such a puzzle is what makes him interesting—even when he also frustrates the heck out of us.