Store data access
75 read tools cover orders, products, inventory, customers, promotions, analytics, reviews, conversations, delivery, and store settings.
A local MCP bridge from AI clients to the Shopline Open API
shopline mcp gives Claude Code, Claude Desktop, Codex, and other MCP-compatible AI clients structured access to your Shopline orders, products, inventory, customers, campaigns, conversations, reviews, and merchant settings through stdio.
Shopline MCP is a TypeScript/Node.js MCP server for Shopline analysis and store operations, built on the Shopline Open API and published as the shopline-mcp npm package.
75 read tools cover orders, products, inventory, customers, promotions, analytics, reviews, conversations, delivery, and store settings.
Hand-ported analytical tools summarize sales, rank products, compare channels, segment customers, calculate stock risk, and measure promotion performance.
68 write tools can create, update, or delete Shopline resources when the connected API token has the required permissions.
Built-in analytical tools turn Shopline order, customer, product, inventory, and promotion data into answers that are useful for daily e-commerce decisions.
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.
Use get_rfm_analysis, get_repurchase_analysis, andget_customer_lifecycle to understand segments, repeat purchase patterns, and customer movement between periods.
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.
The higher-level tools combine multiple Shopline resources so an AI client can answer merchant questions without asking you to manually join orders, products, customers, and warehouse data.
Compare online and POS revenue, average order value, discount totals, payment mix, delivery mix, and store-level contribution over a date range.
Segment customers with RFM, inspect repeat purchase behavior, and compare two periods to find upgrades, churn risk, new customers, and lost customers.
Review stock overview, low-stock SKUs, inventory turnover, slow-moving products, locked inventory, warehouse stock, and cross-warehouse transfer suggestions.
Use get_promotion_analysis, get_promotion_roi,get_category_sales, get_refund_summary, andget_refund_by_store to review campaign impact and refund patterns.
Run the server with the supported Node.js runtime and a Shopline Open API token.
shopline-mcpSHOPLINE_API_TOKENInstall the npm package, or run the published server directly with npx.
npm install shopline-mcpnpx shopline-mcpexport SHOPLINE_API_TOKEN=your_token_hereConfigure your MCP client to start shopline-mcp over stdio.
claude mcp add --transport stdio shopline \
-e SHOPLINE_API_TOKEN=your_token_here \
-- npx shopline-mcp{
"mcpServers": {
"shopline": {
"command": "npx",
"args": ["shopline-mcp"],
"env": {
"SHOPLINE_API_TOKEN": "your_token_here"
}
}
}
}Use stdio transport with npx shopline-mcp or the installedshopline-mcp executable, and pass SHOPLINE_API_TOKEN in the environment.
The 143 tools span 75 read tools and 68 write tools across the core Shopline Open API resources used by merchants and store operators.
Query orders by date, status, channel, and store; inspect line items, labels, tags, action logs, transactions, archived orders, and shipment state.
Search products, inspect variants, product images, tags, categories, warehouse stock, locked inventory, low stock alerts, price, and quantity.
Work with customer profiles, search, groups, store credits, member points, membership tiers, tier history, custom fields, and customer promotions.
Cover promotions, coupons, flash price campaigns, affiliate campaigns, gifts, add-on products, subscriptions, campaign detail, and usage stats.
Read customer service conversations and messages, reply to order or shop threads, and manage product review comments when token permissions allow.
Inspect delivery options, time slots, order delivery records, return orders, return order details, and update delivery or pickup store data.
Access merchants, channels, payments, taxes, staff permissions, app settings, agents, and token information.
List purchase orders, inspect purchase order detail, create purchase orders, and work with POS-related inventory and revenue rules.
Upload media and create merchant app metafields for Shopline resources when the API token includes the necessary scopes.
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; the server does not bypass Shopline's access controls.
Write tool descriptions start with [WRITE] and include a【副作用】 section so AI clients can distinguish operations that change store data.
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.
Write tools cover common merchant operations such as order shipping, product updates, customer credits, coupon actions, return orders, replies, reviews, and inventory-related updates.
Write coverage includes orders, customers, products, promotions, categories, returns, conversations, reviews, gifts and add-ons, purchase orders, media, metafields, delivery, and merchant settings.
These notes describe the Shopline Open API behavior handled by the server.
https://open.shopline.ioAuthorization: Bearer <SHOPLINE_API_TOKEN>page and per_pageper_page max is 50sort_byconfirmedcompletedshop or posdollarsThe package is a TypeScript/Node.js implementation with static tool metadata, a shared Shopline HTTP client, custom analytical handlers, and local tests around the MCP-facing contract.
The TypeScript package was rebuilt with reference to the MIT-licensed Python project and keeps the same 143-tool baseline, tool names, read/write split, and endpoint mapping expectations.
Tool registration marks read tools as read-only and write tools as non-read-only and destructive, matching the side-effect labels in the tool descriptions.
The server handles bearer-token auth, retries, pagination, request parameters, JSON bodies, DELETE bodies, and analytical outputs with Shopline money values converted from dollars.
The repository includes tests for tool counts, write-tool markings, request bodies, read-output shapes, endpoint coverage, client behavior, and a stdiotools/list smoke check.
Shopline MCP runs locally over stdio with a Shopline Open API token, giving your AI client structured access to store analysis and operations.
Install and RunView Tool Coverage