2.3.6. Extend Products with the MCP Server

In this chapter, you'll learn how to use the Medusa MCP server to extend Medusa's Product Module with custom data and features.

What is the Extend Products Tool?#

The Medusa MCP server exposes a get_product_custom_data_guide tool that returns a complete, step-by-step implementation guide for attaching custom data to Medusa's Product Module data models: product, productVariant, and productOption.

You describe the data you want to attach, and your AI agent produces the extension: the custom data is stored, it's associated with products through a module link, it stays in sync as products are created, updated, and deleted, it can be read through the existing product APIs, and merchants can optionally manage it from the Medusa Admin.

The tool covers any product-adjacent data the built-in Product Module doesn't store, including brands, vendors, or custom SEO fields.


Who is this Useful for?#

This tool is useful for:

  • Developers who need to store product data that Medusa's Product Module doesn't natively support.
  • Teams whose catalog has domain-specific attributes, such as technical specs, compliance data, or per-market fields.
  • Developers building B2B, marketplace, or digital-product experiences on Medusa.

Why Use This Tool?#

Extending a product is where AI agents most often produce something that looks right and is wrong. Medusa's modules are isolated, so custom product data doesn't live on the product itself, and an agent working from general ecommerce instincts will reach for the wrong shape: forking the Product Module, adding a column to a Medusa table, or writing non-trivial data into product.metadata. All three appear to work at first and become expensive later.

Compared to reading the documentation yourself or asking a Medusa question, this tool gives you:

  • The supported architecture by default. Your agent builds the extension the way Medusa is designed to be extended, instead of choosing an approach that happens to compile.
  • A right-sized solution. The guide has your agent pick the lightest approach that actually fits your data, so you don't get a full module-and-link scaffold for something that didn't need one.
  • Data that stays consistent with your products. The extension is built so the custom data follows the product lifecycle, rather than drifting or leaving orphaned records behind when products are deleted.
  • Structural decisions made before migrations run. Whether the data hangs off products, variants, or options, and whether a product can have many of them, are settled up front. These are cheap to decide and expensive to change afterwards.
  • Ordered steps with verification along the way. The link is validated before anything is built on top of it, which turns a class of confusing downstream failures into an early, obvious one.

Your agent still calls ask_medusa_question as it works, to confirm exact API shapes for your Medusa version. The guide decides the architecture; the documentation supplies the details.


How to Use the Extend Products Tool#

After connecting to the Medusa MCP server, ask your AI agent for the product extension you want. Your agent infers the name of the data from your request, calls the tool, and follows the returned guide.

For example:

Example prompt
Implement a brand feature to allow merchants to associate products with brands.
Example prompt
Attach downloadable digital assets to products.

What to Expect#

  1. Your AI agent calls the tool with a name derived from your request, such as brand, supplier, or review.
  2. It presents an implementation plan, including which product data model it will link to and whether the relationship is one-to-one or one-to-many.
  3. Once you approve, it scaffolds the module, the data model, the link, the workflows, and the hook handlers.
  4. It runs the migrations and verifies the link before continuing.
  5. If you asked for it, it adds an admin widget so merchants can manage the data from the Medusa Admin.
Tip: Tell your agent whether the data is per product, per variant, or per option, and whether a product can have many of them. These choices determine the link target and cardinality, which are much cheaper to get right up front than to change after migrations have run.

Not an MCP server user?#

If you don't use the Medusa MCP server but need help extending products with custom data and features, contact our team for other options.

Was this chapter helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Medusa MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break