Skip to main content

Faslet MCP Server

The Faslet MCP server exposes Faslet sizing tools over MCP so AI assistants can resolve supported product pages and return size recommendations.

Endpoint

https://api.faslet.net/widget/mcp

The server uses MCP over HTTP with JSON-RPC 2.0 and currently reports:

  • protocolVersion: 2024-11-05
  • serverInfo.name: faslet-mcp

Example client configuration

For clients that support HTTP MCP servers, point them at the Faslet MCP endpoint directly:

{
"servers": {
"faslet/faslet": {
"type": "http",
"url": "https://api.faslet.net/widget/mcp"
}
}
}

If you have a shopper-facing product page URL, start with get_size_from_product_url. That is the default tool and avoids asking the user for internal Faslet identifiers.

Only use get_size_from_product_info when shopId, brand, and productId are already known from trusted context or from get_product_info_from_product_url.

Tools

ToolUse it forRequired arguments
get_size_from_product_urlDefault sizing flow when you have a PDP URL. Resolves the product and then returns a recommendation when the store and product are supported.productUrl
get_product_info_from_product_urlResolve Faslet product info from a PDP URL before sizing.productUrl
get_size_from_product_infoGet a size recommendation when Faslet product identifiers are already known.shopId, brand, productId

Shared sizing inputs

Both sizing tools support these shopper inputs when available:

FieldTypeNotes
heightnumberHeight in centimeters
weightnumberWeight in kilograms
userIdstringOptional shopper identifier
userGenderstringmale or female
agenumberOptional age
fitstringtight, average, loose
waiststringflat, average, round
hipsstringnarrow, average, wide
cheststringnarrow, average, wide
footWidthstringnarrow, average, wide
braCupSizestringOptional bra cup size
braBandSizenumberOptional bra band size
relativeSizingPreferencenumberOptional sizing preference input
sizeLabelsstringComma-separated size labels, for example S, M, L
experimentVariantsstringOptional experiment variant string

Response shape

Product discovery

get_product_info_from_product_url returns:

{
"status": "resolved",
"explanation": "Resolved product info from productUrl.",
"productInfo": {
"shopId": "faslet-demo",
"brand": "Faslet Demo",
"productId": "8390931513510",
"productName": "Demo Product",
"productUrl": "https://demo.faslet.app/products/demo-product"
}
}

If the URL cannot be matched, the tool returns statuses such as invalid_input, store_not_supported, or product_not_supported.

Sizing tools

Sizing tools return content, structuredContent, and isError. The most useful payload is structuredContent:

{
"status": "success",
"explanation": "Recommended size: M",
"missingInputs": [],
"recommendation": {
"label": "M"
},
"alternatives": [
{
"label": "M",
"fit": {
"waist": "perfect",
"chest": "slightlyLoose"
}
}
],
"warnings": [
"userGender was inferred from product context."
],
"metadata": {
"shopId": "faslet-demo",
"brand": "Faslet Demo",
"productId": "8390931513510",
"productGender": "male",
"userGender": "male"
}
}

Common sizing statuses:

StatusMeaning
successRecommendation available
invalid_inputMissing or invalid sizing inputs. Check missingInputs.
no_recommendationProduct is supported, but no recommendation could be returned
backend_errorUnexpected internal failure
store_not_supportedThe product URL belongs to a store that does not use Faslet sizing
product_not_supportedThe store uses Faslet sizing, but that product is excluded

store_not_supported and product_not_supported are returned as normal tool results with recommendation: null, not as transport-level MCP errors.

Prompts

The server also exposes four prompts:

PromptPurpose
demo_basic_sizingExample get_size_from_product_info call for one shopper profile
demo_preference_adjustmentsExample sizing call using fit and body-shape preference enums
demo_url_discovery_sizingExample flow that starts from a shopper-facing product URL
explain_measurement_inputsQuick explanation of the enum-style sizing inputs

Example JSON-RPC calls

Initialize:

curl https://api.faslet.net/widget/mcp \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize"
}'

Get a size recommendation from a product URL:

curl https://api.faslet.net/widget/mcp \
-H 'content-type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_size_from_product_url",
"arguments": {
"productUrl": "https://demo.faslet.app/products/demo-product",
"height": 176,
"weight": 85
}
}
}'

If the server needs more sizing information for a specific product type, it returns missingInputs so the client can ask a focused follow-up question.