Skip to main content
Glama

Medusa MCP Server

by SGFGOV

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
PostActor_typeAuth_provider

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.

PostActor_typeAuth_providerCallback

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.

PostActor_typeAuth_provider_register

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.

PostActor_typeAuth_providerResetPassword

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.

PostActor_typeAuth_providerUpdate

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.

PostSession

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.

PostAdminAuthTokenRefresh

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.

PostCarts

Create a cart.

GetCartsId

Retrieve a cart by its ID. You can expand the cart's relations or select the fields that should be returned.

PostCartsIdComplete

Complete a cart and place an order.

PostCartsIdCustomer

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.

PostCartsIdLineItems

Add a product variant as a line item in the cart.

PostCartsIdLineItemsLine_id

Update a line item's details in the cart.

PostCartsIdPromotions

Add a list of promotions to a cart.

PostCartsIdShippingMethods

Add a shipping method to a cart. Use this API route when the customer chooses their preferred shipping option.

PostCartsIdTaxes

Calculate the cart's tax lines and amounts.

GetCollections

Retrieve a list of collections. The collections can be filtered by fields such as handle. The collections can also be sorted or paginated.

GetCollectionsId

Retrieve a collection by its ID. You can expand the collection's relations or select the fields that should be returned.

GetCurrencies

Retrieve a list of currencies. The currencies can be filtered by fields such as code. The currencies can also be sorted or paginated.

GetCurrenciesCode

Retrieve a currency by its code. You can expand the currency's relations or select the fields that should be returned.

PostCustomers

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.

GetCustomersMe

Retrieve the logged-in customer. You can expand the customer's relations or select the fields that should be returned.

GetCustomersMeAddresses

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.

GetCustomersMeAddressesAddress_id

Retrieve an address of the logged-in customer. You can expand the address's relations or select the fields that should be returned.

GetOrders

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.

GetOrdersId

Retrieve an order by its ID. You can expand the order's relations or select the fields that should be returned.

PostOrdersIdTransferAccept

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.

PostOrdersIdTransferCancel

Cancel an order transfer that the logged-in customer previously requested using the Request Order Transfer API route.

PostOrdersIdTransferDecline

Decline an order transfer previously requested, typically by the admin user using the Request Order Transfer Admin API route.

PostOrdersIdTransferRequest

Request an order to be transfered to the logged-in customer's account. The transfer is confirmed using the Accept Order Transfer API route.

PostPaymentCollections

Create a payment collection for a cart. This is used during checkout, where the payment collection holds the cart's payment sessions.

PostPaymentCollectionsIdPaymentSessions

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.

GetPaymentProviders

Retrieve a list of payment providers. You must provide the region_id query parameter to retrieve the payment providers enabled in that region.

GetProductCategories

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.

GetProductCategoriesId

Retrieve a product category by its ID. You can expand the product category's relations or select the fields that should be returned.

GetProductTags

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.

GetProductTagsId

Retrieve a product tag by its ID. You can expand the product tag's relations or select the fields that should be returned.

GetProductTypes

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.

GetProductTypesId

Retrieve a product type by its ID. You can expand the product type's relations or select the fields that should be returned.

GetProducts

Retrieve a list of products. The products can be filtered by fields such as id. The products can also be sorted or paginated.

GetProductsId

Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned.

GetRegions

Retrieve a list of regions. The regions can be filtered by fields such as id. The regions can also be sorted or paginated.

GetRegionsId

Retrieve a region by its ID. You can expand the region's relations or select the fields that should be returned.

PostReturn

Create a return for an order's items. The admin receives the return and process it from their side.

GetReturnReasons

Retrieve a list of return reasons. The return reasons can be sorted or paginated.

GetReturnReasonsId

Retrieve a return reason by its ID. You can expand the return reason's relations or select the fields that should be returned.

GetShippingOptions

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.

PostShippingOptionsIdCalculate

Calculate the price of a shipping option in a cart.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SGFGOV/medusa-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server