Skip to main content

MCP Server for the LINE Shopping API, enabling AI agents to interact with LINE Shopping data and operations

Project description

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

Prerequisites

  1. Python >= 3.13
  2. uv (Python package manager)
  3. LINE Shopping API Key (X_API_KEY)

Installation

Method 1: Using uvx (Recommended)

Install and run directly from PyPI using uvx:

# Install and run the MCP server (note the different executable name)
uvx --from lineshopping-api-mcp lineshopping-mcp

Or run with environment variables:

# Set your API key and run
X_API_KEY=your_api_key_here 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 add fastmcp httpx
    
  3. Run the server:

    # Set your API key and run
    X_API_KEY=your_api_key_here uv run --with fastmcp fastmcp run app.py
    

Environment Configuration

For persistent configuration, create a .env file in your working directory:

X_API_KEY=your_api_key_here

Configuration & Integration

Using uvx (PyPI Installation)

Configure your agent to use the PyPI-installed package:

{
	"inputs": [
		{
			"type": "promptString",
			"id": "line-shopping-api-key",
			"description": "LINE Shopping API Key",
			"password": true
		}
	],
	"servers": {
		"LINE Shopping API MCP": {
			"command": "uvx",
			"args": [
				"--from",
				"lineshopping-api-mcp",
				"lineshopping-mcp"
			],
			"env": {
				"X_API_KEY": "${input:line-shopping-api-key}"
			}
		}
	}
}

Using Local Clone

For local development or cloned repository:

{
	"inputs": [
		{
			"type": "promptString",
			"id": "line-shopping-api-key",
			"description": "LINE Shopping API Key",
			"password": true
		}
	],
	"servers": {
		"LINE Shopping API MCP": {
			"command": "uv",
			"args": [
				"run",
				"--with",
				"fastmcp",
				"fastmcp",
				"run",
				"/Users/xxx/lineshopping-api-mcp/app.py"
			],
			"env": {
				"X_API_KEY": "${input:line-shopping-api-key}",
				"FASTMCP_EXPERIMENTAL_ENABLE_NEW_OPENAPI_PARSER": "true"
			}
		}
	}
}

Available Tools

The following tools are exposed by the MCP server (see openapi.json for full details):

Checkout & Links

  • 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-orders: List orders with advanced filtering
  • get-order-detail: Get details for a specific order
  • cancel-order: Cancel an order
  • mark-order-paid: Mark order as paid (COD)
  • mark-order-shipped: Mark order as shipped and add tracking number
  • print-parcel-label: Download parcel label for an order
  • send-order-message: Send message via OA Plus flex message
  • update-shipment: Update shipping tracking number

Product Management

  • get-products: List/search products
  • create-product: Create a new product
  • delete-product: Delete a product
  • update-product-detail: Update product details
  • delete-product-variant: Delete a product variant
  • update-product-display-status: Update product's display status (onsale/hide)
  • update-product-price: Update product price and instant discount
  • update-product-variant-detail: Update product variant details
  • create-product-variants: Create product variants

Settlement

  • get-settlement-detail: Get settlement details for an order

Refer to openapi.json for all available tools, input parameters, and response formats.

Debugging

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

  • Authentication Errors: Verify your API key and environment variable setup
  • 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 add fastmcp httpx

# Run the server (with fastmcp)
X_API_KEY=your_api_key_here uv run --with fastmcp fastmcp run app.py

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_woraphol_lineshopping_api_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_woraphol_lineshopping_api_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 56.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_woraphol_lineshopping_api_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d24aca73aa4e4d645c8e30bbc827ac5cde893fd038eba88ddd802c98265b1b54
MD5 464ed3eff4cec349e43700aa202897b9
BLAKE2b-256 b2f631ea4d3d6f1d129b8279d0f95aa06fca6bc6c3501ee3652440276c4463c2

See more details on using hashes here.

File details

Details for the file iflow_mcp_woraphol_lineshopping_api_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_woraphol_lineshopping_api_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_woraphol_lineshopping_api_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f14a67cddbae27bcdd5eb2a8cce2fdd38559f87e22c7de21c906e81f4be8578e
MD5 4c70d341c95d4354416a775ce1feab4c
BLAKE2b-256 253052543b85e7e9a3eaec9a54c93327140bf9d327c8342ec722257bb5c1c03a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page