Skip to main content
Glama
LINE Shopping API MCP

LINE Shopping API MCP

by woraphol-j

LINE Shopping API MCP Server

MCP Server for the LINE Shopping API, enabling AI agents and tools to interact with LINE Shopping data and operations via the Model Context Protocol. This server provides tools for managing products, inventory, orders, settlements, and more, using the official LINE Shopping API.

Features

  • Product Management: Search, create, update, and delete products and variants

  • Inventory Management: Adjust, increase, or decrease inventory levels

  • Order Management: Query, view, cancel, and update orders

  • Settlement: Retrieve settlement details for orders

  • OpenAPI Integration: All tools are auto-generated from the OpenAPI spec

Related MCP server: LineWhiz

Prerequisites

  1. Python >= 3.11

  2. uv (Python package manager)

  3. LINE Shopping API key, supplied in the MCP request's X-API-KEY header or through the optional X_API_KEY environment variable

Installation

Install and run directly from PyPI using uvx:

# Run the Streamable HTTP server at http://127.0.0.1:8000/mcp/
uvx --from lineshopping-api-mcp lineshopping-mcp

Method 2: Clone and Run

  1. Clone the repository:

    git clone https://github.com/woraphol-j/lineshopping-api-mcp.git
    cd lineshopping-api-mcp
  2. Install dependencies:

    uv sync
  3. Run the server:

    uv run fastmcp run app.py --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp/

Authentication

LINE API tool calls need the merchant's API key in the incoming MCP request:

X-API-KEY: <merchant-api-key>

The server forwards this header to the corresponding OAPlus API request. If the X_API_KEY environment variable is set to a non-blank value, it takes precedence over the request header. Otherwise, each request can provide its own key. A missing key fails the LINE API tool call; MCP initialization and tool discovery do not require one.

Configuration & Integration

Connect an MCP client

Start the local Streamable HTTP server:

uv run fastmcp run app.py --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp/

Configure the client to send its merchant key as an HTTP header:

{
	"inputs": [
		{
			"type": "promptString",
			"id": "line-shopping-api-key",
			"description": "LINE Shopping API Key",
			"password": true
		}
	],
	"servers": {
		"LINE Shopping API MCP": {
			"type": "http",
			"url": "http://127.0.0.1:8000/mcp/",
			"headers": {
				"X-API-KEY": "${input:line-shopping-api-key}"
			}
		}
	}
}

For GitHub repository MCP settings, configure a reachable Streamable HTTP endpoint. GitHub's cloud agent cannot reach a local 127.0.0.1 server directly.

Available Tools

The following tools are generated from the packaged OpenAPI spec at lineshopping_api_mcp/openapi.json:

  • Create_checkout_link: Generate a checkout link for order items

Inventory Management

  • Adjust_inventory: Adjust inventory by ID

  • Decrease_inventory: Decrease inventory by ID

  • Increase_inventory: Increase inventory by ID

Order Management

  • Get_all_orders: List orders with advanced filtering

  • Order_detail: Get details for a specific order

  • Cancel_Order: Cancel an order

  • Confirm_order_delivery: Confirm order delivery

  • Mark_as_paid_COD: Mark order as paid (COD)

  • Mark_as_ship: Mark order as shipped

  • Print_parcel_label: Download parcel label for an order

  • Send_message_via_OA_Plus_flex_message_services: Send an OA Plus message

  • Update_tracking_number: Update the shipment tracking number

Product Management

  • Get_all_products: List/search products

  • Create_product: Create a product

  • Delete_product: Delete a product

  • Update_product_detail: Update product details

  • Delete_product_variant: Delete a product variant

  • Update_products_display_status: Update product display status

  • Update_product_price: Update product price and instant discount

  • Update_product_variant_detail: Update product variant details

  • Create_product_variants: Create product variants

Settlement

  • Settlement_detail: Get settlement details for an order

The server loads the packaged OpenAPI file above. The root-level openapi.json is only a fallback if the packaged file is absent.

Debugging

If you run into issues, check your agent platform's MCP logs for errors. Common issues:

  • Authentication Errors: Verify the X-API-KEY request header or optional X_API_KEY environment variable

  • API Errors: Check rate limits, input formats, and required fields

Development

Local Development

# Clone the repository
git clone https://github.com/woraphol-j/lineshopping-api-mcp.git
cd lineshopping-api-mcp

# Install dependencies
uv sync

# Run the server (with fastmcp)
uv run fastmcp run app.py --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp/

Building and Publishing

# Build the package
uv build

# Publish to PyPI (requires API token)
uv publish --token your_pypi_token

Dependencies

  • fastmcp - MCP protocol implementation

  • httpx - HTTP client for API requests

License

MIT


This project is not an HTTP REST API server. It is an MCP server for agent integrations. For more details, see FastMCP and LINE Shopping API.

Available Tools

22 tools
Adjust_inventoryC

API for updating inventory by adjusting the inventory amount from the current inventory on hand.

Inputs: id (required), amount (required). Returns: availableNumber, onHandAmount, readyToShipAmount, reservedAmount

Cancel_OrderD

An API for cancel order.

Inputs: orderNo (required), remarkCancel (required). Returns: checkoutAt, discountAmount, isGift, lastUpdatedAt, +15 more

Create_productC

An API for product creation. For product Categories ID variable please find more information on Development guideline

Inputs: categoryId (required), code (required), imageUrls (required), name (required), +6 more. Returns: brand, category, code, description, +11 more

Create_product_variantsC

An API for product variants creation.

Inputs: id (required), variantOptions (required), variants (required). Returns: brand, category, code, description, +11 more

Decrease_inventoryB

API for updating inventory by decreasing the inventory amount from the current inventory on hand.

Inputs: id (required), amount (required). Returns: availableNumber, onHandAmount, readyToShipAmount, reservedAmount

Delete_productC

An API for product deletion.

Inputs: id (required).

Delete_product_variantC

An API for product variant deletion.

Inputs: id (required), name (required), value (required).

Get_all_ordersC

An API for getting a list of orders by condition

Inputs: search, page, perPage, sortBy, +8 more. Returns: currentPage, data, perPage, totalPage, +1 more

Get_all_productsC

An API for getting a list of products

Inputs: ids, skus, page, perPage. Returns: currentPage, data, perPage, totalPage, +1 more

Increase_inventoryB

API for updating inventory by increasing the inventory amount from the current inventory on hand.

Inputs: id (required), amount (required). Returns: availableNumber, onHandAmount, readyToShipAmount, reservedAmount

Mark_as_paid_CODA

Update order status to Complete by Mark payment status as Paid to the selected order that payment method is COD

Inputs: orderNo (required). Returns: checkoutAt, discountAmount, isGift, lastUpdatedAt, +15 more

Mark_as_shipC

Update order status to Complete by Mark shipment status as shipped and add tracking number

Inputs: orderNo (required), trackingNumber, trackingUrl. Returns: checkoutAt, discountAmount, isGift, lastUpdatedAt, +15 more

Order_detailC

An API for getting an order detail

Inputs: orderNo (required). Returns: checkoutAt, discountAmount, isGift, lastUpdatedAt, +15 more

Send_message_via_OA_Plus_flex_message_servicesC

Send message api is a proxy message services that receive message object and forward to flex message api

Inputs: orderNo (required), messages (required). Returns: messageIds

Settlement_detailC

An API for getting a settlement detail

Inputs: orderNo (required). Returns: orderIncomeDetail, orderNumber, settlementDetail

Update_product_detailC

An API for product detail updating. For product Categories ID variable please find more information on Development guideline

Inputs: id (required), brand, categoryId, code, +5 more. Returns: brand, category, code, description, +11 more

Update_product_priceB

An API for updating prices and instant discounts on the product. (You can't edit product price and instant discount during the promotion period.)

Inputs: id (required), instantDiscount (required), variants (required). Returns: brand, category, code, description, +11 more

Update_products_display_statusC

An API for product's display status updating.

Inputs: id (required), status (required). Returns: brand, category, code, description, +11 more

Update_product_variant_detailC

An API for update specific variant detail for both with and without variant product.

Inputs: id__path (required), barcode, id, imageUrl, +4 more. Returns: brand, category, code, description, +11 more

Update_tracking_numberB

Update the shipping tracking number for the selected order that the shipment status is Shipped.

Inputs: orderNo (required), trackingNumber, trackingUrl. Returns: checkoutAt, discountAmount, isGift, lastUpdatedAt, +15 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 22 tools

    Disambiguation4/5

    Most tools target distinct resources and actions. However, Adjust_inventory overlaps with Increase_inventory and Decrease_inventory, as it also adjusts inventory by an amount, causing potential confusion. The order and product tools are well-separated.

    Naming Consistency3/5

    Naming follows a mix of conventions: mostly verb_noun (e.g., Create_product), but some are noun_noun (Order_detail, Settlement_detail) or lengthy phrases (Send_message_via_OA_Plus_flex_message_services). Inconsistent use of 'Get' prefix (Get_all_orders vs Order_detail) adds to the inconsistency.

    Tool Count5/5

    22 tools cover the major operations of a shopping API: product and variant CRUD, order management, inventory adjustments, checkout, messaging, and settlements. This is a well-scoped set for the domain without being overwhelming.

    Completeness3/5

    The tool surface covers core product and order workflows, but lacks inventory querying (no get_inventory), order creation (orders are presumably customer-initiated), and refund/return operations. Also missing category management, though categories are referenced in product tools.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Model Context Protocol server implementation that integrates the LINE Messaging API to connect AI agents with LINE Official Accounts, enabling agents to send messages to users.
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      AI-powered MCP server for managing LINE Official Accounts. Send broadcasts, push messages, check analytics, manage rich menus — all through natural language via Claude, ChatGPT, or Cursor. 10 tools included: * Account info, friend count, message quota * Broadcast, push message, multicast * Delivery stats, user profiles, follower list * Rich menu management Supports 95M+ LINE users across Jap
      10
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An open-source MCP server that wraps the Shopline Open API into 143 AI-callable tools for e-commerce data analysis, enabling AI agents to query orders, products, inventory, customer behavior, and promotions from Shopline stores through natural language.
      100
      95 PyPI
      21
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server that integrates the LINE Messaging API to enable AI agents to send messages and manage LINE Official Accounts.
      12
      2,913 npm
      807
      Apache 2.0