Applying any MDG is now simply by adding the appropriate stereotype to the element. This can be done manually or via a script. The latter is nice if you can determine the right set automatically. Else you'd probably need to go the manual way. AFAIK (haven't tried, but remember this from a post) you can drag the right element from the MDG toolbox onto the element to change and it will take its properties.
q.
I suspect "here be dragons".
I'm not sure we're necessarily understanding what the OP is asking.
But, assuming it's: "I've created my own MDG and I want to apply it to an existing repository", I suspect q's point about dragging and dropping the new element type over the old element type MANUALLY is the best option as (hopefully) Sparx have (behind the scene) executed the use cases involved.
Trying to do it via scripts (especially if you're not familiar with EA's internals) could e a recipe for disaster. Making sure "all the i's are crossed and t's dotted"

is not trivial. It's not rocket science, but not trivial.
We are evolving multiple MDGs into one while the repository is "in flight" and it's doable, but there's a lot of "balls to keep in the air". We have nearly 80,000 items so, manual is not possible.
Paolo