Medusa MCP in n8n

In this guide, you'll learn how to connect an n8n workflow to the Medusa MCP server and use it to ask questions about your Cloud stores.

Note: Only n8n Cloud can connect to the Medusa MCP server. Self-hosted n8n instances can't connect, because each instance has a different OAuth callback URL, and Medusa only accepts callback URLs that it allows.

What is the Medusa MCP in n8n?#

n8n's MCP Client Tool connects an AI Agent node to the Medusa MCP server, so the agent in your workflow can retrieve your stores' orders, products, customers, and other commerce data.

The connection is read-only. The agent can retrieve data from your stores, but it can't create, update, or delete data.

Note: The Medusa MCP server is in beta access. If an environment's latest build is from before October 8, 2026, rebuild it before you connect it to n8n, as explained in the Medusa MCP guide.

Prerequisites#

Add Medusa MCP to an n8n Workflow#

The Medusa MCP server authenticates with OAuth, and n8n registers itself with Medusa automatically. So, you don't need to create a client ID or secret.

To add the Medusa MCP server to an n8n workflow:

  1. In your n8n workflow, add an AI Agent node.
  2. Under the AI Agent node's tools, add an MCP Client Tool.
  3. In the MCP Client Tool, create a new credential of type MCP OAuth2 API.
  4. Fill in the credential's fields:
    • Use Dynamic Client Registration: Turn it on.
    • Server URL: https://cloud.medusajs.com/mcp
    • Allowed HTTP Request Domains: Choose Specific Domains, then enter cloud.medusajs.com.
    • Resource URL: https://cloud.medusajs.com/mcp
  5. Click Save, then click Connect.
  6. In the browser window that opens, log in to your Cloud account.
  7. On the consent page, which shows the application's name as n8n, select the environments that n8n can access, then click Approve.

Refer to the Medusa MCP guide for more details on the consent page.


Use Medusa in n8n#

Once you connect the credential, run the AI Agent node with a prompt to test the connection. For example:

  • "List my connected Medusa environments."
  • "Show me the 5 most recent orders in my store, with each order's total and status."
  • "How many orders are waiting to be fulfilled?"

Refer to the Medusa MCP guide for the list of tools that the agent can call.


Remove Medusa from n8n#

The n8n connection appears with the n8n logo in your organization's Connections settings, where you can view its details.

To remove the connection, revoke it from the Connections settings.

To change the stores that n8n can access, change the connection's environments from the Connections settings.


Troubleshooting#

Domain Not Allowed Error#

If n8n shows a "Domain not allowed" error when you click Connect, add api.prod.medusajs.cloud to the credential's Allowed HTTP Request Domains, along with cloud.medusajs.com.

Other Errors#

Refer to the Medusa MCP troubleshooting section for other common errors and how to fix them.

Was this guide helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs 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
⇧↵