Skip to main content
Layers exposes two Model Context Protocol (MCP) servers that let AI assistants interact directly with your stores. Use them to manage merchandising, search tuning, catalog operations, and storefront queries through any MCP-compatible client.
ServerEndpointAuthPurpose
Layers MCP Serverhttps://app.uselayers.com/mcp/v1OAuth (mcp:use scope)Full store management — catalog, merchandising, search tuning, metrics, and more
Storefront MCP Serverhttps://app.uselayers.com/mcp/storefront/v1Storefront API tokenRead-only storefront operations — search, browse, recommendations

Layers MCP Server

The main MCP server provides 38 tools for managing your Layers stores. It uses OAuth authentication and requires the mcp:use scope.

Connecting

Configure your MCP client with the following endpoint:
https://app.uselayers.com/mcp/v1
When you connect for the first time, you’ll be redirected to the Layers dashboard to authorize the connection. After authorization, your MCP client stores the OAuth tokens and reconnects automatically.

Available tools

ToolDescription
store-listList all stores you have access to
store-detailsGet detailed configuration for a store
catalog-searchSearch products in the catalog
catalog-productGet full details for a specific product
collections-listList collections with filtering
collections-getGet details for a specific collection
ToolDescription
attributes-listList all product attributes
attributes-valuesGet values for a specific attribute
attributes-manageCreate, update, or delete attributes
attributes-generate-calculatedGenerate a calculated attribute from a natural language description
attributes-explain-calculatedGet a plain-English explanation of a calculated attribute’s logic
attributes-calculated-recipesList pre-built calculated attribute templates
attributes-generate-facet-sortGenerate AI-powered facet value ordering
ToolDescription
search-rules-listList search rules
search-rules-manageCreate, update, or delete search rules
semantic-redirects-listList semantic redirects
semantic-redirects-manageCreate, update, or delete semantic redirects
ranking-rules-listList ranking rules
ranking-rules-manageCreate, update, or delete ranking rules
query-expansion-examples-listList query expansion examples
query-expansion-examples-manageCreate, update, or delete query expansion examples
ToolDescription
merchandise-rules-listList merchandising rules
merchandise-rules-manageCreate, update, or delete merchandising rules with pins, expressions, and scheduling
blocks-listList recommendation blocks
blocks-manageCreate, update, or delete blocks with strategies, safeguards, and fallback chains
block-strategies-listList block data strategies and their computation status
ToolDescription
sort-orders-listList available sort orders
sort-orders-previewPreview product ranking for a sort order
sort-orders-explainGet a plain-English explanation of a sort order’s ranking logic
ToolDescription
metrics-listList custom metrics
metrics-manageCreate, update, or delete metrics
metrics-resultsGet computed results for a metric
metrics-validate-layersqlValidate a LayersQL expression
ToolDescription
search-documentationSearch the Layers documentation

Usage pattern

1

List your stores

Call store-list to see all stores you have access to. Note the store slug for each store you want to work with.
2

Pass the store slug

Include the store slug in all subsequent tool calls. For example, if your store is my-store.myshopify.com, the slug is my-store.
3

Use manage tools to make changes

Tools ending in -manage accept an action parameter with one of three values: create, update, or delete. All other tools are read-only and safe to call freely.

Example: create a merchandising rule

Ask your AI assistant:
“Pin the product ‘Classic White Tee’ to position 1 in the Summer Sale collection, and boost all products where brand is ‘Nike’ using a soft boost expression.”
The assistant calls merchandise-rules-manage with action: "create" and the appropriate parameters — handling pin positions, collection targeting, and expression configuration automatically.

Example: generate a calculated attribute

Ask your AI assistant:
“Create a calculated attribute that computes the discount percentage from compare_at_price and price.”
The assistant calls attributes-generate-calculated with your description and returns a JSONLogic expression you can review and apply.

Storefront MCP Server

The Storefront MCP Server exposes read-only storefront operations as MCP tools. It uses the same access token as the Storefront REST API, so you can integrate AI assistants into customer-facing experiences.

Connecting

Configure your MCP client with the storefront endpoint and your API token:
https://app.uselayers.com/mcp/storefront/v1
Authentication uses the same storefront access token you use for the REST API. Pass it as a bearer token in the authorization header.

Available tools

ToolDescription
text-searchSemantic text search with query understanding and typo tolerance
browse-collectionBrowse a collection with sort orders, merchandising, and faceted filtering
similar-productsFind visually and semantically similar products
autocompleteGet predictive search query suggestions
facetsRetrieve available filter facets for a collection
sort-ordersList available sort orders
block-recommendationsGet product recommendations from a configured block
content-searchSearch non-product content (pages, articles, blogs)

Common parameters

Most search and browse tools accept these optional parameters:
ParameterDescription
filter_groupNested filter conditions (AND/OR with operators like eq, in, gt, lt, between)
facetsArray of attribute codes to retrieve facet values for
pagination{ page, limit } for paginated results
sort_order_codeSort order to apply (use sort-orders to see available codes)
attributesArray of attribute codes to include in the response
contextContextual data for personalization (geo, customer, cart, marketing channel)
identitySession, customer, and device identifiers for behavioral tracking

When to use each server

  • Use the Layers MCP Server when you want an AI assistant to help manage your store — creating merchandising rules, tuning search behavior, building sort orders, or analyzing metrics.
  • Use the Storefront MCP Server when you want to integrate AI-powered product discovery into a customer-facing experience, or when building AI agents that need to search and browse your catalog.

Next steps