Is there a way for me to add coffee to my stout after it's been kegged?

I made my first home brew a few months ago and didn’t use any campden tablets for my tap water and ended up with a fairly strong off flavor. Other than that it’s pretty good. I’ve read about someone else put some coffee into their keg to help cover up the bad flavor. How can I go about doing This? Can I just grind up some coffee and toss it in with a muslin bag?
I brewed a hefe a few weeks ago and it turned out fantastic, I used ro water and campden tablets so I’m sure that’s what messed up my first brew.

I recently added 1.5oz dark roast coffee whole beans to five gallons of a porter that was kind of meh.  It is now a very nice coffee beer.
I don’t know if it will cover up phenolic flavors, but it probably won’t hurt either.

How long did it take for you to notice the coffee flavor?

I left it in for about five days and was happy.

Fastest method is to add cold brew. Just buy a bottle from the store and add to suit your tastes. Try small amounts in a glass first and scale up

My usual method is to add brewed coffee to taste after fermentation, so no problem adding it to the keg.

Cold brew is the way to go.