I have the following quantity:

$$
g(t)=(f(t))^{M_{t}},
$$

where $M_{t}$ is a jump process neither Markovian nor Levy and $f(t)$ is a positive, increasing but limited, right-continuous function.

How can I differentiate $g$ with respect to $t$? Is there a kind of generalized Ito's lemma?

Thanks in advance.