Skip to main content

mcp-customer

@evolve-platform/mcp-customer is a customer-facing MCP server built on mcp-core. It exposes the tools that an AI assistant needs to help customers browse products, manage their cart, view orders, and handle their account.

Available tools

Authentication

ToolDescription
customer_loginLog in with email and password
customer_logoutLog out and revert to a guest session
get_current_userGet the currently authenticated customer

Products

ToolDescription
get_productsSearch products with filters and sorting
get_product_detail_pageGet full product details by slug
get_products_by_skusBatch retrieve products by SKU
get_categoriesBrowse product categories

Cart

ToolDescription
get_cartGet the active cart
cart_line_items_addAdd products to the cart
cart_line_items_removeRemove items from the cart
cart_line_items_updateUpdate item quantities
add_discount_codeApply a discount code
remove_discount_codeRemove a discount code

Shopping lists

ToolDescription
get_customer_shopping_listsList all shopping lists (paginated)
get_customer_shopping_listGet a specific shopping list
add_to_shopping_listAdd items to a shopping list
remove_shopping_list_itemRemove items from a shopping list
info

Shopping list tools require an authenticated session. The AI client should call customer_login first.

Customer account

ToolDescription
get_customerGet customer data with addresses
create_customer_addressCreate a new address
update_customer_addressUpdate an existing address

Orders

ToolDescription
order_history_queryGet the customer's order history

Example interaction

Here is what a typical AI-assisted shopping session looks like from the tool invocation perspective:

Running locally

cd backend/services/mcp-customer

# Generate tools from GraphQL operations
pnpm codegen

# Start with HTTP transport (port 6000)
pnpm dev

# Start with stdio transport (for Claude Desktop)
pnpm dev:stdio
warning

The GraphQL gateway must be running for the MCP server to function. Start it with pnpm dev:backend from the repository root.

Store context

The mcp-customer service supports multi-store configurations. When connecting over HTTP, clients can pass store context via headers:

HeaderDescription
X-StoreContext-LocaleLocale for the session (e.g., en-US)
X-StoreContext-CurrencyCurrency code (e.g., EUR)
X-StoreContext-StoreKeyStore identifier
X-StoreContext-CustomerGroupCustomer group for pricing