Shopline MCP Server

143 AI-callable tools for Shopline Open API analysis and operations

shopline-mcp connects Claude Code, Claude Desktop, Codex, and other MCP-compatible clients to Shopline store data through stdio.

What It Provides

A Node.js MCP server for store analysis and operations, backed by the Shopline Open API and exposed as structured tools for AI clients.

Store data access

75 read tools cover orders, products, inventory, customers, promotions, analytics, reviews, conversations, delivery, and store settings.

Analysis-ready outputs

High-value tools summarize sales, rank products, compare channels, segment customers, track stock risk, and measure promotion performance.

Controlled operations

68 write tools can create, update, or delete Shopline resources when the connected API token has the required permissions.

Commerce Analysis

Built-in analytical tools turn Shopline order, customer, product, inventory, and promotion data into answers that are useful for daily e-commerce decisions.

Sales performance

Use get_sales_summary, get_top_products, get_sales_trend, and get_channel_comparison to inspect revenue, AOV, product ranking, sales trends, and online versus POS performance.

Customer behavior

Use get_rfm_analysis, get_repurchase_analysis, and get_customer_lifecycle to understand segments, repeat purchase patterns, and customer movement between periods.

Inventory and promotions

Use get_inventory_turnover, get_promotion_roi, get_slow_movers, and get_stock_transfer_suggestions to spot stock risk, promotion lift, slow-moving products, and transfer opportunities.

Requirements

Run the server with the supported Node.js runtime and a Shopline Open API token.

Runtime

  • Node.js 24 or newer
  • stdio transport support in your MCP client
  • Executable command: shopline-mcp

Shopline access

  • Shopline Open API access token
  • Token env var: SHOPLINE_API_TOKEN
  • Token scopes control which tools are available

Install and Run

Install the npm package, or run the published server directly with npx.

Install

npm install shopline-mcp

Run directly

npx shopline-mcp

Set the API token before running the server

export SHOPLINE_API_TOKEN=your_token_here

Client Configuration

Configure your MCP client to start shopline-mcp over stdio.

Claude Code

claude mcp add --transport stdio shopline \
  -e SHOPLINE_API_TOKEN=your_token_here \
  -- npx shopline-mcp

Claude Desktop

{
  "mcpServers": {
    "shopline": {
      "command": "npx",
      "args": ["shopline-mcp"],
      "env": {
        "SHOPLINE_API_TOKEN": "your_token_here"
      }
    }
  }
}

Codex and other MCP-compatible clients

Use stdio transport with npx shopline-mcp or the installed shopline-mcp executable, and pass SHOPLINE_API_TOKEN in the environment.

Tool Coverage

The 143 tools span 75 read tools and 68 write tools across the core Shopline Open API resources used by merchants and store operators.

Orders

Query orders by date, status, channel, and store; inspect line items, labels, tags, action logs, transactions, archived orders, and shipment state.

Products and inventory

Search products, inspect variants, product images, tags, categories, warehouse stock, locked inventory, low stock alerts, price, and quantity.

Customers and membership

Work with customer profiles, search, groups, store credits, member points, membership tiers, tier history, custom fields, and customer promotions.

Promotions and campaigns

Cover promotions, coupons, flash price campaigns, affiliate campaigns, gifts, add-on products, subscriptions, campaign detail, and usage stats.

Conversations and reviews

Read customer service conversations and messages, reply to order or shop threads, and manage product review comments when token permissions allow.

Delivery and returns

Inspect delivery options, time slots, order delivery records, return orders, return order details, and update delivery or pickup store data.

Store settings

Access merchants, channels, payments, taxes, staff permissions, app settings, agents, and token information.

Purchase orders and POS

List purchase orders, inspect purchase order detail, create purchase orders, and work with POS-related inventory and revenue rules.

Media and metafields

Upload media and create merchant app metafields for Shopline resources when the API token includes the necessary scopes.

Write Tools

This server includes 68 tools that can create, update, or delete Shopline data. Token permissions determine which write actions your AI client can actually use.

Clearly marked side effects

Write tool descriptions start with [WRITE] and include a 【副作用】 section so AI clients can distinguish operations that change store data.

Merchant-controlled access

Use the narrowest Shopline Open API token scopes needed for your workflow. Read tools are marked read-only, while write tools are marked as non-read-only and destructive.

Operational areas

Write coverage includes orders, customers, products, promotions, categories, returns, conversations, reviews, gifts and add-ons, purchase orders, media, metafields, delivery, and merchant settings.

API Notes

These notes describe the Shopline Open API behavior handled by the server.

Endpoint and auth

  • Base URL: https://open.shopline.io
  • Auth: Authorization: Bearer <SHOPLINE_API_TOKEN>
  • The shared client handles auth, retry, pagination, and DELETE bodies

Pagination and limits

  • Pagination uses page and per_page
  • per_page max is 50
  • Search limit is 10,000 results
  • Large order searches are paginated internally

Order and money rules

  • Orders search does not support sort_by
  • Online revenue orders use confirmed
  • POS revenue orders use completed
  • Channel source is shop or pos
  • Money values come from dollars

Use shopline-mcp with your MCP client

Run the server with a Shopline Open API token, connect over stdio, and give your AI client access to Shopline store analysis and operations.

Install and Run View Tool Coverage