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
- Python >= 3.13
- uv (Python package manager)
- LINE Shopping API Key (
X_API_KEY)
Installation
-
Clone the repository:
git clone https://github.com/woraphol-j/lineshopping-api-mcp.git cd lineshopping-api-mcp
-
Install dependencies:
uv add fastmcp httpx
-
Create Environment File: Create a
.envfile in the project root:X_API_KEY=your_api_key_here
Configuration & Integration
To use this MCP server with an agent platform, configure your agent to launch the server using uv and the correct environment variables. Example config (from .vscode/mcp.json):
{
"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 IDdecrease-inventory: Decrease inventory by IDincrease-inventory: Increase inventory by ID
Order Management
get-orders: List orders with advanced filteringget-order-detail: Get details for a specific ordercancel-order: Cancel an ordermark-order-paid: Mark order as paid (COD)mark-order-shipped: Mark order as shipped and add tracking numberprint-parcel-label: Download parcel label for an ordersend-order-message: Send message via OA Plus flex messageupdate-shipment: Update shipping tracking number
Product Management
get-products: List/search productscreate-product: Create a new productdelete-product: Delete a productupdate-product-detail: Update product detailsdelete-product-variant: Delete a product variantupdate-product-display-status: Update product's display status (onsale/hide)update-product-price: Update product price and instant discountupdate-product-variant-detail: Update product variant detailscreate-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
# Install dependencies
uv add fastmcp httpx
# Run the server (with fastmcp)
uv run --with fastmcp fastmcp run app.py
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.
Metadata
Release files for lineshopping-api-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lineshopping_api_mcp-0.1.0.tar.gz | 59.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lineshopping_api_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.8 kB
Release files / lineshopping_api_mcp-0.1.0.tar.gz
| Download URL | lineshopping_api_mcp-0.1.0.tar.gz |
|---|---|
| Size | 59.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
373e1c0077ed01f5b08a40ea618e6068a2ea9901aa338d6f4de366d082956962
|
|
BLAKE2b-256 checksum How to use checksums |
7b55a7ee9ab778b9a9a52bb79982c69fc8d0811fafc9b34dd9894101c0bc4cd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.21
|
Release files / lineshopping_api_mcp-0.1.0-py3-none-any.whl
| Download URL | lineshopping_api_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dec4221fb830d9d0ffbf311308e2a2a04a7ca977b7a1b61e080f8db79fae0f1a
|
|
BLAKE2b-256 checksum How to use checksums |
e3c34d8c48fe4fce623f7a191a3b417ad28fe66ef0a2074649d9c4f16c8f7708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.21
|
Security for lineshopping-api-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.