Mean in this use is an adjective. Describing a noun, generally people.
"You are being mean."
"She was a mean lady."
You can use the adverb meanly to describe things that are done in a mean manner.
"I don't like being treated meanly."
"Please don't meanly post this on Twitter."