MCA-specific extension (TODO move to other project)

* template formatting methods
* don't swallow exceptions
* write "x-mca" fields to Codegen classes