Well, to determine which is the correct one, you need to understand the difference between ‘OF’ and ‘TO’.
OF = possess something, something belongs to you. (a friend of mine)
TO = An order, when an action (verb) happens later. (I want him to do this. I am trying to help him)
Note that ‘TO’ is mostly used with verb forms.
Now, capable is an adjective and it refers to something you have inside you.
So, the correct construction is capable of.
Capability, on the other hand, can have both combinations – capability to (= power) and capability of (= ability).