Lazada MCP
A read-only MCP server for Lazada Open Platform that provides access to orders, transactions, fee breakdowns, and per-SKU profit analysis.
README
Lazada MCP
A read-only MCP server for Lazada Open Platform. It provides access to orders, transactions, fee breakdowns, and per-SKU profit analysis.
Features
- Summarize sales, deductions, and net received amounts
- Retrieve transaction details from the Lazada Finance API
- Break down fees using the transaction types returned by Lazada
- Retrieve order and order-item details
- Calculate profit per SKU using seller-defined costs
Available MCP tools:
get_finance_summaryget_transaction_detailsget_fee_breakdownget_orderget_order_itemsget_order_financeget_order_profitlist_orders
Requirements
- Python 3.14+
- A Lazada Open Platform app
- Lazada App Key and App Secret
- Seller Access Token
- An MCP-compatible client such as Codex
Installation
git clone https://github.com/chanoktrue/lazada-mcp.git
cd lazada-mcp
python3.14 -m venv .venv
./.venv/bin/pip install -r requirements.txt
Environment Configuration
Create a .env file. Never commit this file:
URL_THAI=https://api.lazada.co.th/rest
LAZADA_APP_KEY=your_app_key
LAZADA_APP_SECRET=your_app_secret
ACCESS_TOKEN=your_access_token
LAZADA_FINANCE_API_PATH=/finance/transaction/details/get
LAZADA_FINANCE_PAGE_SIZE=100
# Product costs in Thai baht, keyed by seller SKU
LAZADA_SKU_COSTS_JSON={"SKU-001":{"unit_cost":120,"packaging_cost":5}}
Protect the environment file and verify that it is ignored by Git:
chmod 600 .env
git status --ignored
Run as an stdio MCP Server
./.venv/bin/python lazada_mcp_server.py
Example Codex configuration:
[mcp_servers.lazada_finance]
command = "/absolute/path/lazada-mcp/.venv/bin/python"
args = ["/absolute/path/lazada-mcp/lazada_mcp_server.py"]
cwd = "/absolute/path/lazada-mcp"
Restart Codex or start a new session after changing the configuration.
Usage Examples
Retrieve transaction details:
get_transaction_details
start_date = "2026-07-01"
end_date = "2026-07-15"
View the fee breakdown for an order:
get_fee_breakdown
start_date = "2026-07-01"
end_date = "2026-07-15"
order_id = "123456789"
Analyze order profitability:
get_order_profit
order_id = "123456789"
start_date = "2026-07-01"
end_date = "2026-07-15"
Profit Calculation
Profit = sales price - discounts - Lazada fees - product cost - packaging cost
When Lazada reports a fee at order level instead of SKU level, the server allocates the fee based on each SKU's share of the order value. The response includes a warning indicating that the value is allocated rather than directly reported at SKU level.
Security
- Never commit
.env, access tokens, refresh tokens, or App Secrets - Keep using the included
.gitignore - Use the MCP in read-only mode unless write operations are explicitly required
- Set
.envpermissions to600 - Rotate the Lazada App Secret and tokens immediately if they were ever exposed
- Do not expose this stdio server directly to the public internet
License
Distributed under the MIT License. See LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。