MetaboAnalyst has an Integrated Pathway Analysis tool that will do this in an indirect fashion. You may want to take a look.
As I understand, we don't yet know the genetic origin of the vast majority of known metabolites, and don't even know the identity of the vast majority of metabolites themselves.
The only other tool that I have come across is commercial and the name slips my mind currently. It was produced by a US-based company and I only heard about it whilst I was working over there.