In this paper, we propose a template-based MHP (Multimedia Home Platform) authoring tool. The temporal and spatial behavior of an MHP application can be authored and stored in an XML-based instance description file. The MHP authoring tool generates the target MHP Java source codes by utilizing the "real programs generators" for the modules used inside the MHP application being authored. The real program generator for a module is generated by a "meta program generator" according to the XML template description for the module. The Java source codes of an instance of the module are generated by the real program generator according to the XML description for the instance. The proposed design on code generation can simplify the way to extend the MHP authoring tool to support new features, such as DRM or PVR. In addition, the MHP applications generated by the authoring tool are also reconfigurable. They can adapt to both the MHP set-top box resource change and the change on transmission bandwidth of a DVB object carousel.