LeadCommerce MCP Server Reference

The LeadCommerce MCP Server exposes inventory, order, and SKU data as tools and resources for AI assistants via the Model Context Protocol.

Tools allow an AI to query live data. Resources provide reference documentation for every API domain so the AI can write raw GraphQL for any operation not covered by a built-in tool.

MCP Endpoint
POST https://mcp.leadcommerce.com/mcp
Health Check
GET https://mcp.leadcommerce.com/health
API Documentation
https://api.leadcommerce.com

Authentication

Every request to /mcp must include your LeadCommerce API key as a Bearer token.

Getting an API Key

Navigate to Settings → System Configuration → Global Settings, or open the link below and click Global Settings:

https://app.leadcommerce.com/general-settings

Under Generate API Keys, select the user and click Generate Key. Copy the key — it is only shown once.

Note: Your user role must have permission to create API Keys. Contact your system administrator if the option is unavailable.

Full API reference: api.leadcommerce.com

Request Header
Authorization: Bearer YOUR_LEADCOMMERCE_API_KEY
cURL Example
curl -X POST https://mcp.leadcommerce.com/mcp \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

Tools

Tools allow an AI assistant to query live LeadCommerce data. Each tool call is authenticated with the caller's own API key and returns live results from the GraphQL API.

search_labels

Search order labels by name. Returns label IDs and names. Use this to find a label ID before filtering sales orders by label (e.g. search "rush" → find "Rush Order" label ID → pass to search_sales_orders).

searchText:
string

Search labels by name (e.g. "rush" to find "Rush Order")

limit:
number

Max results (default 50)

Returns
{ "totalCount": 1, "results": [ { "id": 12, "name": "Rush Order", "color": "#e74c3c" } ] }

search_sales_orders

Search sales orders with optional filters. Returns paginated results with totalCount, hasNextPage, and nextOffset for subsequent pages.

searchText:
string

Free-text search across customer name, PO number, alt ID, etc.

displayId:
number

Look up by display number (e.g. pass 169 for SO-169)

statusIds:
string

Comma-separated status IDs to filter by (e.g. "1,2,3")

labelId:
number

Filter by label ID — use search_labels first to find the ID

dateFrom:
string

Orders created on or after this date (YYYY-MM-DD)

dateTo:
string

Orders created on or before this date (YYYY-MM-DD)

limit:
number

Max results per page (default 20)

offset:
number

Records to skip — use nextOffset from previous result for pagination

Returns
{ "totalCount": 163, "results": [ { "id": 1, "displayId": 921, "statusName": "Open", "customer": { "businessName": "Acme" }, "total": 1500.00 } ], "hasNextPage": true, "nextOffset": 20 }

get_sales_order

Fetch a single sales order with full line item detail. Pass either the internal id OR the displayId. Prefer displayId when the user references an order by SO number (e.g. SO-921 → displayId: 921).

id:
number

Internal database ID (use if already known from a prior search)

displayId:
number

The display number shown as SO-{n} — e.g. pass 921 for SO-921

Returns
{ "id": 1, "displayId": 921, "statusName": "Open", "customer": { "businessName": "Acme" }, "total": 1500.00, "lineItems": [ { "id": 1, "name": "Widget", "quantity": 10, "price": 150.00 } ] }

search_skus

Search SKUs (products) by name or code. Returns paginated results with totalCount and pagination info.

searchText:
string

Free-text search across SKU name and code

vendorId:
number

Filter by vendor ID

limit:
number

Max results per page (default 20)

offset:
number

Records to skip for pagination

Returns
{ "totalCount": 84, "results": [ { "id": 42, "code": "WGT-001", "name": "Widget", "isKit": false } ], "hasNextPage": true, "nextOffset": 20 }

get_inventory

Get stock levels for SKUs. Returns per-warehouse quantities: inStock, available, allocated, and onOrder.

skuId:
number

Filter to a specific SKU by ID

searchText:
string

Filter SKUs by name/code search

limit:
number

Max SKUs per page (default 20)

offset:
number

Records to skip for pagination

Returns
{ "totalCount": 84, "results": [ { "id": 42, "code": "WGT-001", "name": "Widget", "warehouseStockLevels": [ { "warehouseId": 1, "inStock": 500, "available": 420, "allocated": 80, "onOrder": 200 } ] } ] }

get_work_orders

Search work orders with optional filters. Returns work orders with assembly line items.

statusIds:
string

Comma-separated status IDs to filter by

skuId:
number

Filter by the SKU being assembled

limit:
number

Max results per page (default 20)

offset:
number

Records to skip for pagination

Returns
{ "totalCount": 14, "results": [ { "id": 1, "displayId": 7, "statusId": 2, "lineItems": [ { "skuId": 42, "name": "Widget", "quantity": 100 } ] } ], "hasNextPage": false }

get_inventory_lots

Search inventory lots with expiration dates and bin/warehouse locations. Returns lot details including number, quantity, cost, bin, warehouse, expiration date, manufacture date, and serial/alt numbers.

skuId:
number

Filter by a single SKU ID

skuIds:
string

Comma-separated SKU IDs

warehouseIds:
string

Comma-separated warehouse IDs

lotIds:
string

Comma-separated lot IDs to look up specific lots

expiredAfter:
string

Only lots expiring on or after this date (YYYY-MM-DD)

expiredBefore:
string

Only lots expiring on or before this date (YYYY-MM-DD)

createdAfter:
string

Only lots created on or after this date (YYYY-MM-DD)

createdBefore:
string

Only lots created on or before this date (YYYY-MM-DD)

limit:
number

Max results per page (default 50)

offset:
number

Records to skip for pagination

Returns
{ "totalCount": 8, "results": [ { "id": 1, "skuCode": "WGT-001", "lotNumber": "LOT-2024-01", "quantity": 500, "warehouseName": "Main", "binName": "A1", "expirationDate": "2026-12-31" } ] }

Resources

Resources expose the full LeadCommerce API domain reference as readable context. When an AI needs to perform an operation not covered by a built-in tool, it reads the relevant resource to learn the GraphQL query or mutation to use, then calls it directly against the GraphQL endpoint.

Resources use the URI scheme lcx://api/<domain-slug>.

GraphQL Endpoint
https://app.leadcommerce.com/graphql
GraphiQL Explorer
https://app.leadcommerce.com/graphiql

lcx://api/authentication

How to obtain and use a LeadCommerce API key.

URI
lcx://api/authentication

lcx://api/accounts

Manage your LeadCommerce account. (query.account)

URI
lcx://api/accounts

lcx://api/customers

Manage customers. CRUD via query.customers / mutation.createCustomer / updateCustomer / deleteCustomer.

URI
lcx://api/customers

lcx://api/inventory

Manage SKUs, lots, stock levels, and adjustments. Includes BOM, aggregation, and stock history.

URI
lcx://api/inventory

lcx://api/sales-orders

Manage sales orders. Create, update, invoice, ship, pay, return, and duplicate orders.

URI
lcx://api/sales-orders

lcx://api/purchase-orders

Manage purchase orders sent to vendors.

URI
lcx://api/purchase-orders

lcx://api/work-orders

Assemble finished goods from components. Critical: pass BASE BOM quantity, not total. See resource for full nuances.

URI
lcx://api/work-orders

lcx://api/shipments

Fetch shipments. Filter by salesOrderIDs, packageIds, isShipped, warehouseIds, date ranges.

URI
lcx://api/shipments

lcx://api/invoices

Fetch and consolidate invoices. Filter by customerIds, isPaid, statusId, date ranges.

URI
lcx://api/invoices

lcx://api/payments

Fetch payments. Filter by customerIds, source, date ranges.

URI
lcx://api/payments

lcx://api/returns

Manage RMAs. Fetch, filter, and receive returns to restock inventory.

URI
lcx://api/returns

lcx://api/transfers

Manage inventory transfers between warehouses.

URI
lcx://api/transfers

lcx://api/warehouses

Manage warehouses and their settings.

URI
lcx://api/warehouses

lcx://api/vendors

Manage vendors.

URI
lcx://api/vendors

lcx://api/users

Manage users in your account.

URI
lcx://api/users

lcx://api/ship-station

Get carriers, rates, and sync orders with ShipStation.

URI
lcx://api/ship-station

lcx://api/line-items

Manage line items (SKU + warehouse combinations). Required before creating work orders.

URI
lcx://api/line-items

lcx://api/products

Manage products (groupings above SKUs).

URI
lcx://api/products

lcx://api/bin-locations

Manage bin locations within warehouses.

URI
lcx://api/bin-locations

lcx://api/cost-rules

Manage cost rules for SKUs.

URI
lcx://api/cost-rules

lcx://api/price-rules

Manage price rules for SKUs.

URI
lcx://api/price-rules

lcx://api/labels

Manage labels.

URI
lcx://api/labels

lcx://api/filters

Manage module filters.

URI
lcx://api/filters

lcx://api/custom-fields

Manage custom fields.

URI
lcx://api/custom-fields

lcx://api/history

Audit log of record changes.

URI
lcx://api/history

lcx://api/user-roles

Manage user roles and permissions.

URI
lcx://api/user-roles

lcx://api/addresses

Manage addresses.

URI
lcx://api/addresses

MCP Client Configuration

This server implements the Model Context Protocol over HTTP with Streamable HTTP transport. Any MCP-compatible client can connect using the endpoint and auth header below.

Server URL
https://mcp.leadcommerce.com/mcp
Required Header
Authorization: Bearer YOUR_LEADCOMMERCE_API_KEY

Claude Desktop

Open your Claude Desktop config file and add the leadcommerce entry under mcpServers.

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Restart Claude Desktop after saving. The LeadCommerce tools will appear in the tools menu.

claude_desktop_config.json
{
  "mcpServers": {
    "leadcommerce": {
      "url": "https://mcp.leadcommerce.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LEADCOMMERCE_API_KEY"
      }
    }
  }
}

Cursor

Open Cursor Settings → MCP and click Add new MCP server. Set the transport to HTTP, enter the server URL, and add the Authorization header.

Alternatively, add directly to ~/.cursor/mcp.json.

~/.cursor/mcp.json
{
  "mcpServers": {
    "leadcommerce": {
      "url": "https://mcp.leadcommerce.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LEADCOMMERCE_API_KEY"
      }
    }
  }
}

Windsurf (Codeium)

Open Windsurf Settings → MCP Servers and add a new server, or edit the config file directly at ~/.codeium/windsurf/mcp_config.json.

mcp_config.json
{
  "mcpServers": {
    "leadcommerce": {
      "serverUrl": "https://mcp.leadcommerce.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_LEADCOMMERCE_API_KEY"
      }
    }
  }
}

n8n

Use the MCP Client Tool node in an n8n AI Agent workflow.

  1. Add an AI Agent node to your workflow
  2. Under Tools, add a MCP Client Tool node
  3. Set SSE URL to https://mcp.leadcommerce.com/mcp
  4. Under Authentication, select Header Auth and set header Authorization to Bearer YOUR_LEADCOMMERCE_API_KEY
MCP Client Tool Node
SSE URL:
  https://mcp.leadcommerce.com/mcp

Authentication: Header Auth
  Name:  Authorization
  Value: Bearer YOUR_LEADCOMMERCE_API_KEY

Other MCP Clients

Any client supporting MCP over Streamable HTTP transport can connect. Configure with:

  • Transport: Streamable HTTP (or HTTP+SSE)
  • URL: https://mcp.leadcommerce.com/mcp
  • Auth header: Authorization: Bearer YOUR_LEADCOMMERCE_API_KEY

See the MCP transport documentation for details on the protocol.

Test with curl
curl -X POST https://mcp.leadcommerce.com/mcp \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'