Mercutio only appears in Act II scene 4, but he is definitely seen in this scene as playing the dual role of jester and friend to Romeo. Note the way in which he engages in a battle of wits with Romeo, showing his intelligence but also his humour through elaborate punning such as the following example shows:
That's as much as to say, such a case as yours constrains a man to bow in the hams.
Here, Mercution is playing on the alternative meaning of "case" which is a set of clothes, and "hams" to mean legs.
However, at the same time, this scene starts off with Mercutio being concerned for his friend Romeo, wondering where he is and what has happened to him:
Where the devil should this Romeo be?
Came he not home tonight?
Thus we can see in this scene that Mercutio performs the dual function of friend and jester, both roles which are accomplished by him brilliantly.