1. Conduid
  2. Developer Tools
  3. Commerce Layer
MCP server · Developer Tools

Commerce Layer

Commerce Layer local MCP server for Metrics API

Unclaimed last commit 8 months ago aicommercelayermodelcontextprotocol
45Fair

Scored 3 days ago · breakdown

About Commerce Layer

Commerce Layer is an MCP server published by commercelayer in the Developer Tools category: commerce Layer local MCP server for Metrics API. It has been installed 0 times through Conduid.

Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx mcp-server-metrics

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Commerce Layer

Powered by Claude · Grounded in docs

I know everything about Commerce Layer. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v1.2.4v1.2.4 · 3 Jan 2026[1.2.4](https://github.com/commercelayer/mcp-server-metrics/compare/v1.2.3...v1.2.4) (2026-01-03) Bug Fixes fix get and delete commands…
v1.2.3v1.2.3 · 18 Dec 2025[1.2.3](https://github.com/commercelayer/mcp-server-metrics/compare/v1.2.2...v1.2.3) (2025-12-18) Bug Fixes fix exports ([f88ecec](https://github.com/commercelayer/mcp-server-metrics/commit/f88ecec3e5d61cbbf147d85f8dc3c45e94b3b837))
v1.2.2v1.2.2 · 17 Dec 2025[1.2.2](https://github.com/commercelayer/mcp-server-metrics/compare/v1.2.1...v1.2.2) (2025-12-17) Bug Fixes fix build script ([dfead1d](https://github.com/commercelayer/mcp-server-metrics/commit/dfead1d02db7d04d185e9c913aca0efbd0eefe02))
v1.2.1v1.2.1 · 17 Dec 2025[1.2.1](https://github.com/commercelayer/mcp-server-metrics/compare/v1.2.0...v1.2.1) (2025-12-17) Bug Fixes update dependencies ([e7d1007](https://github.com/commercelayer/mcp-server-metrics/commit/e7d100771d9d655a9adf0c8e3cce288eac295380))
v1.2.0v1.2.0 · 15 Dec 2025[1.2.0](https://github.com/commercelayer/mcp-server-metrics/compare/v1.1.1...v1.2.0) (2025-12-15) Features improve tools descriptions…

README

Commerce Layer Metrics MCP Server

This repository provides a local MCP Server implementation with a suite of metrics tools for Commerce Layer data analysis.


Table of Contents


Overview

The Metrics Local MCP Server exposes a set of tools to interact with Commerce Layer Metrics API and enables you to extract almost any kind of data information from your organization order, return, or cart history.


Installation

From GIT repository

  1. Clone the repository:

    git clone https://github.com/your-org/mcp-server-metrics.git
    cd mcp-server-metrics
    
  2. Install dependencies:

    pnpm install
    
  3. Build the project:

    pnpm build
    
  4. Create the server:

    pnpm dist
    

    The compiled files will be available in the dist/ directory and can be used to setup the MCP local server in the preferred AI agent (Claude Dekstop, OpenAI Chat-GPT ...).

As Claude Desktop extension

Claude Dekstop makes now easy the installation of custom MCP local servers both as a prebuilt bundles or an unpacked extensions. Here you can find the instructions from the Anthropic's support to perform the installation.

Follow the steps as for installing from a GIT repository and then:

  1. Create the extension bundle:

    npm run mcpb
    
  2. Install the extension: Upload the packed extension taking the bundle from mcpb/commercelayer-metrics.mcpb

When requested insert client_id and client_secret to connect to your Commerce Layer's organization.


Tools

Queries

These tools let you retrieve metric data and statistics about orders, carts and returns through four types of queries:

  1. Breakdown
  • orders-breakdown
  • carts-breakdown
  • returns-breakdown

Breakdowns are aggregations that summarize your data as metrics (based on specific operators) or statistics, computed on field values. When performing a breakdown query on the Metrics API endpoint you get in the response the value of the computation (based on the selected operator) on the selected field, aggregated by another field.

  1. Date breakdown
  • orders-date-breakdown
  • carts-date-breakdown
  • returns-date-breakdown

Date breakdowns are aggregations that show the frequency of occurrence of a specific date value within a dataset and let you apply a specific operator over a selected field of the records that are present on that date. When performing a date breakdown query on the Metrics API endpoint you get in the response the list by date of the values of the computation (based on the selected operator) on the selected field, over the selected time interval, aggregated by another field.

  1. Stats
  • orders-stats
  • carts-stats
  • returns-stats*

Stats are numeric computations (based on specific operators) calculated over values extracted from a specific field of the selected resource. When performing a stats query on the Metrics API endpoint you get in the response the value of the computation (based on the selected operator) on the selected field.

  1. Search
  • orders-search
  • carts-search
  • returns-search

Searches are a type of query a bit different from the other ones (breakdowns, date breakdowns, and stats). A search is not an aggregation and doesn't involve any computation based on operators, but an actual search. When performing a search query on the Metrics API endpoint you get in the response the list of the requested fields (sorted, filtered, and paginated) of the actual records that match the query.

Use cases

Commerce Layer Metrics API lets you extract and aggregate relevant metric data from your organizations. Combining the 4 available types of queries (breakdown, date breakdown, stats, and search) on the 3 available resources (orders, returns, and carts) and adding the appropriate filters lets you cover a wide range of use cases that can fit your business needs.

This is a list of tools that cover the most common application scenarios of Commerce Layer Metrics API:

  • best-selling-products-by-market get the Top N best-selling products for each of your organization's market
  • customers-that-bought-a-specific-product get the total number of customers that bought a specific product or bundle
  • frequently-bought-together-products get the products that have been most frequently bought together with other ones
  • last-carts-with-a-specific-product-from-a-specific-market get the most recently created carts containing a specific SKU, from a specific market
  • latest-archived-orders get the most recently archived orders
  • latest-placed-orders-from-customers-with-specific-email-domains get the last placed orders containing specific email domains in the aggregated details
  • number-of-products-per-order-by-country get mixed stats about the number of SKUs included in the orders of your organization, grouped by different countries
  • orders-associated-with-a-specific-promotion get the total number of orders that triggered a specific promotion
  • orders-by-bundle get the total number of orders containing a bundle, grouped by the bundle name
  • orders-by-currency get the total number of orders of your organization, grouped by different currencies
  • orders-by-day get the total number of orders of your organization, grouped by day
  • orders-by-repeat-customer get the total number of orders of your organization, grouped by customers that bought from you more than once
  • orders-by-resource-error-code-and-message check the errors associated with the orders of your organization (if any)
  • orders-by-shipment-status-and-shipping-method-name get the total number of orders of your organization, grouped by the associated shipment status and the related shipping method name
  • orders-by-status-and-payment-status get the total number of orders of your organization, grouped by their status and the related payment status
  • orders-paid-with-gift-cards get the total number of orders that were paid using a gift card
  • refunds-by-country-and-currency get the total number of refunds of your organization, grouped by the different countries and currencies
  • returns-per-year-by-destination-city get the total number of returns requested for your orders, grouped by year and destination city
  • shipments-average-time-in-picking get the average time your shipments stay in picking status before being packed
  • top-10-spenders-by-currency get the top spenders among your customers and know how their total purchase amount is divided by currency

Analysis

All the available Commerce Layer Metrics API helper endpoints.

  • FBT Also known as Frequently Bought Together, FBTs are a type of analysis query that, based on your entire order history, allows you to retrieve the items that most frequently have been added as line items in the same orders as a specified item (SKU or bundle) or array of items.

References

README mirrored from the source repository 3 days ago. The original is authoritative.

Questions

About Commerce Layer

How do I install Commerce Layer?

Run npx mcp-server-metrics, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Commerce Layer safe to use with an AI agent?

Its trust score is 45 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Commerce Layer still maintained?

The last commit was 8 months ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.