I do think that Dumbledore was the one that gave him the cloak.
However, McGonagall was shocked that he had -an- Invisibility Cloak, not -the- Invisibility Cloak. If she knew that Dumbledore had the Potter’s cloak (assuming same as canon), then the odds of Harry getting a completely different cloak would be low enough that she could assume that Dumbledore gave Harry part of his inheritance.
I think that she just made an assumption, considering it very unlikely that he got it any other way since his access to the family vault is limited.
I do think that Dumbledore was the one that gave him the cloak.
However, McGonagall was shocked that he had -an- Invisibility Cloak, not -the- Invisibility Cloak. If she knew that Dumbledore had the Potter’s cloak (assuming same as canon), then the odds of Harry getting a completely different cloak would be low enough that she could assume that Dumbledore gave Harry part of his inheritance.
I think that she just made an assumption, considering it very unlikely that he got it any other way since his access to the family vault is limited.