Medusa

v0.4.0
io.github.trhonpavel/medusa-mcp Checked 4 days ago Published 2 months ago

Medusa v2 store: orders, customers, products, inventory, sales reports and safe write actions.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_store_info Store overview

Returns regions (currencies), sales channels, stock locations, shipping options and profiles, and return/refund reasons. A good first call to learn the IDs other tools need.

list_orders List orders

Lists orders, newest first. Filters: full-text, date range (YYYY-MM-DD in the reporting timezone), customer, order/payment/fulfillment status.

ParameterTypeDescription
created_fromstringFrom date, e.g. 2026-09-01
created_tostringTo date (inclusive), e.g. 2026-09-30
customer_idstring
fulfillment_statusarrayE.g. ['not_fulfilled'] = waiting to be fulfilled
limitintegerNumber of records (max 200)
offsetintegerRecords to skip (pagination)
payment_statusarray
qstringFull-text search – order number, email, name…
statusarrayOrder status

get_order Get order

Full order detail – line items, addresses, payments (with captures and refunds), fulfillments, tracking numbers and returns. Accepts an order ID (order_…) or the order number.

ParameterTypeDescription
order *stringOrder ID (order_…) or order number, e.g. 1042

create_fulfillment Create fulfillment

Creates a fulfillment for an order. Without 'items' it fulfills all remaining unfulfilled quantities. Without 'location_id' it uses the only stock location, if there is exactly one.

ParameterTypeDescription
order *stringOrder ID or order number
itemsarraySpecific line items; defaults to everything remaining
location_idstringStock location to ship from
notify_customerboolean

create_shipment Mark as shipped

Marks a fulfillment as shipped and attaches a tracking number. Without 'fulfillment_id' it uses the only unshipped fulfillment.

ParameterTypeDescription
order *stringOrder ID or order number
fulfillment_idstring
notify_customerboolean
tracking_numberstring
tracking_urlstring

mark_delivered Mark as delivered

Marks a fulfillment as delivered. Without 'fulfillment_id' it uses the only fulfillment that is not delivered yet.

ParameterTypeDescription
order *stringOrder ID or order number
fulfillment_idstring

cancel_fulfillment Cancel fulfillment

Cancels a fulfillment that has not been shipped yet, so its items can be fulfilled again. Without 'fulfillment_id' it uses the only unshipped fulfillment.

ParameterTypeDescription
order *stringOrder ID or order number
fulfillment_idstring
notify_customerboolean

complete_order Complete order

Marks the order as completed.

ParameterTypeDescription
order *stringOrder ID or order number

cancel_order Cancel order

CANCELS the order. Irreversible – get explicit confirmation from the user before calling. The order must not have active fulfillments.

ParameterTypeDescription
order *stringOrder ID or order number

update_order Update order

Changes the order's email, shipping or billing address, or metadata (e.g. an internal note). Send only what should change; an address replaces the whole previous address.

ParameterTypeDescription
order *stringOrder ID or order number
billing_addressobjectPostal address
emailstring
metadataobjectMerged into existing metadata; an empty string deletes a key
shipping_addressobjectPostal address

mark_order_paid Mark order as paid

Records a manual payment (e.g. a received bank transfer or cash on delivery) for the order's unpaid payment collection. Orders without one (e.g. converted draft orders) get a payment collection for the outstanding amount first.

ParameterTypeDescription
order *stringOrder ID or order number

capture_payment Capture payment

Captures an authorized payment (charges the customer). Without 'amount' captures the full remaining amount. Without 'payment_id' uses the only payment that is not fully captured.

ParameterTypeDescription
order *stringOrder ID or order number
amountnumberMajor units; defaults to the full remaining amount
payment_idstring

refund_payment Refund payment

REFUNDS money to the customer through the payment provider. Irreversible – confirm the amount with the user before calling. Without 'payment_id' uses the only captured payment that can cover the amount. Refund reasons are listed by get_store_info.

ParameterTypeDescription
amount *numberMajor units, e.g. 249.50
order *stringOrder ID or order number
notestring
payment_idstring
refund_reason_idstring

create_return Create return

Requests a return of order items (the customer is sending them back). Without 'items' returns every shipped item. When the parcel arrives, call receive_return. Refund the money separately with refund_payment. Return reasons are listed by get_store_info.

ParameterTypeDescription
order *stringOrder ID or order number
itemsarrayDefaults to every shipped item
location_idstringWhere the goods return to; defaults to the only stock location
notestringInternal note
notify_customerboolean

receive_return Receive return

Records that returned items arrived; they go back to stock. Without 'items' receives everything requested. Without 'return_id' uses the order's only open return.

ParameterTypeDescription
itemsarrayDefaults to every requested item
notestringInternal note
notify_customerboolean
orderstringOrder ID or order number (to find the return)
return_idstring

edit_order Edit order items

Changes the items of an existing order: add products (by SKU or variant), change quantities, or remove items (quantity 0). dry_run (default true) previews the new items and totals and changes nothing; repeat with dry_run false to apply. The result says whether the customer owes money (mark_order_paid) or should get a refund (refund_payment).

ParameterTypeDescription
order *stringOrder ID or order number
add_itemsarray
change_itemsarray
dry_runboolean
notestringInternal note

create_draft_order Create draft order

Creates a draft order on behalf of a customer (phone or e-mail orders, B2B). Items by variant_id or SKU (of published products), optionally with a custom unit price. Shipping options are listed by get_store_info. Turn the draft into a real order with convert_draft_order.

ParameterTypeDescription
items *array
billing_addressobjectPostal address
customer_idstring
emailstringCustomer e-mail (required unless customer_id is given)
notify_customerboolean
promo_codesarray
region_idstringDefaults to the only region
shipping_addressobjectPostal address
shipping_amountnumberCustom shipping price; defaults to the option's price
shipping_option_idstring

convert_draft_order Convert draft order

Turns a draft order into a regular order (reserves stock). Record the payment afterwards with mark_order_paid.

ParameterTypeDescription
draft_order_id *string

list_customers List customers

Searches customers by name, email or company, optionally within a customer group.

ParameterTypeDescription
emailstring
group_idstringOnly members of this customer group
has_accountbooleantrue = registered, false = guests
limitintegerNumber of records (max 200)
offsetintegerRecords to skip (pagination)
qstringFull-text search – name, email, company

get_customer Get customer

Customer detail with addresses, groups and order history (count, total spent, recent orders).

ParameterTypeDescription
customer_id *stringCustomer ID (cus_…) or e-mail

list_customer_groups List customer groups

Customer groups (e.g. B2B, VIP) – used by price lists and promotions.

ParameterTypeDescription
limitintegerNumber of records (max 200)
offsetintegerRecords to skip (pagination)
qstring

save_customer Create or update customer

Without customer_id creates a customer (email required); with customer_id updates only the given fields. Can also add an address and add/remove the customer from groups.

ParameterTypeDescription
add_addressobject
add_to_groupsarrayCustomer group IDs to join
company_namestring
customer_idstring
emailstring
first_namestring
last_namestring
metadataobjectMerged into existing metadata; an empty string deletes a key
phonestring
remove_from_groupsarrayCustomer group IDs to leave

save_customer_group Create or update customer group

Without group_id creates a group (name required); with group_id renames it. Can add/remove customers.

ParameterTypeDescription
add_customersarrayCustomer IDs to add
group_idstring
metadataobjectMerged into existing metadata; an empty string deletes a key
namestring
remove_customersarrayCustomer IDs to remove

delete_customer_group Delete customer group

DELETES a customer group (the customers stay). Price lists and promotions targeting it stop applying. Confirm with the user first.

ParameterTypeDescription
group_id *string

list_products List products

Lists products with their variants (SKUs). Filter by full-text, status, collection, category or tag.

ParameterTypeDescription
category_idstring
collection_idstring
limitintegerNumber of records (max 200)
offsetintegerRecords to skip (pagination)
qstring
statusarray
tag_idstring

get_product Get product

Product detail – variants, prices in all currencies, linked inventory items, options, categories, collection, tags, images and sales channels.

ParameterTypeDescription
product_id *stringProduct ID (prod_…) or handle

create_product Create product

Creates a product with its variants and prices. For a simple product without options pass just 'prices' (and optionally 'sku', 'stock'). For variants define 'options' (e.g. Size: S, M, L) and one variant per combination. Defaults: status draft, the store's default sales channel, the default shipping profile. Category and collection IDs come from list_catalog.

ParameterTypeDescription
title *string
category_idsarray
collection_idstring
descriptionstring
discountableboolean
handlestringURL slug; derived from the title when omitted
imagesarrayImage URLs
location_idstringStock location for initial stock; defaults to the only one
metadataobject
optionsarrayE.g. [{ title: 'Size', values: ['S','M','L'] }]
pricesarraySimple product: prices of its single variant
sales_channel_idsarray
shipping_profile_idstring
skustringSimple product: SKU of its single variant
statusstring
stockintegerSimple product: initial stock
subtitlestring
tagsarrayTag values; missing tags are created
thumbnailstringImage URL
variantsarray
weightnumberGrams

update_product Update product

Updates product fields – texts, status, handle, images, collection, categories, tags, sales channels, metadata. Send only the fields that should change. Lists (category_ids, tags, images, sales_channel_ids) replace the previous list.

ParameterTypeDescription
product_id *string
category_idsarray
collection_idstring | nullnull removes the product from its collection
descriptionstring
discountableboolean
handlestring
imagesarrayImage URLs – replaces all images
metadataobjectMerged into existing metadata; an empty string deletes a key
sales_channel_idsarray
shipping_profile_idstring
statusstring
subtitlestring
tagsarrayTag values; missing tags are created
thumbnailstring
titlestring
weightnumber

delete_product Delete product

DELETES the product with all its variants. Irreversible – get explicit confirmation from the user before calling. 'confirm_title' must match the product title exactly. By default the inventory items of its variants are deleted too (only those with nothing reserved).

ParameterTypeDescription
confirm_title *stringThe exact product title, as a safeguard against deleting the wrong product
product_id *string
delete_inventory_itemsboolean

add_product_images Add product images

Adds images to a product from public image URLs. By default they are downloaded and stored in the shop's own file storage (so the storefront does not depend on the source site). Optionally makes the first one the thumbnail.

ParameterTypeDescription
product_id *string
urls *array
set_thumbnailbooleanMake the first new image the thumbnail
store_copybooleanUpload a copy to the shop's storage instead of linking the URL

create_variant Create variant

Adds a variant to an existing product, e.g. a new size. 'options' must name every product option; new option values are added automatically.

ParameterTypeDescription
prices *array
product_id *string
allow_backorderbooleanAllow selling when out of stock
barcodestring
eanstring
location_idstringStock location for initial stock; defaults to the only one
manage_inventorybooleanTrack stock (default true)
optionsobjectOption title -> value, e.g. { Size: 'M', Color: 'Red' }
skustring
stockintegerInitial stocked quantity at location_id (or the only location)
titlestringDefaults to the option values, e.g. 'M / Red'
upcstring
weightnumberGrams

update_variant Update variant

Updates variant fields – title, SKU, barcodes, inventory tracking, backorders, weight, metadata. For prices use set_variant_price.

ParameterTypeDescription
product_id *string
variant_id *string
allow_backorderbooleanAllow selling when out of stock
barcodestring
eanstring
manage_inventorybooleanTrack stock (default true)
metadataobjectMerged into existing metadata; an empty string deletes a key
skustring
titlestring
upcstring
weightnumberGrams

delete_variant Delete variant

DELETES one variant of a product. Irreversible – confirm with the user first. 'confirm' must equal the variant's SKU (or its title when it has no SKU). By default its inventory item is deleted too (only when nothing is reserved).

ParameterTypeDescription
confirm *stringThe variant's exact SKU, or title when it has no SKU
product_id *string
variant_id *string
delete_inventory_itemsboolean

set_variant_price Set variant price

Sets the base price (no price rules) of a variant in one currency. All other prices of the variant are preserved. The amount is in major currency units (e.g. 49.99 = 49.99 EUR). For sale or customer-group prices use price lists.

ParameterTypeDescription
amount *number
currency_code *stringE.g. eur, usd
product_id *string
variant_id *string

list_catalog Catalog structure

Product categories (with parent, so the tree can be rebuilt), collections, tags and product types – with IDs for other tools.

ParameterTypeDescription
qstringFull-text filter applied to every section

save_category Create or update category

Without category_id creates a product category (name required); with category_id updates only the given fields. Can also add or remove products.

ParameterTypeDescription
add_productsarrayProduct IDs to add
category_idstring
descriptionstring
handlestring
is_activebooleanVisible in the storefront (new categories default to inactive in Medusa)
is_internalbooleanHidden from the storefront
metadataobjectMerged into existing metadata; an empty string deletes a key
namestring
parent_category_idstring | nullnull moves it to the top level
rankintegerPosition among siblings
remove_productsarrayProduct IDs to remove

delete_category Delete category

DELETES a product category (products stay, they just lose the category). Confirm with the user first.

ParameterTypeDescription
category_id *string

save_collection Create or update collection

Without collection_id creates a collection (title required); with collection_id updates it. Can add or remove products (a product belongs to at most one collection).

ParameterTypeDescription
add_productsarrayProduct IDs to add
collection_idstring
handlestring
metadataobjectMerged into existing metadata; an empty string deletes a key
remove_productsarrayProduct IDs to remove
titlestring

delete_collection Delete collection

DELETES a collection (products stay, they just leave the collection). Confirm with the user first.

ParameterTypeDescription
collection_id *string

list_inventory Inventory levels

Inventory items with stock per location (stocked, reserved, available). With low_stock_threshold returns only items at or below the threshold.

ParameterTypeDescription
limitintegerNumber of records (max 200)
location_idstringOnly this stock location
low_stock_thresholdintegerOnly return items whose available quantity is less than or equal to this value
offsetintegerRecords to skip (pagination)
qstringFull-text search – title, SKU
skustringExact SKU

set_stock_level Set stock level

Sets the stocked quantity of an item at a location. Provide either an absolute 'stocked_quantity' or a relative 'adjust_by' (+/-). Identify the item by inventory_item_id or SKU. Without location_id the item's only location is used. If the item is not stocked at the given location yet, it is added there.

ParameterTypeDescription
adjust_byintegerE.g. +10 when restocking, -2 when writing off
inventory_item_idstring
location_idstring
skustring
stocked_quantityinteger

list_price_lists List price lists

Price lists – sales (temporary discounted prices) and overrides (e.g. B2B prices for a customer group). With price_list_id returns that list including all its prices.

ParameterTypeDescription
limitintegerNumber of records (max 200)
offsetintegerRecords to skip (pagination)
price_list_idstring
qstring
statusarray

save_price_list Create or update price list

Without price_list_id creates a price list (title required); with price_list_id updates it. 'set_prices' adds or changes the price of a variant in a currency; 'remove_variants' drops variants from the list. type 'sale' shows the original price struck through, 'override' simply replaces it. Plain dates use the reporting timezone.

ParameterTypeDescription
customer_group_idsOnly for these customer groups; [] or null = everyone
descriptionstring
ends_atstring | nullInclusive, e.g. 2026-11-30; null removes
price_list_idstring
remove_variantsarrayVariant IDs whose prices are removed from the list
set_pricesarray
starts_atstring | nullE.g. 2026-11-27; null removes
statusstringDefault for new lists: active
titlestring
typestringDefault for new lists: sale

delete_price_list Delete price list

DELETES a price list – its prices stop applying immediately. Confirm with the user first.

ParameterTypeDescription
price_list_id *string

list_promotions List promotions

Discount codes and automatic promotions with their value, conditions, usage and validity.

ParameterTypeDescription
codestringExact code
limitintegerNumber of records (max 200)
offsetintegerRecords to skip (pagination)
qstringSearch in codes

create_promotion Create promotion

Creates a discount code (or an automatic promotion): percentage or fixed amount off the order, specific products, or shipping. Free shipping = applies_to 'shipping', percentage 100. Restricting to products/categories/collections makes it apply to those items only. Plain dates are interpreted in the reporting timezone.

ParameterTypeDescription
code *stringThe code customers enter, e.g. AUTUMN20
discount_type *string
value *numberPercent (20 = 20 %) or amount in major units
allocationstring'across' (default) splits the discount over the eligible items; 'each' applies it to every unit up to max_quantity
applies_tostringDefaults to 'items' when restricted to products/categories/collections, otherwise 'order'
category_idsarray
collection_idsarray
currency_codestringRequired for a fixed amount, e.g. czk
customer_group_idsarrayOnly for customers in these groups
ends_atstringInclusive, e.g. 2026-11-30
extra_rulesarrayAdvanced eligibility conditions
is_automaticbooleanApplies without entering the code
max_quantityintegerRequired with allocation 'each'
product_idsarray
starts_atstringE.g. 2026-11-01
statusstring
usage_limitintegerTotal number of uses (not for automatic promotions)

update_promotion Update promotion

Changes a promotion: activate/deactivate (status), rename the code, change the value, usage limit or validity dates. Identify it by promotion_id or code.

ParameterTypeDescription
codestringCurrent code, to find the promotion
ends_atstring | nullnull removes the end date
new_codestring
promotion_idstring
starts_atstring | nullnull removes the start date
statusstring
usage_limitnull removes the limit
valuenumber

delete_promotion Delete promotion

DELETES a promotion – the code stops working. To pause it, prefer update_promotion with status 'inactive'. Confirm with the user first. A campaign created for its dates (named after the code) is deleted too.

ParameterTypeDescription
codestring
promotion_idstring

sales_report Sales report

Sales for a period: orders, revenue and net revenue after refunds, average order value, units, unique customers, change against the previous period (or last year), a day/week/month series, top products, countries and discount codes. Amounts are per currency; canceled and draft orders are excluded. Clients that support MCP Apps show it as an interactive dashboard.

ParameterTypeDescription
from *stringFrom date, e.g. 2026-09-01
to *stringTo date (inclusive), e.g. 2026-09-30
comparestring
group_bystring
includearrayExtra breakdowns
only_paidbooleanOnly count paid orders
timezonestringIANA timezone used for date boundaries and buckets
top_nintegerHow many top products (and variants) to return

customer_report Customer report

Customer analytics for a period: new vs returning customers and their revenue, repeat purchase rate, top customers, and lapsed customers (bought repeatedly, but not for lapsed_days) worth winning back.

ParameterTypeDescription
from *stringFrom date, e.g. 2026-09-01
to *stringTo date (inclusive)
lapsed_daysinteger
timezonestring
top_ninteger

inventory_forecast Inventory forecast

Restock planning: for every SKU compares recent sales velocity with available stock – days of cover, status (out_of_stock, reorder_now, reorder_soon, ok) and a suggested order quantity to cover lead time plus coverage_days. Also lists slow movers (stock without sales). Clients that support MCP Apps show it as an interactive table.

ParameterTypeDescription
coverage_daysintegerHow many days the restock should cover
daysintegerLength of the sales history window
include_okbooleanAlso list SKUs that need nothing
lead_time_daysintegerDays until a new order arrives
limitinteger
location_idstringOnly this stock location
tostringLast day of the sales window, YYYY-MM-DD (default today)

bulk_update_prices Bulk update prices

Changes the base prices of many variants at once in one currency: by percent (+10 / -15), by an amount, or to a fixed price, with optional price-ending rounding. Targets products by IDs, SKUs, category, collection, tag, status or search. dry_run (default true) only previews the changes; repeat with dry_run false to apply. Prices with rules (customer groups, quantities) are kept. For temporary sales prefer save_price_list or create_promotion.

ParameterTypeDescription
currency_code *string
add_amountnumberE.g. 20 or -20 (major units)
all_productsbooleanMust be true to target the whole catalog without other filters
category_idstring
collection_idstring
dry_runboolean
percentnumberE.g. 10 = +10 %, -15 = -15 %
product_idsarray
qstringFull-text filter
roundingstringnone = 2 decimals; integer; end_9 = nearest whole number ending in 9 (199, 249); end_90 / end_99 = nearest x.90 / x.99
set_amountnumberSet every selected price to this amount
skusarrayOnly these variants
statusarray
tagstringTag value

bulk_set_stock Bulk set stock

Sets stock for many SKUs in one go – e.g. after a delivery or a stock-take. Each row has an absolute stocked_quantity or a relative adjust_by. Items not yet stocked at the location are added there. dry_run (default true) previews before → after; repeat with dry_run false to apply.

ParameterTypeDescription
items *array
dry_runboolean
location_idstringDefault location for rows without one

bulk_update_products Bulk update products

Changes many products at once: status (publish / unpublish), categories, collection, tags, sales channels, discountable, shipping profile. Targets products by IDs, category, collection, tag, status or search. dry_run (default true) previews; repeat with dry_run false to apply.

ParameterTypeDescription
add_category_idsarray
add_sales_channel_idsarray
add_tagsarrayTag values; missing tags are created
all_productsbooleanMust be true to target the whole catalog without other filters
category_idstring
collection_idstring
dry_runboolean
product_idsarray
qstringFull-text filter
remove_category_idsarray
remove_sales_channel_idsarray
remove_tagsarray
set_collection_idstring | nullnull removes products from their collection
set_discountableboolean
set_shipping_profile_idstring
set_statusstring
statusarray
tagstringTag value

medusa_request Medusa Admin API request

Calls any Medusa v2 Admin API endpoint directly – for anything the other tools do not cover (e.g. /admin/reservations, /admin/order-edits, /admin/exchanges, /admin/tax-rates, /admin/shipping-options). Prefer the dedicated tools when one fits. Amounts are in major units. Use 'fields' in the query to choose fields: '+field' adds to the defaults, '*relation' expands a relation. POST creates or updates, DELETE deletes – confirm changes with the user first. Writes to api-keys, users and invites are blocked.

ParameterTypeDescription
path *stringPath starting with /admin/, e.g. /admin/reservations
bodyobjectJSON body for POST
methodstring
queryobjectQuery parameters; nested objects become a[b]=c