Medusa MCP Server
The Medusa MCP Server is a modular, extensible backend for managing Medusa's data models, enabling automation, integration, and AI-driven workflows.
Authenticate and manage users: Handle authentication, sessions, and user management for both customers and administrators
Manage commerce operations: Handle carts, orders, payments, shipping, product catalog, pricing, returns, and fulfillment
Automate workflows: Create automated inventory management, pricing adjustments, and order fulfillment processes
Enable AI integration: Serve as a bridge for AI agents to analyze trends and trigger actions based on real-time data
Extend functionality: Utilize the plugin system to add new capabilities or integrate with external tools (email, analytics, APIs)
Customize via API: Tailor the server by replacing OpenAPI definitions and connecting with external services
Scale efficiently: Deploy across cloud, on-premises, or hybrid environments with real-time service orchestration
Works out-of-the-box with the Medusa JavaScript SDK, providing seamless integration for JavaScript applications to communicate with Medusa's backend services.
Implements the Model Context Protocol (MCP) for the Medusa JavaScript SDK, enabling efficient management and interaction with Medusa's data models for e-commerce applications.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Medusa MCP Server list all products with inventory below 50 units"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
medusa-mcp
Overview
medusa-mcp is a Model Context Protocol (MCP) server designed for integration with the Medusa JavaScript SDK. It provides a scalable backend layer for managing and interacting with Medusaβs data models, enabling automation, orchestration, and intelligent service extensions.
Related MCP server: Example MCP SSE Server
π§© What is an MCP Server?
An MCP server is a modular, extensible backend that:
Enables real-time service orchestration
Supports standardized, high-throughput communication
Acts as a bridge between AI/automation tools and real-world systems
These servers are used in areas like AI, IoT, and enterprise software to connect various services and automate tasks using standardized protocols like JSON-RPC.
π Key Features
Modular Architecture β Composable services for flexibility
High Efficiency β Optimized for speed and scale
Extensible Design β Add new capabilities easily
Cross-Environment Deployment β Cloud, on-prem, or hybrid
AI-Ready Interfaces β Integrate LLMs and tools seamlessly
π§ Role in AI Systems
MCP servers allow AI agents to:
Access real-time data from APIs, files, or databases
Automate business processes (e.g., order fulfillment, pricing updates)
Interact with external services in a secure and controlled way
π Medusa JS + MCP
Using medusa-mcp, Medusa JS can:
Automate workflows (e.g., inventory or pricing adjustments)
Connect with external tools (email, analytics, etc.)
Use AI agents to analyze trends and trigger actions
Enable scalable, modular architecture for commerce platforms
β¨ Features
β Model Context Protocol (MCP) support
π Scalable infrastructure
π§± Extensible plugin architecture
π Integrated with Medusa JS SDK
π οΈ Installation
Clone the repository and install dependencies:
npm installBuild the project:
npm run buildβΆοΈ Usage
Start the server:
npm startTest using the MCP Inspector:
npx @modelcontextprotocol/inspector ./dist/index.jsNote: Restart the Inspector and your browser after each rebuild.
π οΈ Generating a Claude Skill from this MCP server
You can convert this MCP server into a Claude Skill using the mcp-to-skill.py script from the mcp-to-skill-converter project, which is included in this repo as mcp-to-skill.py.
Build the MCP server (so the command in the config works):
npm run buildEnsure Python and the
mcppackage are available:pip install mcpGenerate a Skill for this server using the provided
mcp-to-skill.jsonconfig:python mcp-to-skill.py --mcp-config mcp-to-skill.json --output-dir ./skills/medusa-mcpThis will create:
SKILL.mdβ instructions for Claudeexecutor.pyβ MCP communication handlermcp-config.jsonβ MCP server configurationpackage.jsonβ minimal dependencies for the skill
Install the Skill for Claude:
cd skills/medusa-mcp pip install mcp cp -r . ~/.claude/skills/medusa-mcp
Claude will automatically discover the new Skill on next startup.
π Environment Variables
Variable | Description |
| Your Medusa backend URL |
| Your Medusa publishable API key |
| Medusa admin username (for admin) |
| Medusa admin password (for admin) |
Server runs at: http://localhost:3000
π§ Architecture Diagram
Here's how the medusa-mcp server fits into a typical setup with Medusa JS and external systems:
+-------------------------+
| AI Assistant / |
| LLM / Automation |
+-----------+-------------+
|
v
+--------------+--------------+
| MCP Server (medusa-mcp) |
|-----------------------------|
| - JSON-RPC Communication |
| - AI-Ready Interface |
| - Plugin Support |
+------+----------------------+
|
+
|
v
+-------------------+
| Medusa Backend |
| (Products, Orders)|
+-------------------+
|
|
v
+--------------+
| Medusa Store |
| Frontend |
+--------------+
|
|
v
+-------------------------+
| External Services / API |
| (e.g., Payments, Email) |
+-------------------------+π§ͺ Customization
To tailor the server to your Medusa setup:
Replace
admin.jsonandstore.jsonwith your own OAS definitions for fine-grained control.
Replace the OpenAPI schemas in the
oas/folder:admin.jsonβ Admin endpointsstore.jsonβ Storefront endpoints
Use the @medusajs/medusa-oas-cli to regenerate these files.
You can also fork this project to build your own custom MCP-powered Medusa integration.
π€ Contributing
We welcome contributions! Please see our CONTRIBUTING.md guide.
π License
This project is licensed under the MIT License. See the LICENSE file for details.
Available Tools
48 toolsGetCartsIdC
Retrieve a cart by its ID. You can expand the cart's relations or select the fields that should be returned.
Inputs: id, fields.
GetCollectionsC
Retrieve a list of collections. The collections can be filtered by fields such as handle. The collections can also be sorted or paginated.
Inputs: fields, offset, limit, order, +7 more.
GetCollectionsIdB
Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned.
Inputs: id, fields.
GetCurrenciesC
Retrieve a list of currencies. The currencies can be filtered by fields such as code. The currencies can also be sorted or paginated.
Inputs: fields, offset, limit, order, +4 more.
GetCurrenciesCodeC
Retrieve a currency by its code. You can expand the currency's relations or select the fields that should be returned.
Inputs: code, fields.
GetCustomersMeB
Retrieve the logged-in customer. You can expand the customer's relations or select the fields that should be returned.
Inputs: fields.
GetCustomersMeAddressesC
Retrieve the addresses of the logged-in customer. The addresses can be filtered by fields such as country_code. The addresses can also be sorted or paginated.
Inputs: fields, offset, limit, order, +4 more.
GetCustomersMeAddressesAddress_idC
Retrieve an address of the logged-in customer. You can expand the address's relations or select the fields that should be returned.
Inputs: address_id, fields.
GetOrdersC
Retrieve the orders of the logged-in customer. The orders can be filtered by fields such as id. The orders can also be sorted or paginated.
Inputs: fields, offset, limit, order, +4 more.
GetOrdersIdC
Retrieve an order by its ID. You can expand the order's relations or select the fields that should be returned.
Inputs: id, fields.
GetPaymentProvidersB
Retrieve a list of payment providers. You must provide the region_id query parameter to retrieve the payment providers enabled in that region.
Inputs: fields, offset, limit, order, +1 more.
GetProductCategoriesC
Retrieve a list of product categories. The product categories can be filtered by fields such as id. The product categories can also be sorted or paginated.
Inputs: fields, offset, limit, order, +12 more.
GetProductCategoriesIdB
Retrieve a product category by its ID. You can expand the product category's relations or select the fields that should be returned.
Inputs: id, fields, include_ancestors_tree, include_descendants_tree.
GetProductsC
Retrieve a list of products. The products can be filtered by fields such as id. The products can also be sorted or paginated.
Inputs: fields, offset, limit, order, +19 more.
GetProductsIdC
Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.
Inputs: id, fields, region_id, country_code, +5 more.
GetProductTagsC
Retrieve a list of product tags. The product tags can be filtered by fields such as id. The product tags can also be sorted or paginated.
Inputs: fields, offset, limit, order, +7 more.
GetProductTagsIdC
Retrieve a product tag by its ID. You can expand the product tag's relations or select the fields that should be returned.
Inputs: id, fields.
GetProductTypesC
Retrieve a list of product types. The product types can be filtered by fields such as id. The product types can also be sorted or paginated.
Inputs: fields, offset, limit, order, +7 more.
GetProductTypesIdC
Retrieve a product type by its ID. You can expand the product type's relations or select the fields that should be returned.
Inputs: id, fields.
GetRegionsC
Retrieve a list of regions. The regions can be filtered by fields such as id. The regions can also be sorted or paginated.
Inputs: fields, offset, limit, order, +6 more.
GetRegionsIdC
Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned.
Inputs: id, fields.
GetReturnReasonsC
Retrieve a list of return reasons. The return reasons can be sorted or paginated.
Inputs: fields, offset, limit, order.
GetReturnReasonsIdC
Retrieve a return reason by its ID. You can expand the return reason's relations or select the fields that should be returned.
Inputs: id, fields.
GetShippingOptionsC
Retrieve a list of shipping options for a cart. The cart's ID is set in the required cart_id query parameter.
The shipping options also be sorted or paginated.
Inputs: fields, offset, limit, order, +4 more.
PostActor_typeAuth_providerA
Authenticate a customer and receive the JWT token to be used in the header of subsequent requests.
When used with a third-party provider, such as Google, the request returns a location property. You redirect to the specified URL in your storefront to continue authentication with the third-party service.
Inputs: auth_provider.
PostActor_typeAuth_providerCallbackB
This API route is used by your storefront or frontend application when a third-party provider redirects to it after authentication. It validates the authentication with the third-party provider and, if successful, returns an authentication token. All query parameters received from the third-party provider, such as code, state, and error, must be passed as query parameters to this route.
You can decode the JWT token using libraries like react-jwt in the storefront. If the decoded data doesn't have an actor_id property, then you must register the customer using the Create Customer API route passing the token in the request's Authorization header.
Inputs: auth_provider.
PostActor_typeAuth_provider_registerC
This API route retrieves a registration JWT token of a customer that hasn't been registered yet. The token is used in the header of requests that create a customer.
Inputs: auth_provider.
PostActor_typeAuth_providerResetPasswordA
Generate a reset password token for a customer. This API route doesn't reset the customer password or send them the reset instructions in a notification.
Instead, This API route emits the auth.password_reset event, passing it the token as a payload. You can listen to that event in a subscriber as explained in this guide, then send the customer a notification. The notification is sent using a Notification Module Provider, and it should have a URL that accepts a token query parameter, allowing the customer to reset their password from the storefront.
Use the generated token to update the customer's password using the Reset Password API route.
Inputs: auth_provider.
PostActor_typeAuth_providerUpdateC
Reset a customer's password using a reset-password token generated with the Generate Reset Password Token API route. You pass the token as a bearer token in the request's Authorization header.
Inputs: auth_provider.
PostAdminAuthTokenRefreshA
Refresh the authentication token of a customer. This is useful after authenticating a customer with a third-party service to ensure the token holds the new user's details, or when you don't want customers to re-login every day.
Inputs: no named parameters.
PostCartsD
Create a cart.
Inputs: fields.
PostCartsIdCompleteC
Complete a cart and place an order.
Inputs: id, fields.
PostCartsIdCustomerB
Set the customer of the cart. This is useful when you create the cart for a guest customer, then they log in with their account.
Inputs: id, fields.
PostCartsIdLineItemsC
Add a product variant as a line item in the cart.
Inputs: id, fields.
PostCartsIdLineItemsLine_idC
Update a line item's details in the cart.
Inputs: id, line_id, fields.
PostCartsIdPromotionsC
Add a list of promotions to a cart.
Inputs: id, fields.
PostCartsIdShippingMethodsB
Add a shipping method to a cart. Use this API route when the customer chooses their preferred shipping option.
Inputs: id, fields.
PostCartsIdTaxesC
Calculate the cart's tax lines and amounts.
Inputs: id, fields.
PostCustomersC
Register a customer. Use the /auth/customer/emailpass/register API route first to retrieve the registration token and pass it in the header of the request.
Inputs: fields.
PostOrdersIdTransferAcceptB
Accept an order to be transfered to a customer's account, which was specified when the transfer request was created. The transfer is requested previously either by the customer using the Request Order Transfer Store API route, or by the admin using the Request Order Transfer Admin API route.
Inputs: id, fields.
PostOrdersIdTransferCancelC
Cancel an order transfer that the logged-in customer previously requested using the Request Order Transfer API route.
Inputs: id, fields.
PostOrdersIdTransferDeclineC
Decline an order transfer previously requested, typically by the admin user using the Request Order Transfer Admin API route.
Inputs: id, fields.
PostOrdersIdTransferRequestC
Request an order to be transfered to the logged-in customer's account. The transfer is confirmed using the Accept Order Transfer API route.
Inputs: id, fields.
PostPaymentCollectionsC
Create a payment collection for a cart. This is used during checkout, where the payment collection holds the cart's payment sessions.
Inputs: fields.
PostPaymentCollectionsIdPaymentSessionsB
Initialize and add a payment session to a payment collection. This is used during checkout, where you create a payment collection for the cart, then initialize a payment session for the payment provider that the customer chooses.
Inputs: id, fields.
PostReturnB
Create a return for an order's items. The admin receives the return and process it from their side.
Inputs: no named parameters.
PostSessionA
Set the cookie session ID of a customer. The customer must be previously authenticated with the /auth/customer/{provider} API route first, as the JWT token is required in the header of the request.
Inputs: no named parameters.
PostShippingOptionsIdCalculateC
Calculate the price of a shipping option in a cart.
Inputs: id, fields.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 48 tools
Every tool has a distinct purpose targeting specific resources and actions, such as GetCartsId for retrieving a cart by ID, PostCarts for creating a cart, and PostCartsIdComplete for completing a cart. The naming and descriptions clearly differentiate between retrieval, creation, update, and other operations, with no overlapping or ambiguous tools.
Tool names follow a highly consistent verb_noun pattern throughout, using 'Get' for retrieval, 'Post' for creation or action, and specific identifiers like 'Id' or 'Code'. Examples include GetProductsId, PostCartsIdLineItems, and PostActor_typeAuth_provider, all adhering to a predictable and readable convention.
With 48 tools, the count is excessive for an MCP server, making it cumbersome for agents to navigate and increasing the risk of misselection. While the server covers a broad e-commerce domain, a more streamlined set of 15-25 tools would be more appropriate for usability and coherence.
The tool set provides comprehensive coverage of the e-commerce domain, including CRUD operations for carts, products, orders, customers, and authentication, as well as specialized actions like payment processing, shipping, and returns. There are no obvious gaps, ensuring agents can handle full workflows without dead ends.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.12MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables real-time communication using Server-Sent Events (SSE), providing standardized model management and resource templating capabilities.-
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol (MCP) with StreamableHTTP transport, enabling standardized interaction with model services through a RESTful API interface.2MIT
- AlicenseNot gradedqualityDmaintenanceA production-ready Model Context Protocol server for interacting with Cosmic headless CMS, providing comprehensive tools for managing objects, types, and media in your Cosmic bucket.MIT