McDonald is accused of murdering Breda Cummins in a house in Athy.
Mr Byrne told prosecuting counsel John Alymer that at around 12.50am on May 13, 2010, McDonald knocked on his front door and he asked him in.
McDonald (50), of Barnhill, Castledermot, has pleaded not guilty to murdering of Ms Cummins on May 13, 2010, at Michael Dooley Terrace, Athy.
He also pleaded not guilty to assault causing harm to John Lawlor (44), of Pearse Terrace, Castledermot, at Michael Dooley Terrace on the same date.
McDonald has admitted the manslaughter of the 31-year-old mother-of-one, but this plea has not been accepted by the Director of Public Prosecutions.
"He looked calm and casual but white in the face. He didn't sit down for a while and then he said he is after doing something terribly stupid and wrong -- that he had stabbed two people," said Mr Byrne.
"He never mentioned names at first then he said 'Froggie and Breda'. I didn't know them."
Mr Byrne said McDonald told him he had a couple of cans at home after his dinner and that 'Froggie' (John Lawlor) and Ms Cummins had been ringing and texting him all day.
"He said he got pissed off with the phone calls and texts and said he got a knife and walked out of his house to go to Michael Fennell's house," said Mr Byrne.
Mr Byrne told counsel that McDonald then told him he boxed Michael Fennell in the face, stabbed Mr Lawlor in the hand and then went upstairs and stuck the knife in Ms Cummins' heart, saying 'now you bastard, you won't ring or text me anymore'.
"He told me she was dead in the bed in the house and he said he got the knife from his home. He said he got pissed off," he said.
"He then asked me had I any drugs going like heroin or weed, and I told him I don't do that," said Mr Byrne. He said McDonald had told him he had brought shame on his life.
He said when McDonald left his house two hours later in a taxi, he turned to Mr Byrne and said "God bless ye, ye might not see me any more after tonight. Don't do stupid things like I did. I'm going to pay for it now".
Under cross-examination by defence counsel Fergal Kavanagh, Mr Byrne agreed that it wasn't long after McDonald sat down in his house that he started to say a prayer.
Mr Byrne said he "didn't believe" McDonald when he told him he had stabbed two people. "I felt sorry for him. I didn't believe him and I just listened to him.
"He had no blood on him, he was clean, and he was all right. I wasn't afraid of him and I offered him a room to stay the night. I just didn't believe him because who would walk in to someone's house and say they stabbed people?" said Mr Byrne.
Martina Hickey, a friend of the accused, said McDonald had called to her house in Carbury Park on the night of the stabbings but that she did not let him in as he had phoned her earlier in the day and he appeared to have been drinking.
"I had my grandson and daughter in the house and it was late at night so I didn't let him in," said Ms Hickey.
The trial continues.