
LINE SHOPPING API 的模型上下文协议(MCP)服务器。使 AI 代理和工具能够通过自动生成的 MCP 工具管理 LINE SHOPPING 上的产品、库存、订单和结算,这些工具来自......
概览
LINE 购物 API 的 MCP 服务器,使 AI 代理和工具能够通过模型上下文协议与 LINE 购物数据和操作交互。该服务器提供管理产品、库存、订单、结算等工具,使用官方 LINE 购物 API 进行管理。 - : 搜索、创建、更新和删除产品及变体 - : 调整、增加或减少库存水平 - : 查询、查看、取消和更新订单 - : 检索订单结算详情 - : 所有工具均由OpenAPI规范自动生成 1. Python >= 3.13 2.uv(Python 包管理器) 3.LINE 购物 API 密钥(X_API_KEY) 直接使用uvx从PyPI安装并运行: 为了持久配置,可以在工作目录中创建一个 .env 文件: 配置您的代理使用PyPI安装的软件包: 对于本地开发或克隆仓库: 以下工具由MCP服务器公开(详见 openapi.json 详细内容):
概述(AI 翻译)
LINE 购物 API 的 MCP 服务器,使 AI 代理和工具能够通过模型上下文协议与 LINE 购物数据和操作交互。该服务器提供管理产品、库存、订单、结算等工具,使用官方 LINE 购物 API 进行管理。
特色
- 产品管理:搜索、创建、更新和删除产品及变体
- 库存管理:调整、增加或减少库存水平
- 订单管理:查询、查看、取消和更新订单
- 结算:检索订单结算详情
- OpenAPI 集成:所有工具均由 OpenAPI 规范自动生成
先修条件
- Python >= 3.13
- uv(Python package manager)
- LINE 购物 API 密钥(
X_API_KEY)
安装
方法1:使用UVX(推荐)
使用uvx直接从PyPI安装并运行:
或者用环境变量运行:
方法二:克隆后逃跑
-
克隆仓库:
-
安装依赖:
-
运行服务器:
环境配置
为了持久配置,请在工作目录中创建一个 .env 文件:
配置与集成
使用 UVX(PyPI 安装)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 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
- Python >= 3.13
- uv (Python package manager)
- 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
-
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:
# 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
安装
uvx --from lineshopping-api-mcp lineshopping-mcp