There are some great references in the comments above, by Nikolajk and Mauro. I recommend them too.
But as mentioned, mostly inspiration for category theory is philosophy of mathematics, in the sense of logic, at least so far as MacLane talks about it in his autobiography.
I speculate also that the philosophy of Ernst Mach, as evident in his first quasi-popular book, seems to be the only EXTRA-mathematical philosophy (other than the coherence theory of truth, due to Joachim and Blanshard, which however probably had little influence on the mathematicians, unlike Mach) that inspired category theory. (Basically, it's relational realism more or less, itself related to structural realism.) It's true, I agree, that category theory mostly is inspired by philosophy of mathematics, not the extra-mathematical philosophy, which mostly centers on theory of truth, ideas, ethics, and aesthetics (and so has no bearing on the subject, if the theory of truth was not relational fundamentally). Mach was and is very influential on thinking of mathematicians, especially those think about physics, so I think his is the main (extra-mathematical) philosophical influence. Leibnitz seemed to have in turn been an indirect influence on Mach...
To some degree this is by elimination of philosophies directly opposed to the conceptual approach of category theory. The radical empiricism of the instrumentalists and logical atomists (Wittgenstein, Russell, etc.) is generally opposed to the key information being in the arrows, in a static world of related events, so very few popular philosophies really had any influence on category theory, while the classical (Aristotelian realism, abstract Platonism) and neo-classical (Kant, Hegel, Schopenhauer) were not especially interested in putting any emphasis on relations of events instead of the events themselves (the Ens). Others like Ortega-y-Gasset stressed a return to metaphorical Platonism.