This is not an easy question to answer.
There are a many of popular comedians that take shots at every race, lifestyle, religion etc., however, they are well known and assumed or at least perceived as not being racist for their jokes are based on or are "truth". They merely point out the BS, silliness or falseness of the above. Some people can handle truth and some can not.
There is a big difference between "mean" and "truth": Mean is saying something that is disrespectful, opinion, hateful, crude etc.
I would strongly caution you tell your harsh jokes to those that know you or at least won't punch you in the nose for the mean jokes.