LINE Shopping API MCP

LINE Shopping API MCP

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.

Category
访问服务器

README

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选