add command encoder for mpub