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
- 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.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lineshopping_api_mcp-0.1.0.tar.gz.
File metadata
- Download URL: lineshopping_api_mcp-0.1.0.tar.gz
- Upload date:
- Size: 59.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
373e1c0077ed01f5b08a40ea618e6068a2ea9901aa338d6f4de366d082956962
|
|
| MD5 |
d90e8599db96348b7b0e2b36d3724872
|
|
| BLAKE2b-256 |
7b55a7ee9ab778b9a9a52bb79982c69fc8d0811fafc9b34dd9894101c0bc4cd3
|
File details
Details for the file lineshopping_api_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lineshopping_api_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec4221fb830d9d0ffbf311308e2a2a04a7ca977b7a1b61e080f8db79fae0f1a
|
|
| MD5 |
3658f5bdc84a975c0258a1439f802a05
|
|
| BLAKE2b-256 |
e3c34d8c48fe4fce623f7a191a3b417ad28fe66ef0a2074649d9c4f16c8f7708
|