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).
Search labels by name (e.g. "rush" to find "Rush Order")
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.
Free-text search across customer name, PO number, alt ID, etc.
Look up by display number (e.g. pass 169 for SO-169)
Comma-separated status IDs to filter by (e.g. "1,2,3")
Filter by label ID — use search_labels first to find the ID
Orders created on or after this date (YYYY-MM-DD)
Orders created on or before this date (YYYY-MM-DD)
Max results per page (default 20)
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).
Internal database ID (use if already known from a prior search)
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.
Free-text search across SKU name and code
Filter by vendor ID
Max results per page (default 20)
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.
Filter to a specific SKU by ID
Filter SKUs by name/code search
Max SKUs per page (default 20)
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.
Comma-separated status IDs to filter by
Filter by the SKU being assembled
Max results per page (default 20)
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.
Filter by a single SKU ID
Comma-separated SKU IDs
Comma-separated warehouse IDs
Comma-separated lot IDs to look up specific lots
Only lots expiring on or after this date (YYYY-MM-DD)
Only lots expiring on or before this date (YYYY-MM-DD)
Only lots created on or after this date (YYYY-MM-DD)
Only lots created on or before this date (YYYY-MM-DD)
Max results per page (default 50)
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/authenticationlcx://api/accounts
Manage your LeadCommerce account. (query.account)
URI
lcx://api/accountslcx://api/customers
Manage customers. CRUD via query.customers / mutation.createCustomer / updateCustomer / deleteCustomer.
URI
lcx://api/customerslcx://api/inventory
Manage SKUs, lots, stock levels, and adjustments. Includes BOM, aggregation, and stock history.
URI
lcx://api/inventorylcx://api/sales-orders
Manage sales orders. Create, update, invoice, ship, pay, return, and duplicate orders.
URI
lcx://api/sales-orderslcx://api/purchase-orders
Manage purchase orders sent to vendors.
URI
lcx://api/purchase-orderslcx://api/work-orders
Assemble finished goods from components. Critical: pass BASE BOM quantity, not total. See resource for full nuances.
URI
lcx://api/work-orderslcx://api/shipments
Fetch shipments. Filter by salesOrderIDs, packageIds, isShipped, warehouseIds, date ranges.
URI
lcx://api/shipmentslcx://api/invoices
Fetch and consolidate invoices. Filter by customerIds, isPaid, statusId, date ranges.
URI
lcx://api/invoiceslcx://api/payments
Fetch payments. Filter by customerIds, source, date ranges.
URI
lcx://api/paymentslcx://api/returns
Manage RMAs. Fetch, filter, and receive returns to restock inventory.
URI
lcx://api/returnslcx://api/transfers
Manage inventory transfers between warehouses.
URI
lcx://api/transferslcx://api/warehouses
Manage warehouses and their settings.
URI
lcx://api/warehouseslcx://api/vendors
Manage vendors.
URI
lcx://api/vendorslcx://api/users
Manage users in your account.
URI
lcx://api/userslcx://api/ship-station
Get carriers, rates, and sync orders with ShipStation.
URI
lcx://api/ship-stationlcx://api/line-items
Manage line items (SKU + warehouse combinations). Required before creating work orders.
URI
lcx://api/line-itemslcx://api/products
Manage products (groupings above SKUs).
URI
lcx://api/productslcx://api/bin-locations
Manage bin locations within warehouses.
URI
lcx://api/bin-locationslcx://api/cost-rules
Manage cost rules for SKUs.
URI
lcx://api/cost-ruleslcx://api/price-rules
Manage price rules for SKUs.
URI
lcx://api/price-ruleslcx://api/labels
Manage labels.
URI
lcx://api/labelslcx://api/filters
Manage module filters.
URI
lcx://api/filterslcx://api/custom-fields
Manage custom fields.
URI
lcx://api/custom-fieldslcx://api/history
Audit log of record changes.
URI
lcx://api/historylcx://api/user-roles
Manage user roles and permissions.
URI
lcx://api/user-roleslcx://api/addresses
Manage addresses.
URI
lcx://api/addressesMCP 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.
- Add an AI Agent node to your workflow
- Under Tools, add a MCP Client Tool node
- Set SSE URL to
https://mcp.leadcommerce.com/mcp - Under Authentication, select Header Auth and set header
AuthorizationtoBearer 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":{}}'