Content migration through MCP

Has anyone played with migrating content from another CMS into Umbraco using the MCP server?

I have fiddled with it for some hours now, but I keep getting below mediocre results. It also just lies about what it does, eg. saying it created 5 blocks from the page it should import, while in reality it only created 3. In addition it didn’t even port all the content of those blocks.

Also when it creates document types for new block types, it forgets to add the properties to a group or tab, which makes them unavailable in the backoffice. They are present in the API, so the AI thinks everything is ok.

I think maybe with a lot of rules in your assistant/agent? to verify these fields exists and to verify once created? I am just saying it could work.

@skttl I saw this post from Jeroen pop up recently and sounds like it could be a good inspiration for you.

When all you have is a hammer, everything looks like a nail.

As cool as it is that this COULD be done via AI, the issue you have is that you want something repeatable with rules and that’s not really what AI does well. AI is good at working things out and problem solving but this is different every time so lacks the consistency that you would want in a migration tool.

The better approach I’m finding is to use AI to help you define the context of what it is to migrate from one environment to the other. What does the data look like on both ends, and how do these map. Have it help you find the edge cases and document it all down. Then, when you’ve got this, use it as context to generate scripts to perform the migration for you. Then your scripts are repeatable. But if you think of something you forgot, get it to update the context document and the script accordingly.

I’m basically in the middle of a very similar task right now. Whilst building an Umbraco Commerce MCP POC I wanted some demo data, so rather than asking it to try and use some endpoints to generate content for me, I’ve given in an export of all product data, an export of my DB tables and example content. The defined the rules I want to apply to populate the database with demo orders. The script it generated mimics 3 years of realistic order growth, complete with different customer personas with different buying patterns. Repeat customers and even seasonality boosts in sales. And all of this is repeatable because it’s in a script file I can run as many times as I need to and I know it will produce the same output.

2 Likes

@skttl I have been playing around with this my self.

First thing I tried is getting data out of an existing Umbraco installation and just save it as XML or JSON on disk.

Got al lot of different results.

  • Not exporting all items I requested.
  • Structure of export files was different each time.
  • Sometimes properties were missing (for example from compositions). Even if I told it to export those properties
  • Different language models produce different results.

After a while I gave up. I think you will need to define a lot of clear rules.

In the time I invested in this, is about the same time I would need to program this myself.
If I find sometime I will look at creating my own MCP server for this specific task.
Something like : Building an MCP Server in Umbraco: My Journey into AI-Powered Content Management - DEV Community

1 Like

Yes I saw that, but it also just looks like a much more simple job to just move two property values across.

My initial concern was also that the result would never be the same. But I could somehow live with that thinking “the AI is just an intern hired to do the job, I would have to verify after anyways”.

But now I also think the way forward might be to convert the JSON i’ve got, into something more manageable, maybe usync files. But seems like @dawoe already tried that route :slight_smile:

the uSync MCP will arrive soon and then “export all my data to disk”, will well use the code we know works :wink:

2 Likes

I’m see the potential of AI, but I’m a bit sceptical. We want to do everything with AI, but I feel that in a lot of situations, AI is not the best solution. AI is so horrible non-deterministic that if you want exact results, AI is not the way to go. I’ve been toying with the idea of letting AI create the framework for new websites, having it create the neccessary document types, components etc. But I want the result to be exactly the same very time. I think you need such an elaborate prompt with so much details and information and still you need to hope that it just doesn’t hallucinate. In essence, I’d better use uSync for instance because it’s results are consistent.

2 Likes

@Luuk we shouldn’t want to do everything with AI, only things that will actually improve our lives. I think Matt’s point is great: have the AI spit out automation scripts that you can review and tweak. I think the best part here is:

Yes.. until you don’t! And then it’s a matter of: I know exactly what my automation scripts have done so far and then you go: "Okay Umbraco MCP, I need to add these two fields to the SEO tab for all doctypes except the ones without a template. "

So, get predictable results and then be able to quickly tweak things that would take a lot of time to do manually otherwise.

2 Likes

Absolutely, the boring tedious stuff can absolutely be done by AI, especially if it has an example or examples. As long as you verify the results :slight_smile:

Input must also be checked here. People make mistakes. In the above example with Sebastian, a single word can bring the entire system to a halt. “I need to add these 2345 fields to the SEO tab for all…”