How can I migrate eCommerce product data from WooCommerce to Hygraph using Claude Code and MCP?
The migration process involves exporting your WooCommerce product data as a JSON file, then using Claude Code connected to Hygraph's Model Context Protocol (MCP) server to automate schema analysis, content modeling, and data import. Claude can inspect your WooCommerce export, suggest schema changes, and apply safe, atomic migrations. The process includes analyzing the export, updating your Hygraph schema, and programmatically importing product data. Note: MCP cannot upload binary assets directly, so image URLs may need to be stored as strings or uploaded separately. Read the full tutorial. Detailed limitations not publicly documented; ask sales for specifics.
What are the main steps to set up Hygraph and connect MCP to Claude Code?
First, create a Hygraph account and project. Then, generate a Permanent Auth Token (PAT) in your Hygraph dashboard under Project Settings > Access > Permanent Auth Tokens. Use this token to authenticate Claude's MCP connection. Configure the MCP server in Claude Code using your project's endpoint URL, which includes the hosted region and environment name. Once connected, Claude can inspect your schema, suggest changes, and automate migrations. Note: MCP supports creating and updating schema elements but does not support deleting fields; manual deletion is required in the Hygraph dashboard. See MCP documentation.
What limitations should I be aware of when migrating images from WooCommerce to Hygraph using MCP?
Hygraph stores images as Asset fields, requiring files to be uploaded to the media library. MCP cannot upload binary files directly; it can only create entries and connect relations via GraphQL. To migrate images, you can either write a script to upload assets first, upload them manually, or store image URLs as string fields instead of Asset relations. For a fully MCP-driven migration, storing URLs as strings is recommended, but this may limit asset management capabilities. Note: MCP does not support deleting fields, so schema cleanup must be done manually. Learn more about Asset uploads.
How long does it take to migrate eCommerce product data to Hygraph using MCP and Claude Code?
In the documented tutorial, migrating 10 WooCommerce products (including schema analysis, migration, and publishing) took approximately 5 minutes and 9 seconds after setup. Actual migration time may vary based on data volume and schema complexity. Note: Initial setup and schema alignment may require additional time, especially for larger or more complex datasets. Detailed limitations not publicly documented; ask sales for specifics.
How do I update my Next.js storefront to fetch product data from Hygraph after migration?
After migrating your data, update your Next.js app to fetch products from Hygraph using the GraphQL Content API. Replace local JSON imports with GraphQL queries, adjust your data functions (e.g., getAllProducts, getProductBySlug), and use environment variables for the Hygraph endpoint. Ensure your project grants at least read permissions for the Content API. See the completed migration example on GitHub. Note: Some manual adjustments may be needed to match your existing product type shape.
Features & Capabilities
What is the Hygraph Model Context Protocol (MCP) and how does it help with migrations?
The Hygraph Model Context Protocol (MCP) is an API layer that allows AI assistants like Claude Code to inspect, analyze, and modify your Hygraph project schema and content. MCP enables automated schema creation, safe migrations, and programmatic data import. It supports creating and updating schema elements, but does not allow deleting fields or uploading binary assets. This makes it useful for automating repetitive migration tasks, but manual intervention is required for asset uploads and schema cleanup. Read the MCP documentation.
What APIs does Hygraph provide for content management and migration?
Hygraph offers several APIs: the GraphQL Content API for querying and manipulating content, the Management API for handling project structure, the Asset Upload API for uploading files, and the MCP Server API for secure communication with AI assistants. Each API is optimized for specific use cases, such as high-performance content delivery or automated schema management. Note: The MCP API does not support deleting or unpublishing operations. See API Reference.
Performance & Product Limitations
What are the performance characteristics of Hygraph's migration endpoints?
Hygraph's high-performance endpoints are optimized for low latency and high read-throughput, ensuring efficient content delivery during and after migration. The read-only cache endpoint provides a 3-5x latency improvement, which benefits large-scale data imports and frontend performance. Note: Actual migration speed depends on data volume and schema complexity. Read more about endpoint performance.
What are the main limitations of using Hygraph MCP for eCommerce data migration?
Key limitations include: MCP cannot upload binary assets (images must be handled separately), MCP does not support deleting or unpublishing fields (manual cleanup required), and some schema adjustments may require manual intervention. These constraints mean that while MCP can automate much of the migration, asset management and schema cleanup are not fully automated. Best fit for teams prioritizing schema automation; teams needing full asset migration may want to consider alternatives or hybrid approaches. See MCP limitations.
Documentation & Support
Where can I find technical documentation for Hygraph migrations and MCP?
Comprehensive technical documentation is available for all Hygraph APIs, schema components, and migration tools. Key resources include the MCP Server documentation, API Reference, and Getting Started guides. For integration-specific guides (e.g., Mux, Akeneo, Auth0), see the Integrations documentation. Note: For advanced migration scenarios or troubleshooting, community support is available via Hygraph Slack.
Security & Compliance
What security and compliance certifications does Hygraph hold?
Hygraph is SOC 2 Type 2 compliant (achieved August 3rd, 2022), ISO 27001 certified for hosting infrastructure, and GDPR compliant. These certifications ensure that your migrated data is managed according to international security and privacy standards. For more details, visit the Hygraph Secure Features page. Note: For project-specific compliance requirements, contact Hygraph support.
Use Cases & Success Stories
What are some real-world examples of successful migrations to Hygraph?
Notable success stories include Samsung, which improved customer engagement by 15% after migrating to Hygraph, and Komax, which achieved a 3x faster time-to-market by managing over 20,000 product variations across 40+ markets. Voi scaled multilingual content across 12 countries and 10 languages, while AutoWeb saw a 20% increase in website monetization. See more case studies at Hygraph's case studies page. Note: Migration complexity and outcomes may vary by project.
Integrations & Extensibility
What integrations are available for Hygraph to support eCommerce migrations?
Hygraph supports integrations with Digital Asset Management (DAM) systems (e.g., Aprimo, AWS S3, Bynder, Cloudinary, Imgix, Mux, Scaleflex Filerobot), hosting platforms (Netlify, Vercel), Product Information Management (Akeneo), commerce solutions (BigCommerce), and translation/localization tools (EasyTranslate). For a full list, visit the Hygraph Marketplace. Note: Integration capabilities may require additional configuration or custom development for complex migration scenarios.
Migrating eCommerce product data to Hygraph using Claude Code and MCP
Learn how to migrate eCommerce product data to Hygraph using Claude Code and MCP to automate schema creation, content modeling, and data import.
Written by Joel
on Feb 26, 2026
Migrating product data between eCommerce systems is rarely an exciting process.
Whether you’re moving from WooCommerce, Shopify, or a legacy platform, you’re often left with a massive JSON export file. The real challenge isn’t exporting the data, but rebuilding your content model in a new CMS and importing everything safely without breaking your frontend.
In this tutorial, we’ll explore a different approach. Instead of manually recreating models and copying product data field by field, we’ll use Claude Code connected to Hygraph’s MCP (Model Context Protocol) server to:
Analyze an existing WooCommerce product export
Automatically design and update our CMS schema
Apply safe, atomic migrations
Import product data programmatically
Switch a Next.js storefront from local JSON to Hygraph
By the end, we’ll have a fully functional headless eCommerce backend generated and migrated with AI assistance.
From there, pages render products directly from the local JSON file, but the goal is to move the data into a CMS like Hygraph so it’s easy to manage products as a team, localize, and do many other things without touching code.
#Setting up Hygraph and connecting MCP to Claude Code
To follow along with this tutorial, you’ll need a Hygraph account. If you don’t already have one, read the Hygraph quickstart guide for step-by-step instructions on creating a project and getting familiar with the dashboard.
Once your account is ready, create a new Hygraph project.
Normally, the next step would be to manually define your schema. Since this is an eCommerce example, I initially created a basic Product model and added a few obvious fields like name, slug, description, price, currency, inStock, stockQuantity, and image fields.
At that point, everything looked fine. But instead of continuing to manually mirror the WooCommerce structure, I wanted to see how far MCP could take this.
So I prompted Claude to compare my WooCommerce JSON export with the current Hygraph schema and point out any gaps.
Using the HygraphMCP connection, inspect my current project schema.List the models and fields that exist right now(especially Product).
Once that worked, I pointed Claude at the WooCommerce export and asked it to compare the JSON structure against my current schema and highlight what I was missing:
I have a WooCommerce product exportJSONat: data/woocommerce-products-export.json
Compare the JSONstructure(including products, categories, tags, pricing, stock, images)with my current Hygraph schema.
Tell me which fields from the JSON aren't represented inHygraph yet, which fields are mismatched(types, naming, structure) and what schema changes you recommend to support thisexport cleanly.
Claude immediately spotted gaps in areas such as sale_price, proper category modeling, and tags. It also suggested that categories shouldn’t just be a string array forever; they should be a real model with a relationship.
I followed up with a prompt to generate and apply the schema changes.
Instead of manually designing the schema first, you can create a blank Hygraph project, connect to MCP, and let Claude analyze your exported JSON to suggest and implement the most appropriate model structure.
Connecting Hygraph MCP to Claude Code
To make use of the Hygraph MCP, you need to first generate a Permanent Auth Token (PAT) in the Hygraph dashboard.
Go to Project Settings > Access > Permanent Auth Tokens and click Generate MCP PAT as shown below:
You’ll use this token to authenticate Claude’s MCP connection.
Once you have your PAT, configure the Hygraph MCP server in Claude Code. The exact setup depends on your environment, but conceptually it looks like this:
claude mcp add hygraph https://mcp-YOUR_PROJECT_HOSTED_REGION.hygraph.com/YOUR_PROJECT_IDENTIFIER/YOUR_ENVIRONMENT_NAME/mcp \
To get your MCP endpoint URL (which includes both the environment name and the hosted region), open your Hygraph dashboard and navigate to Project Settings > Endpoints.
You can now run the command in your terminal. Once this is successful, you can verify using the /mcp command:
At this point, Claude has visibility into your CMS via the available MCP tools. For example, there are tools like get_project_info, which is called when you use a prompt like “Can you access my Hygraph project?”:
#Migrating the WooCommerce products into Hygraph using MCP
The real advantage of MCP is that you can converse with Claude (or any AI agent) and have it reason about your project before taking action.
For example, imagine you’ve only created a blank Hygraph project with no models. Instead of manually building your schema from scratch, you can simply tell Claude:
Using the HygraphMCPconnection:
1.Inspect my current project.
2.Analyze the WooCommerceexport at data/woocommerce-products-export.json.
3.Suggest what models and fields my schema should include.
4.Explain your reasoning before making changes.
Claude will inspect your project, detect whether models exist (or if they’re incomplete), and analyze the WooCommerce JSON structure. It will identify products, categories, pricing structure, stock data, tags, and images, and then suggest a clean content model to represent that structure inside Hygraph.
Once your schema is in place, you may want to pause before pushing the actual products.
If you look closely at the WooCommerce export, you'll see that every product includes image URLs. However, Hygraph doesn’t treat images as simple strings. By default, images are stored as Assets, so files must be uploaded to the media library before they can be linked to entries.
So you can ask Claude:
In my WooCommerceexport, product images are URLs.Hygraph uses Asset fields for images.
How should we handle image migration using MCP?CanMCP upload the images directly?What are the best options?
This is where having an AI assistant is powerful. Claude explained that while MCP can create entries and connect relations through GraphQL, uploading binary files requires a separate multipart upload process. That means MCP alone cannot directly upload image files into Hygraph’s Asset system.
At this point, there are trade-offs. You could:
Write a small upload script to push images first and then connect them.
Upload assets manually.
Or, for the purpose of a clean migration demo, store image URLs as string fields instead of Asset relations.
For this tutorial, I chose the third option. That meant removing the existing images and primaryImage Asset relation fields and replacing them with simple string fields like imageUrl and imageUrls.
Here’s another subtle but important detail about the Hygraph MCP. It supports creating and updating schema elements, but it does not support deleting fields.
So, the MCP helped create the new string fields. I then proceed to manually delete the old Asset relation fields from the Hygraph dashboard.
Now we’re ready to migrate
With the schema aligned and the image strategy decided, we’re finally ready to migrate the content.
At this stage, Claude already understands the WooCommerce JSON structure, the updated Hygraph schema, how image URLs should be mapped, and how categories relate to products.
You can now simply tell the AI:
Go ahead and migrate the WooCommerceexport at data/woocommerce-products-export.json into Hygraph.
Ensure all relationships are handled correctly and publish the entries once created.
The MCP then kicks in by moving the categories first, mapping things properly, and moving all the products as drafts first. Claude always asks for your approval before calling the MCP tools. You can grant automatic permissions for similar tasks to speed up execution.
This took 5 mins and 9 secs:
The data also gets published:
It also properly formats the Rich text fields:
#Updating the Next.js storefront to fetch from Hygraph
At this point, the data is no longer sitting in a local JSON file. It lives inside Hygraph as structured content.
The only thing left is to update the Next.js app to fetch products from Hygraph instead of importing them from woocommerce-products-export.json.
Instead of manually writing everything from scratch, Claude can help here as well with a prompt like this:
TheWooCommerce data has now been migrated into Hygraph.
Help me update my Next.js data layer to:
1.Fetch products fromHygraph using GraphQL.
2.Replace getAllProducts and getProductBySlug.
3.Keep the existing Product type shape as close as possible.
4.Use environment variables for the Hygraph endpoint.
Because Claude Code understands the project's structure, it generated the necessary GraphQL query, created a small fetch helper, adjusted the existing data functions, and wired everything together.
Within five minutes, the storefront stopped reading from a local JSON file and began pulling live data from Hygraph. All you need to do manually is grab your Hygraph Performance Content API endpoint:
Then add it to your .env.local file. You’ll also need to make sure your project grants at least read permissions for the Content API.
Once that’s done, restart your development server.
Now, when you visit the homepage, product listing page, or individual product pages, everything is powered by Hygraph.
We started with a WooCommerce export and a Next.js app powered by static JSON. Instead of manually rebuilding the schema and copying data into a CMS, we connected Claude Code to Hygraph using MCP and let it:
Analyze the exported data
Design the appropriate schema
Apply safe schema migrations
Handle relationships
Push structured content into Hygraph
Help refactor the frontend to use GraphQL
Along the way, we made conscious trade-offs, like storing image URLs as strings to keep the migration fully MCP-driven, and saw firsthand where the Hygraph MCP excels (create, update, migrate) and where it has limitations (deleting fields, uploading binary assets).
The result is a fully working headless eCommerce backend powered by Hygraph, with a frontend that didn’t need to be rewritten. And the entire process was conversational.
That’s the real shift here. MCP turns your AI assistant from a code generator into an infrastructure-aware collaborator.
Blog Author
Joel Olawanle
Joel Olawanle is a Frontend Engineer and Technical writer based in Nigeria who is interested in making the web accessible to everyone by always looking for ways to give back to the tech community. He has a love for community building and open source.
Share with others
Sign up for our newsletter!
Be the first to know about releases and industry news and insights.
Migrating eCommerce product data to Hygraph using Claude Code and MCP
Learn how to migrate eCommerce product data to Hygraph using Claude Code and MCP to automate schema creation, content modeling, and data import.
Written by Joel
on Feb 26, 2026
Migrating product data between eCommerce systems is rarely an exciting process.
Whether you’re moving from WooCommerce, Shopify, or a legacy platform, you’re often left with a massive JSON export file. The real challenge isn’t exporting the data, but rebuilding your content model in a new CMS and importing everything safely without breaking your frontend.
In this tutorial, we’ll explore a different approach. Instead of manually recreating models and copying product data field by field, we’ll use Claude Code connected to Hygraph’s MCP (Model Context Protocol) server to:
Analyze an existing WooCommerce product export
Automatically design and update our CMS schema
Apply safe, atomic migrations
Import product data programmatically
Switch a Next.js storefront from local JSON to Hygraph
By the end, we’ll have a fully functional headless eCommerce backend generated and migrated with AI assistance.
From there, pages render products directly from the local JSON file, but the goal is to move the data into a CMS like Hygraph so it’s easy to manage products as a team, localize, and do many other things without touching code.
#Setting up Hygraph and connecting MCP to Claude Code
To follow along with this tutorial, you’ll need a Hygraph account. If you don’t already have one, read the Hygraph quickstart guide for step-by-step instructions on creating a project and getting familiar with the dashboard.
Once your account is ready, create a new Hygraph project.
Normally, the next step would be to manually define your schema. Since this is an eCommerce example, I initially created a basic Product model and added a few obvious fields like name, slug, description, price, currency, inStock, stockQuantity, and image fields.
At that point, everything looked fine. But instead of continuing to manually mirror the WooCommerce structure, I wanted to see how far MCP could take this.
So I prompted Claude to compare my WooCommerce JSON export with the current Hygraph schema and point out any gaps.
Using the HygraphMCP connection, inspect my current project schema.List the models and fields that exist right now(especially Product).
Once that worked, I pointed Claude at the WooCommerce export and asked it to compare the JSON structure against my current schema and highlight what I was missing:
I have a WooCommerce product exportJSONat: data/woocommerce-products-export.json
Compare the JSONstructure(including products, categories, tags, pricing, stock, images)with my current Hygraph schema.
Tell me which fields from the JSON aren't represented inHygraph yet, which fields are mismatched(types, naming, structure) and what schema changes you recommend to support thisexport cleanly.
Claude immediately spotted gaps in areas such as sale_price, proper category modeling, and tags. It also suggested that categories shouldn’t just be a string array forever; they should be a real model with a relationship.
I followed up with a prompt to generate and apply the schema changes.
Instead of manually designing the schema first, you can create a blank Hygraph project, connect to MCP, and let Claude analyze your exported JSON to suggest and implement the most appropriate model structure.
Connecting Hygraph MCP to Claude Code
To make use of the Hygraph MCP, you need to first generate a Permanent Auth Token (PAT) in the Hygraph dashboard.
Go to Project Settings > Access > Permanent Auth Tokens and click Generate MCP PAT as shown below:
You’ll use this token to authenticate Claude’s MCP connection.
Once you have your PAT, configure the Hygraph MCP server in Claude Code. The exact setup depends on your environment, but conceptually it looks like this:
claude mcp add hygraph https://mcp-YOUR_PROJECT_HOSTED_REGION.hygraph.com/YOUR_PROJECT_IDENTIFIER/YOUR_ENVIRONMENT_NAME/mcp \
To get your MCP endpoint URL (which includes both the environment name and the hosted region), open your Hygraph dashboard and navigate to Project Settings > Endpoints.
You can now run the command in your terminal. Once this is successful, you can verify using the /mcp command:
At this point, Claude has visibility into your CMS via the available MCP tools. For example, there are tools like get_project_info, which is called when you use a prompt like “Can you access my Hygraph project?”:
#Migrating the WooCommerce products into Hygraph using MCP
The real advantage of MCP is that you can converse with Claude (or any AI agent) and have it reason about your project before taking action.
For example, imagine you’ve only created a blank Hygraph project with no models. Instead of manually building your schema from scratch, you can simply tell Claude:
Using the HygraphMCPconnection:
1.Inspect my current project.
2.Analyze the WooCommerceexport at data/woocommerce-products-export.json.
3.Suggest what models and fields my schema should include.
4.Explain your reasoning before making changes.
Claude will inspect your project, detect whether models exist (or if they’re incomplete), and analyze the WooCommerce JSON structure. It will identify products, categories, pricing structure, stock data, tags, and images, and then suggest a clean content model to represent that structure inside Hygraph.
Once your schema is in place, you may want to pause before pushing the actual products.
If you look closely at the WooCommerce export, you'll see that every product includes image URLs. However, Hygraph doesn’t treat images as simple strings. By default, images are stored as Assets, so files must be uploaded to the media library before they can be linked to entries.
So you can ask Claude:
In my WooCommerceexport, product images are URLs.Hygraph uses Asset fields for images.
How should we handle image migration using MCP?CanMCP upload the images directly?What are the best options?
This is where having an AI assistant is powerful. Claude explained that while MCP can create entries and connect relations through GraphQL, uploading binary files requires a separate multipart upload process. That means MCP alone cannot directly upload image files into Hygraph’s Asset system.
At this point, there are trade-offs. You could:
Write a small upload script to push images first and then connect them.
Upload assets manually.
Or, for the purpose of a clean migration demo, store image URLs as string fields instead of Asset relations.
For this tutorial, I chose the third option. That meant removing the existing images and primaryImage Asset relation fields and replacing them with simple string fields like imageUrl and imageUrls.
Here’s another subtle but important detail about the Hygraph MCP. It supports creating and updating schema elements, but it does not support deleting fields.
So, the MCP helped create the new string fields. I then proceed to manually delete the old Asset relation fields from the Hygraph dashboard.
Now we’re ready to migrate
With the schema aligned and the image strategy decided, we’re finally ready to migrate the content.
At this stage, Claude already understands the WooCommerce JSON structure, the updated Hygraph schema, how image URLs should be mapped, and how categories relate to products.
You can now simply tell the AI:
Go ahead and migrate the WooCommerceexport at data/woocommerce-products-export.json into Hygraph.
Ensure all relationships are handled correctly and publish the entries once created.
The MCP then kicks in by moving the categories first, mapping things properly, and moving all the products as drafts first. Claude always asks for your approval before calling the MCP tools. You can grant automatic permissions for similar tasks to speed up execution.
This took 5 mins and 9 secs:
The data also gets published:
It also properly formats the Rich text fields:
#Updating the Next.js storefront to fetch from Hygraph
At this point, the data is no longer sitting in a local JSON file. It lives inside Hygraph as structured content.
The only thing left is to update the Next.js app to fetch products from Hygraph instead of importing them from woocommerce-products-export.json.
Instead of manually writing everything from scratch, Claude can help here as well with a prompt like this:
TheWooCommerce data has now been migrated into Hygraph.
Help me update my Next.js data layer to:
1.Fetch products fromHygraph using GraphQL.
2.Replace getAllProducts and getProductBySlug.
3.Keep the existing Product type shape as close as possible.
4.Use environment variables for the Hygraph endpoint.
Because Claude Code understands the project's structure, it generated the necessary GraphQL query, created a small fetch helper, adjusted the existing data functions, and wired everything together.
Within five minutes, the storefront stopped reading from a local JSON file and began pulling live data from Hygraph. All you need to do manually is grab your Hygraph Performance Content API endpoint:
Then add it to your .env.local file. You’ll also need to make sure your project grants at least read permissions for the Content API.
Once that’s done, restart your development server.
Now, when you visit the homepage, product listing page, or individual product pages, everything is powered by Hygraph.
We started with a WooCommerce export and a Next.js app powered by static JSON. Instead of manually rebuilding the schema and copying data into a CMS, we connected Claude Code to Hygraph using MCP and let it:
Analyze the exported data
Design the appropriate schema
Apply safe schema migrations
Handle relationships
Push structured content into Hygraph
Help refactor the frontend to use GraphQL
Along the way, we made conscious trade-offs, like storing image URLs as strings to keep the migration fully MCP-driven, and saw firsthand where the Hygraph MCP excels (create, update, migrate) and where it has limitations (deleting fields, uploading binary assets).
The result is a fully working headless eCommerce backend powered by Hygraph, with a frontend that didn’t need to be rewritten. And the entire process was conversational.
That’s the real shift here. MCP turns your AI assistant from a code generator into an infrastructure-aware collaborator.
Blog Author
Joel Olawanle
Joel Olawanle is a Frontend Engineer and Technical writer based in Nigeria who is interested in making the web accessible to everyone by always looking for ways to give back to the tech community. He has a love for community building and open source.
Share with others
Sign up for our newsletter!
Be the first to know about releases and industry news and insights.