The visitors went in front after 18 minutes when Harry Wilson's inswinging free-kick from the right was met with a close-range header from Curtis Nelson.
The only downside for Cardiff was losing goalkeeper Alex Smithies, who had to be substituted after only 11 minutes because he was feeling unwell.
McCarthy said: "Alex looked really ill when he came off and to watch him leave on a stretcher was not good.
"But I have just seen him sitting up in the dressing room and it doesn't look too bad. We have no idea what the problem was.
"Possibly it is some sort of allergic reaction, but all the lads had the same pre-match meal, so it is hard to know.
"It's a great feeling, not only to have my first victory in charge of Cardiff, but also my first win in the Championship since I was at Ipswich three years ago.
"The lads had to work really hard for it. If you get early goals, it makes life easier, but we expected Bristol to respond in the second half and did really well to keep a clean sheet.
"I watched their game at Brentford in midweek and knew they were struggling for a left-sided defender.
"We felt we could hurt them down that side and both the goals came from crosses from our right.
"They were both well-taken. We could feel the bottom end of the table creeping up on us and hopefully this is a step towards sniffing the teams at the other end."
He said: "I am not going to try to sugar-coat that performance. It wasn't good enough and way off the level we have set.
"I can understand how our supporters will be feeling after a display like that in a derby game and I can assure them there has been some honest talking in the dressing room after the game.
"It would be easy for me to come out and criticise individuals, but we win together and we lose together.
"My job is to ensure we regroup quickly and galvanise the players to get us out of the tricky spell we are in.
"We defended poorly for both goals and gave away far too many free-kicks, which was just what Cardiff wanted.
"Going forward, our touch let us down too often for us to apply pressure and create chances. Overall, it was very disappointing.
"No squad in the country could afford to lose five left-sided defenders to injury, but Adrian Mariappa is as good as a professional as any I have worked with and he gave it everything today.
"I will never use injuries as an excuse for failure. Both Henri Lansbury and Joe Williams will benefit from having got first-team minutes under their belts and we will go again."