Most important thing to take into consideration when writing a character that is prone to certain behavioral patterns such as monologues, inner-thoughts, anti-social conduct, or anything of the sort is to avoid the common literary pitfall of making them into a smarmy, self-centered, self-determined superiority complex, omniscient, annoying prick that cannot interact properly in a normal society cliche one can see readily in film and literature depending on what you fancy perusing. That's not to say any of those traits are bad and should be avoided, even being omniscient in a field is something you can argue in favor of depending on how the character itself is build. What's important to know is to avoid the combination of traits and mannerism that makes him the equivalent of the Tech Specialist in a low budget cop show that tries to take itself seriously.
A person that is an introvert or anti-social doesn't automatically make them a person that cannot handle complex social encounters outside of uttering a good morning to his neighbors. It can simply mean they prefer a more quiet and monotonous life / method that allows them to work on their own / be with their own thoughts instead of working with others in a group / having to complement a discussion held in a group. They could easily handle most type of social encounters because being intelligent and prone to self-reflection / inner thoughts doesn't make you a walking embarrassment in public. If you play it right you can even go as far as using their intelligence / cerebral-leanings to make them a person that feels that ease and natural in a group or social encounters, someone who does not have the innate charisma of a leader yet is able to mimic it extremely well through acting and psychology, while still preferring less intrusive / more solitary encounters. You have to make sure to not fall into the other extreme either in that case, less you run the risk of unintentionally turning the character itself into a giant prick from an IC perspective.
Basically, the bottom line is to always keep in mind that regardless of how a person prefers acting when it comes to social encounters or mere mannerism, we as humans have this natural instinct to infiltrate and integrate the communities surrounding us, hiding or pushing away the less unwanted or unimpressive parts of our personality and mannerism in favor of highlighting the more appreciated and enjoyable traits. The amount we actually hide / push away depends on a case by case basis but the general gist of it will always be there, even in the case of an extreme nihilist. Just as well, never push a character into one extreme or another when it comes to their mannerism or personality, as an inspired character is merely a mixture of various nuances rather than a few hand-picked ones kept separate in their entirity.
Hope that helped, doubt I made much sense in my exhausted state. Also listen to [member="Trenchcoat Man"] in regards to McCarthy. If you can pull that off, you already got half of your issues resolved.