mcp-cn-commerce 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_cn_commerce-0.1.0/LICENSE +21 -0
- mcp_cn_commerce-0.1.0/PKG-INFO +332 -0
- mcp_cn_commerce-0.1.0/README.md +272 -0
- mcp_cn_commerce-0.1.0/mcp_cn_commerce.egg-info/PKG-INFO +332 -0
- mcp_cn_commerce-0.1.0/mcp_cn_commerce.egg-info/SOURCES.txt +23 -0
- mcp_cn_commerce-0.1.0/mcp_cn_commerce.egg-info/dependency_links.txt +1 -0
- mcp_cn_commerce-0.1.0/mcp_cn_commerce.egg-info/entry_points.txt +2 -0
- mcp_cn_commerce-0.1.0/mcp_cn_commerce.egg-info/requires.txt +44 -0
- mcp_cn_commerce-0.1.0/mcp_cn_commerce.egg-info/top_level.txt +1 -0
- mcp_cn_commerce-0.1.0/pyproject.toml +90 -0
- mcp_cn_commerce-0.1.0/setup.cfg +4 -0
- mcp_cn_commerce-0.1.0/shared/cli.py +545 -0
- mcp_cn_commerce-0.1.0/shared/cn_commerce_base.py +6121 -0
- mcp_cn_commerce-0.1.0/shared/dashboard.py +498 -0
- mcp_cn_commerce-0.1.0/shared/i18n.py +328 -0
- mcp_cn_commerce-0.1.0/shared/normalizer.py +381 -0
- mcp_cn_commerce-0.1.0/tests/test_api_compatibility.py +1381 -0
- mcp_cn_commerce-0.1.0/tests/test_automation.py +1233 -0
- mcp_cn_commerce-0.1.0/tests/test_benchmark.py +973 -0
- mcp_cn_commerce-0.1.0/tests/test_cli.py +385 -0
- mcp_cn_commerce-0.1.0/tests/test_cn_commerce_base.py +4046 -0
- mcp_cn_commerce-0.1.0/tests/test_dashboard.py +506 -0
- mcp_cn_commerce-0.1.0/tests/test_i18n.py +421 -0
- mcp_cn_commerce-0.1.0/tests/test_integration.py +1367 -0
- mcp_cn_commerce-0.1.0/tests/test_performance.py +591 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Wang Zhuo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: mcp-cn-commerce
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Chinese e-commerce platform MCP servers â let AI agents read merchant business data (Ocean Engine, Douyin Shop, JD.com, Taobao, Pinduoduo)
|
|
5
|
+
Author-email: Wang Zhuo <tonywang@example.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/TonyWang-hub/mcp-cn-commerce
|
|
8
|
+
Project-URL: Issues, https://github.com/TonyWang-hub/mcp-cn-commerce/issues
|
|
9
|
+
Project-URL: Documentation, https://github.com/TonyWang-hub/mcp-cn-commerce#readme
|
|
10
|
+
Project-URL: Changelog, https://github.com/TonyWang-hub/mcp-cn-commerce/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: mcp,model-context-protocol,chinese-ecommerce,ecommerce,ai-agent,agent-tool,business-data,ocean-engine,douyin-shop,jd-com,taobao,pinduoduo,mcp-server,python,claude,omni-channel,advertising-api,order-management,įĩå,MCP,AI
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Framework :: AsyncIO
|
|
22
|
+
Classifier: Environment :: Console
|
|
23
|
+
Classifier: Operating System :: OS Independent
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Provides-Extra: oceanengine
|
|
28
|
+
Requires-Dist: mcp-cn-oceanengine; extra == "oceanengine"
|
|
29
|
+
Provides-Extra: doudian
|
|
30
|
+
Requires-Dist: mcp-cn-doudian; extra == "doudian"
|
|
31
|
+
Provides-Extra: jd
|
|
32
|
+
Requires-Dist: mcp-cn-jd; extra == "jd"
|
|
33
|
+
Provides-Extra: taobao
|
|
34
|
+
Requires-Dist: mcp-cn-taobao; extra == "taobao"
|
|
35
|
+
Provides-Extra: pinduoduo
|
|
36
|
+
Requires-Dist: mcp-cn-pinduoduo; extra == "pinduoduo"
|
|
37
|
+
Provides-Extra: kuaishou
|
|
38
|
+
Requires-Dist: mcp-cn-kuaishou; extra == "kuaishou"
|
|
39
|
+
Provides-Extra: xiaohongshu
|
|
40
|
+
Requires-Dist: mcp-cn-xiaohongshu; extra == "xiaohongshu"
|
|
41
|
+
Provides-Extra: weixin-store
|
|
42
|
+
Requires-Dist: mcp-cn-weixin-store; extra == "weixin-store"
|
|
43
|
+
Provides-Extra: all
|
|
44
|
+
Requires-Dist: mcp-cn-oceanengine; extra == "all"
|
|
45
|
+
Requires-Dist: mcp-cn-doudian; extra == "all"
|
|
46
|
+
Requires-Dist: mcp-cn-jd; extra == "all"
|
|
47
|
+
Requires-Dist: mcp-cn-taobao; extra == "all"
|
|
48
|
+
Requires-Dist: mcp-cn-pinduoduo; extra == "all"
|
|
49
|
+
Requires-Dist: mcp-cn-kuaishou; extra == "all"
|
|
50
|
+
Requires-Dist: mcp-cn-xiaohongshu; extra == "all"
|
|
51
|
+
Requires-Dist: mcp-cn-weixin-store; extra == "all"
|
|
52
|
+
Provides-Extra: dev
|
|
53
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
55
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
56
|
+
Requires-Dist: black; extra == "dev"
|
|
57
|
+
Requires-Dist: ruff; extra == "dev"
|
|
58
|
+
Provides-Extra: crypto
|
|
59
|
+
Requires-Dist: pyaes>=1.6; extra == "crypto"
|
|
60
|
+
|
|
61
|
+
# mcp-cn-commerce â Chinese E-Commerce Platform MCP Servers
|
|
62
|
+
|
|
63
|
+
[](https://github.com/TonyWang-hub/mcp-cn-commerce/actions/workflows/test.yml)
|
|
64
|
+
[](https://www.python.org/)
|
|
65
|
+
[](LICENSE)
|
|
66
|
+
[](https://modelcontextprotocol.io/)
|
|
67
|
+
[](https://pypi.org/project/mcp-cn-commerce/)
|
|
68
|
+
[](https://github.com/psf/black)
|
|
69
|
+
|
|
70
|
+
> đ **Let AI agents read Chinese e-commerce merchant business data.**
|
|
71
|
+
> Not content publishing â **business operations** MCP connectors for AI agents like Claude, ChatGPT, Gemini.
|
|
72
|
+
>
|
|
73
|
+
> **Keywords**: MCP Server, Model Context Protocol, Chinese e-commerce, AI agent, e-commerce data, įĩå MCP, æåē, äēŦä¸, 厍éåŧæ, Ocean Engine, Douyin Shop, JD.com, Taobao, Pinduoduo, Python MCP, AI business intelligence, agent tool
|
|
74
|
+
|
|
75
|
+
**English** | [įŽäŊ䏿](README_zh.md)
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Table of Contents
|
|
80
|
+
|
|
81
|
+
- [What is mcp-cn-commerce?](#what-is-mcp-cn-commerce)
|
|
82
|
+
- [Why This Project](#why-this-project)
|
|
83
|
+
- [Supported Platforms](#platforms)
|
|
84
|
+
- [Quick Start](#quick-start)
|
|
85
|
+
- [Docker](#docker-recommended--no-local-python-setup)
|
|
86
|
+
- [Architecture](#architecture)
|
|
87
|
+
- [Tools Reference](#tools-per-server)
|
|
88
|
+
- [Security](#security)
|
|
89
|
+
- [Docker](docs/docker.md) - Docker é¨įŊ˛ä¸é
įŊŽ
|
|
90
|
+
- [Examples](docs/examples.md) - äŊŋį¨į¤ēäžåå翝
|
|
91
|
+
- [FAQ](README_zh.md#常č§éŽéĸ)
|
|
92
|
+
- [Contributing](CONTRIBUTING.md)
|
|
93
|
+
- [Roadmap](#roadmap)
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## What is mcp-cn-commerce?
|
|
98
|
+
|
|
99
|
+
A **monorepo of independent MCP (Model Context Protocol) servers** that give AI agents structured, type-safe access to Chinese e-commerce platform business data. Each server wraps one platform's open API:
|
|
100
|
+
|
|
101
|
+
- **厍éåŧæ (Ocean Engine)** â advertising campaign, report, and account data
|
|
102
|
+
- **æåē (Douyin Shop)** â orders, products, refunds, shop management
|
|
103
|
+
- **äēŦä¸ (JD.com)** â orders, products, shop information
|
|
104
|
+
- More coming: **æˇåŽ**, **æŧå¤å¤**, **åŋĢæ**, **å°įēĸäšĻ**, **垎äŋĄå°åē**
|
|
105
|
+
|
|
106
|
+
All tools are **read-only** by default â AI agents can analyze your business data but cannot modify anything.
|
|
107
|
+
|
|
108
|
+
## Why This Project
|
|
109
|
+
|
|
110
|
+
Existing Chinese-platform MCP servers all focus on **content publishing** (posting videos, searching trends). Zero cover **merchant business operations** â pulling ad reports, checking orders, managing refunds.
|
|
111
|
+
|
|
112
|
+
| | Content MCPs (HuiMei, Astron, etc.) | mcp-cn-commerce |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| **Purpose** | Post videos, search hot topics | Pull ad reports, query orders |
|
|
115
|
+
| **Target User** | Creators / influencers | E-commerce business owners / operators |
|
|
116
|
+
| **Data Type** | Content data (views, likes, trends) | **Business data** (revenue, orders, refunds, ROAS) |
|
|
117
|
+
| **Platform Scope** | Content platforms | E-commerce + advertising platforms |
|
|
118
|
+
| **Operations** | Publish / write | Read-only analytics & monitoring |
|
|
119
|
+
|
|
120
|
+
This is the **first open-source MCP server suite for Chinese e-commerce business operations**.
|
|
121
|
+
|
|
122
|
+
## Platforms
|
|
123
|
+
|
|
124
|
+
| Platform | Category | Phase | Status | Tests | Open API |
|
|
125
|
+
|---|---|---|---|---|---|
|
|
126
|
+
| 厍éåŧæ (Ocean Engine) | Advertising (åšŋåææž) | 1 | â
| 24 | [open.oceanengine.com](https://open.oceanengine.com) |
|
|
127
|
+
| 厍éååˇ (Qianchuan) | E-commerce Ads (įĩååšŋå) | 1 | â
| (shared) | [qianchuan.jinritemai.com](https://qianchuan.jinritemai.com) |
|
|
128
|
+
| æåē (Douyin Shop) | E-commerce (įĩååēéē) | 1 | â
| 31 | [op.jinritemai.com](https://op.jinritemai.com) |
|
|
129
|
+
| äēŦä¸ (JD.com) | E-commerce (įĩååēéē) | 1 | â
| 19 | [jos.jd.com](https://jos.jd.com) |
|
|
130
|
+
| æˇåŽ (Taobao) | E-commerce (įĩååēéē) | 2 | â
| 36 | [open.taobao.com](https://open.taobao.com) |
|
|
131
|
+
| æŧå¤å¤ (Pinduoduo) | E-commerce (įĩååēéē) | 2 | â
| 30 | [open.pinduoduo.com](https://open.pinduoduo.com) |
|
|
132
|
+
| åŋĢæ (Kuaishou) | E-commerce (įĩååēéē) | 3 | â
| 33 | [open.kuaixiaodian.com](https://open.kuaixiaodian.com) |
|
|
133
|
+
| å°įēĸäšĻ (Xiaohongshu) | E-commerce (įĩååēéē) | 3 | â
| 33 | [open.xiaohongshu.com](https://open.xiaohongshu.com) |
|
|
134
|
+
| 垎äŋĄå°åē (WeChat Store) | E-commerce (įĩååēéē) | 3 | â
| 25 | [developers.weixin.qq.com](https://developers.weixin.qq.com) |
|
|
135
|
+
|
|
136
|
+
> **Phase 4** (exploratory): é˛éąŧ (Xianyu), įžåĸ (Meituan), éĨŋäēäš (Ele.me) â restricted APIs, awaiting policy clarity.
|
|
137
|
+
>
|
|
138
|
+
> **358 tests** across all 8 servers. CI runs on Python 3.11, 3.12, 3.13.
|
|
139
|
+
|
|
140
|
+
## Quick Start
|
|
141
|
+
|
|
142
|
+
### Docker (recommended â no local Python setup)
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Build the image
|
|
146
|
+
docker build -t mcp-cn-commerce .
|
|
147
|
+
|
|
148
|
+
# Run tests
|
|
149
|
+
docker run --rm mcp-cn-commerce make test
|
|
150
|
+
|
|
151
|
+
# Run a platform server (Ocean Engine example)
|
|
152
|
+
docker run --rm -i --env-file .env mcp-cn-commerce mcp-cn-oceanengine
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
See [Docker documentation](docs/docker.md) for full usage, MCP client configuration, and Docker Compose shortcuts.
|
|
156
|
+
|
|
157
|
+
### Installation
|
|
158
|
+
|
|
159
|
+
#### From GitHub Releases (recommended â no registration needed)
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Visit the latest Release and download the .whl file
|
|
163
|
+
# https://github.com/TonyWang-hub/mcp-cn-commerce/releases/latest
|
|
164
|
+
|
|
165
|
+
# Or install directly from the Release URL:
|
|
166
|
+
pip install https://github.com/TonyWang-hub/mcp-cn-commerce/releases/latest/download/mcp_cn_commerce-0.1.0-py3-none-any.whl
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
#### From Git (always latest)
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
pip install git+https://github.com/TonyWang-hub/mcp-cn-commerce.git
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### For development
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
git clone https://github.com/TonyWang-hub/mcp-cn-commerce.git
|
|
179
|
+
cd mcp-cn-commerce
|
|
180
|
+
pip install -e ".[dev]"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Configuration
|
|
184
|
+
|
|
185
|
+
Set credentials via environment variables:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# 厍éåŧæ (Ocean Engine) â Advertising platform
|
|
189
|
+
export OCEANENGINE_APP_KEY="your_app_key"
|
|
190
|
+
export OCEANENGINE_APP_SECRET="your_app_secret"
|
|
191
|
+
export OCEANENGINE_ACCESS_TOKEN="your_access_token"
|
|
192
|
+
|
|
193
|
+
# æåē (Douyin Shop) â TikTok Shop China
|
|
194
|
+
export DOUDIAN_APP_KEY="your_app_key"
|
|
195
|
+
export DOUDIAN_APP_SECRET="your_app_secret"
|
|
196
|
+
export DOUDIAN_SHOP_ID="your_shop_id"
|
|
197
|
+
export DOUDIAN_ACCESS_TOKEN="your_access_token"
|
|
198
|
+
|
|
199
|
+
# äēŦä¸ (JD.com) â Jingdong e-commerce
|
|
200
|
+
export JD_APP_KEY="your_app_key"
|
|
201
|
+
export JD_APP_SECRET="your_app_secret"
|
|
202
|
+
export JD_ACCESS_TOKEN="your_access_token"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Add to Your MCP Client
|
|
206
|
+
|
|
207
|
+
Works with **Claude Desktop**, **Cherry Studio**, **Kimi Work**, and any MCP-compatible AI client:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"mcpServers": {
|
|
212
|
+
"oceanengine": {
|
|
213
|
+
"command": "mcp-cn-oceanengine"
|
|
214
|
+
},
|
|
215
|
+
"doudian": {
|
|
216
|
+
"command": "mcp-cn-doudian"
|
|
217
|
+
},
|
|
218
|
+
"jd": {
|
|
219
|
+
"command": "mcp-cn-jd"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Example: AI Agent Querying Your Business
|
|
226
|
+
|
|
227
|
+
Once connected, you can ask your AI agent questions like:
|
|
228
|
+
|
|
229
|
+
> "Show me this week's Ocean Engine campaign ROAS, sorted by spend"
|
|
230
|
+
> "Which Douyin Shop products are low on stock?"
|
|
231
|
+
> "How many JD refunds are pending approval?"
|
|
232
|
+
> "Compare my ad performance across Ocean Engine campaigns this month vs last month"
|
|
233
|
+
|
|
234
|
+
## Architecture
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
mcp-cn-commerce/
|
|
238
|
+
âââ .github/workflows/test.yml # CI: pytest on push (3.11/3.12/3.13)
|
|
239
|
+
âââ shared/ # Shared auth/signing/pagination
|
|
240
|
+
â âââ cn_commerce_base.py # CommerceMCPBase â extend for new platforms
|
|
241
|
+
âââ servers/
|
|
242
|
+
â âââ oceanengine/ 17 tools âââ doudian/ 20 tools
|
|
243
|
+
â âââ jd/ 14 tools âââ taobao/ 13 tools
|
|
244
|
+
â âââ pinduoduo/ 13 tools âââ kuaishou/ 12 tools
|
|
245
|
+
â âââ xiaohongshu/ 12 tools âââ weixin-store/ 11 tools
|
|
246
|
+
âââ docs/platforms.md # 8-platform API comparison & auth matrix
|
|
247
|
+
âââ docs/docker.md # Docker deployment guide
|
|
248
|
+
âââ Dockerfile # Multi-platform MCP server image
|
|
249
|
+
âââ docker-compose.yml # Local development shortcuts
|
|
250
|
+
âââ README.md / README_zh.md # English / įŽäŊ䏿
|
|
251
|
+
âââ LICENSE # MIT
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Each `servers/<platform>/` is an **independent MCP server**. Users install only what they need.
|
|
255
|
+
|
|
256
|
+
## Tools Summary
|
|
257
|
+
|
|
258
|
+
| Server | Tools | Categories |
|
|
259
|
+
|---|---|---|
|
|
260
|
+
| oceanengine | 17 | Ads, Qianchuan, Star, Creative, Audience, Optimization |
|
|
261
|
+
| doudian | 20 | Orders, Products, Refunds, Logistics, Reviews, Live, Traffic, Marketing, Billing, Shop |
|
|
262
|
+
| jd | 14 | Orders, Products, After-Sale, Logistics, Reviews, Pricing, Inventory, Marketing, Shop |
|
|
263
|
+
| taobao | 13 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing, Categories |
|
|
264
|
+
| pinduoduo | 13 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing, Affiliate |
|
|
265
|
+
| kuaishou | 12 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing |
|
|
266
|
+
| xiaohongshu | 12 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing, Inventory, Finance |
|
|
267
|
+
| weixin-store | 11 | Orders, Products, Refunds, Logistics, Shop, Marketing, Supply Chain, Categories |
|
|
268
|
+
| **Total** | **112** | All read-only by default |
|
|
269
|
+
|
|
270
|
+
For full tool details, see the source code in each `servers/<platform>/src/` directory.
|
|
271
|
+
| `get_product_list` | Product catalog with pricing and stock | `/product/list` |
|
|
272
|
+
| `get_shop_info` | Merchant shop information | `/shop/info` |
|
|
273
|
+
|
|
274
|
+
## Security
|
|
275
|
+
|
|
276
|
+
This project handles sensitive e-commerce API credentials. Our security guarantees:
|
|
277
|
+
|
|
278
|
+
- đ **Runs locally** â API keys and secrets never leave your machine
|
|
279
|
+
- đ **Open source** â every line of code is auditable
|
|
280
|
+
- đī¸ **Read-only by default** â all 112 tools only read data; zero write/modify/delete operations
|
|
281
|
+
- đĄ **No telemetry** â no usage data is collected, tracked, or transmitted
|
|
282
|
+
- đĨī¸ **Direct API calls** â connects directly to platform APIs; no intermediate server or proxy
|
|
283
|
+
- đ **Env-var config** â credentials are loaded from environment variables, never hardcoded
|
|
284
|
+
|
|
285
|
+
## Roadmap
|
|
286
|
+
|
|
287
|
+
### Phase 1 â Foundation â
|
|
288
|
+
- 厍éåŧæ: Ad campaign & report read APIs
|
|
289
|
+
- 厍éååˇ: E-commerce advertising (shared Ocean Engine auth)
|
|
290
|
+
- æåē: Order, product, after-sale read APIs
|
|
291
|
+
- äēŦä¸: Order, product, shop read APIs
|
|
292
|
+
|
|
293
|
+
### Phase 2 â Mid-Tier Expansion â
|
|
294
|
+
- æˇåŽ (Taobao): Full Top API integration â orders, products, logistics
|
|
295
|
+
- æŧå¤å¤ (Pinduoduo): Orders, products, promotion tools
|
|
296
|
+
|
|
297
|
+
### Phase 3 â Long-Tail Coverage â
|
|
298
|
+
- åŋĢæ (Kuaishou): Orders, products, logistics
|
|
299
|
+
- å°įēĸäšĻ (Xiaohongshu): Orders, products, inventory
|
|
300
|
+
- 垎äŋĄå°åē (WeChat Store): Orders, products, after-sale
|
|
301
|
+
|
|
302
|
+
### Phase 4 â Exploratory âŦ
|
|
303
|
+
- é˛éąŧ, įžåĸ, éĨŋäēäš (API access pending policy)
|
|
304
|
+
|
|
305
|
+
## Related Resources
|
|
306
|
+
|
|
307
|
+
- [Model Context Protocol (MCP) Documentation](https://modelcontextprotocol.io/)
|
|
308
|
+
- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)
|
|
309
|
+
- [Claude Desktop â MCP Support](https://claude.ai/download)
|
|
310
|
+
- [Cherry Studio â Multi-Model MCP Client](https://cherry-ai.com/)
|
|
311
|
+
- [Platform API Comparison](docs/platforms.md)
|
|
312
|
+
|
|
313
|
+
## Citation
|
|
314
|
+
|
|
315
|
+
If you use mcp-cn-commerce in your research or project:
|
|
316
|
+
|
|
317
|
+
```bibtex
|
|
318
|
+
@software{mcp-cn-commerce,
|
|
319
|
+
author = {Wang, Zhuo},
|
|
320
|
+
title = {mcp-cn-commerce: MCP Servers for Chinese E-Commerce Platforms},
|
|
321
|
+
year = {2026},
|
|
322
|
+
url = {https://github.com/TonyWang-hub/mcp-cn-commerce}
|
|
323
|
+
}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## Star History
|
|
327
|
+
|
|
328
|
+
[](https://star-history.com/#TonyWang-hub/mcp-cn-commerce&Date)
|
|
329
|
+
|
|
330
|
+
## License
|
|
331
|
+
|
|
332
|
+
MIT â see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# mcp-cn-commerce â Chinese E-Commerce Platform MCP Servers
|
|
2
|
+
|
|
3
|
+
[](https://github.com/TonyWang-hub/mcp-cn-commerce/actions/workflows/test.yml)
|
|
4
|
+
[](https://www.python.org/)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://modelcontextprotocol.io/)
|
|
7
|
+
[](https://pypi.org/project/mcp-cn-commerce/)
|
|
8
|
+
[](https://github.com/psf/black)
|
|
9
|
+
|
|
10
|
+
> đ **Let AI agents read Chinese e-commerce merchant business data.**
|
|
11
|
+
> Not content publishing â **business operations** MCP connectors for AI agents like Claude, ChatGPT, Gemini.
|
|
12
|
+
>
|
|
13
|
+
> **Keywords**: MCP Server, Model Context Protocol, Chinese e-commerce, AI agent, e-commerce data, įĩå MCP, æåē, äēŦä¸, 厍éåŧæ, Ocean Engine, Douyin Shop, JD.com, Taobao, Pinduoduo, Python MCP, AI business intelligence, agent tool
|
|
14
|
+
|
|
15
|
+
**English** | [įŽäŊ䏿](README_zh.md)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Table of Contents
|
|
20
|
+
|
|
21
|
+
- [What is mcp-cn-commerce?](#what-is-mcp-cn-commerce)
|
|
22
|
+
- [Why This Project](#why-this-project)
|
|
23
|
+
- [Supported Platforms](#platforms)
|
|
24
|
+
- [Quick Start](#quick-start)
|
|
25
|
+
- [Docker](#docker-recommended--no-local-python-setup)
|
|
26
|
+
- [Architecture](#architecture)
|
|
27
|
+
- [Tools Reference](#tools-per-server)
|
|
28
|
+
- [Security](#security)
|
|
29
|
+
- [Docker](docs/docker.md) - Docker é¨įŊ˛ä¸é
įŊŽ
|
|
30
|
+
- [Examples](docs/examples.md) - äŊŋį¨į¤ēäžåå翝
|
|
31
|
+
- [FAQ](README_zh.md#常č§éŽéĸ)
|
|
32
|
+
- [Contributing](CONTRIBUTING.md)
|
|
33
|
+
- [Roadmap](#roadmap)
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## What is mcp-cn-commerce?
|
|
38
|
+
|
|
39
|
+
A **monorepo of independent MCP (Model Context Protocol) servers** that give AI agents structured, type-safe access to Chinese e-commerce platform business data. Each server wraps one platform's open API:
|
|
40
|
+
|
|
41
|
+
- **厍éåŧæ (Ocean Engine)** â advertising campaign, report, and account data
|
|
42
|
+
- **æåē (Douyin Shop)** â orders, products, refunds, shop management
|
|
43
|
+
- **äēŦä¸ (JD.com)** â orders, products, shop information
|
|
44
|
+
- More coming: **æˇåŽ**, **æŧå¤å¤**, **åŋĢæ**, **å°įēĸäšĻ**, **垎äŋĄå°åē**
|
|
45
|
+
|
|
46
|
+
All tools are **read-only** by default â AI agents can analyze your business data but cannot modify anything.
|
|
47
|
+
|
|
48
|
+
## Why This Project
|
|
49
|
+
|
|
50
|
+
Existing Chinese-platform MCP servers all focus on **content publishing** (posting videos, searching trends). Zero cover **merchant business operations** â pulling ad reports, checking orders, managing refunds.
|
|
51
|
+
|
|
52
|
+
| | Content MCPs (HuiMei, Astron, etc.) | mcp-cn-commerce |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| **Purpose** | Post videos, search hot topics | Pull ad reports, query orders |
|
|
55
|
+
| **Target User** | Creators / influencers | E-commerce business owners / operators |
|
|
56
|
+
| **Data Type** | Content data (views, likes, trends) | **Business data** (revenue, orders, refunds, ROAS) |
|
|
57
|
+
| **Platform Scope** | Content platforms | E-commerce + advertising platforms |
|
|
58
|
+
| **Operations** | Publish / write | Read-only analytics & monitoring |
|
|
59
|
+
|
|
60
|
+
This is the **first open-source MCP server suite for Chinese e-commerce business operations**.
|
|
61
|
+
|
|
62
|
+
## Platforms
|
|
63
|
+
|
|
64
|
+
| Platform | Category | Phase | Status | Tests | Open API |
|
|
65
|
+
|---|---|---|---|---|---|
|
|
66
|
+
| 厍éåŧæ (Ocean Engine) | Advertising (åšŋåææž) | 1 | â
| 24 | [open.oceanengine.com](https://open.oceanengine.com) |
|
|
67
|
+
| 厍éååˇ (Qianchuan) | E-commerce Ads (įĩååšŋå) | 1 | â
| (shared) | [qianchuan.jinritemai.com](https://qianchuan.jinritemai.com) |
|
|
68
|
+
| æåē (Douyin Shop) | E-commerce (įĩååēéē) | 1 | â
| 31 | [op.jinritemai.com](https://op.jinritemai.com) |
|
|
69
|
+
| äēŦä¸ (JD.com) | E-commerce (įĩååēéē) | 1 | â
| 19 | [jos.jd.com](https://jos.jd.com) |
|
|
70
|
+
| æˇåŽ (Taobao) | E-commerce (įĩååēéē) | 2 | â
| 36 | [open.taobao.com](https://open.taobao.com) |
|
|
71
|
+
| æŧå¤å¤ (Pinduoduo) | E-commerce (įĩååēéē) | 2 | â
| 30 | [open.pinduoduo.com](https://open.pinduoduo.com) |
|
|
72
|
+
| åŋĢæ (Kuaishou) | E-commerce (įĩååēéē) | 3 | â
| 33 | [open.kuaixiaodian.com](https://open.kuaixiaodian.com) |
|
|
73
|
+
| å°įēĸäšĻ (Xiaohongshu) | E-commerce (įĩååēéē) | 3 | â
| 33 | [open.xiaohongshu.com](https://open.xiaohongshu.com) |
|
|
74
|
+
| 垎äŋĄå°åē (WeChat Store) | E-commerce (įĩååēéē) | 3 | â
| 25 | [developers.weixin.qq.com](https://developers.weixin.qq.com) |
|
|
75
|
+
|
|
76
|
+
> **Phase 4** (exploratory): é˛éąŧ (Xianyu), įžåĸ (Meituan), éĨŋäēäš (Ele.me) â restricted APIs, awaiting policy clarity.
|
|
77
|
+
>
|
|
78
|
+
> **358 tests** across all 8 servers. CI runs on Python 3.11, 3.12, 3.13.
|
|
79
|
+
|
|
80
|
+
## Quick Start
|
|
81
|
+
|
|
82
|
+
### Docker (recommended â no local Python setup)
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Build the image
|
|
86
|
+
docker build -t mcp-cn-commerce .
|
|
87
|
+
|
|
88
|
+
# Run tests
|
|
89
|
+
docker run --rm mcp-cn-commerce make test
|
|
90
|
+
|
|
91
|
+
# Run a platform server (Ocean Engine example)
|
|
92
|
+
docker run --rm -i --env-file .env mcp-cn-commerce mcp-cn-oceanengine
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
See [Docker documentation](docs/docker.md) for full usage, MCP client configuration, and Docker Compose shortcuts.
|
|
96
|
+
|
|
97
|
+
### Installation
|
|
98
|
+
|
|
99
|
+
#### From GitHub Releases (recommended â no registration needed)
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Visit the latest Release and download the .whl file
|
|
103
|
+
# https://github.com/TonyWang-hub/mcp-cn-commerce/releases/latest
|
|
104
|
+
|
|
105
|
+
# Or install directly from the Release URL:
|
|
106
|
+
pip install https://github.com/TonyWang-hub/mcp-cn-commerce/releases/latest/download/mcp_cn_commerce-0.1.0-py3-none-any.whl
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### From Git (always latest)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pip install git+https://github.com/TonyWang-hub/mcp-cn-commerce.git
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### For development
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git clone https://github.com/TonyWang-hub/mcp-cn-commerce.git
|
|
119
|
+
cd mcp-cn-commerce
|
|
120
|
+
pip install -e ".[dev]"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Configuration
|
|
124
|
+
|
|
125
|
+
Set credentials via environment variables:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# 厍éåŧæ (Ocean Engine) â Advertising platform
|
|
129
|
+
export OCEANENGINE_APP_KEY="your_app_key"
|
|
130
|
+
export OCEANENGINE_APP_SECRET="your_app_secret"
|
|
131
|
+
export OCEANENGINE_ACCESS_TOKEN="your_access_token"
|
|
132
|
+
|
|
133
|
+
# æåē (Douyin Shop) â TikTok Shop China
|
|
134
|
+
export DOUDIAN_APP_KEY="your_app_key"
|
|
135
|
+
export DOUDIAN_APP_SECRET="your_app_secret"
|
|
136
|
+
export DOUDIAN_SHOP_ID="your_shop_id"
|
|
137
|
+
export DOUDIAN_ACCESS_TOKEN="your_access_token"
|
|
138
|
+
|
|
139
|
+
# äēŦä¸ (JD.com) â Jingdong e-commerce
|
|
140
|
+
export JD_APP_KEY="your_app_key"
|
|
141
|
+
export JD_APP_SECRET="your_app_secret"
|
|
142
|
+
export JD_ACCESS_TOKEN="your_access_token"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Add to Your MCP Client
|
|
146
|
+
|
|
147
|
+
Works with **Claude Desktop**, **Cherry Studio**, **Kimi Work**, and any MCP-compatible AI client:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"mcpServers": {
|
|
152
|
+
"oceanengine": {
|
|
153
|
+
"command": "mcp-cn-oceanengine"
|
|
154
|
+
},
|
|
155
|
+
"doudian": {
|
|
156
|
+
"command": "mcp-cn-doudian"
|
|
157
|
+
},
|
|
158
|
+
"jd": {
|
|
159
|
+
"command": "mcp-cn-jd"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Example: AI Agent Querying Your Business
|
|
166
|
+
|
|
167
|
+
Once connected, you can ask your AI agent questions like:
|
|
168
|
+
|
|
169
|
+
> "Show me this week's Ocean Engine campaign ROAS, sorted by spend"
|
|
170
|
+
> "Which Douyin Shop products are low on stock?"
|
|
171
|
+
> "How many JD refunds are pending approval?"
|
|
172
|
+
> "Compare my ad performance across Ocean Engine campaigns this month vs last month"
|
|
173
|
+
|
|
174
|
+
## Architecture
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
mcp-cn-commerce/
|
|
178
|
+
âââ .github/workflows/test.yml # CI: pytest on push (3.11/3.12/3.13)
|
|
179
|
+
âââ shared/ # Shared auth/signing/pagination
|
|
180
|
+
â âââ cn_commerce_base.py # CommerceMCPBase â extend for new platforms
|
|
181
|
+
âââ servers/
|
|
182
|
+
â âââ oceanengine/ 17 tools âââ doudian/ 20 tools
|
|
183
|
+
â âââ jd/ 14 tools âââ taobao/ 13 tools
|
|
184
|
+
â âââ pinduoduo/ 13 tools âââ kuaishou/ 12 tools
|
|
185
|
+
â âââ xiaohongshu/ 12 tools âââ weixin-store/ 11 tools
|
|
186
|
+
âââ docs/platforms.md # 8-platform API comparison & auth matrix
|
|
187
|
+
âââ docs/docker.md # Docker deployment guide
|
|
188
|
+
âââ Dockerfile # Multi-platform MCP server image
|
|
189
|
+
âââ docker-compose.yml # Local development shortcuts
|
|
190
|
+
âââ README.md / README_zh.md # English / įŽäŊ䏿
|
|
191
|
+
âââ LICENSE # MIT
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Each `servers/<platform>/` is an **independent MCP server**. Users install only what they need.
|
|
195
|
+
|
|
196
|
+
## Tools Summary
|
|
197
|
+
|
|
198
|
+
| Server | Tools | Categories |
|
|
199
|
+
|---|---|---|
|
|
200
|
+
| oceanengine | 17 | Ads, Qianchuan, Star, Creative, Audience, Optimization |
|
|
201
|
+
| doudian | 20 | Orders, Products, Refunds, Logistics, Reviews, Live, Traffic, Marketing, Billing, Shop |
|
|
202
|
+
| jd | 14 | Orders, Products, After-Sale, Logistics, Reviews, Pricing, Inventory, Marketing, Shop |
|
|
203
|
+
| taobao | 13 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing, Categories |
|
|
204
|
+
| pinduoduo | 13 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing, Affiliate |
|
|
205
|
+
| kuaishou | 12 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing |
|
|
206
|
+
| xiaohongshu | 12 | Orders, Products, Refunds, Logistics, Reviews, Shop, Marketing, Inventory, Finance |
|
|
207
|
+
| weixin-store | 11 | Orders, Products, Refunds, Logistics, Shop, Marketing, Supply Chain, Categories |
|
|
208
|
+
| **Total** | **112** | All read-only by default |
|
|
209
|
+
|
|
210
|
+
For full tool details, see the source code in each `servers/<platform>/src/` directory.
|
|
211
|
+
| `get_product_list` | Product catalog with pricing and stock | `/product/list` |
|
|
212
|
+
| `get_shop_info` | Merchant shop information | `/shop/info` |
|
|
213
|
+
|
|
214
|
+
## Security
|
|
215
|
+
|
|
216
|
+
This project handles sensitive e-commerce API credentials. Our security guarantees:
|
|
217
|
+
|
|
218
|
+
- đ **Runs locally** â API keys and secrets never leave your machine
|
|
219
|
+
- đ **Open source** â every line of code is auditable
|
|
220
|
+
- đī¸ **Read-only by default** â all 112 tools only read data; zero write/modify/delete operations
|
|
221
|
+
- đĄ **No telemetry** â no usage data is collected, tracked, or transmitted
|
|
222
|
+
- đĨī¸ **Direct API calls** â connects directly to platform APIs; no intermediate server or proxy
|
|
223
|
+
- đ **Env-var config** â credentials are loaded from environment variables, never hardcoded
|
|
224
|
+
|
|
225
|
+
## Roadmap
|
|
226
|
+
|
|
227
|
+
### Phase 1 â Foundation â
|
|
228
|
+
- 厍éåŧæ: Ad campaign & report read APIs
|
|
229
|
+
- 厍éååˇ: E-commerce advertising (shared Ocean Engine auth)
|
|
230
|
+
- æåē: Order, product, after-sale read APIs
|
|
231
|
+
- äēŦä¸: Order, product, shop read APIs
|
|
232
|
+
|
|
233
|
+
### Phase 2 â Mid-Tier Expansion â
|
|
234
|
+
- æˇåŽ (Taobao): Full Top API integration â orders, products, logistics
|
|
235
|
+
- æŧå¤å¤ (Pinduoduo): Orders, products, promotion tools
|
|
236
|
+
|
|
237
|
+
### Phase 3 â Long-Tail Coverage â
|
|
238
|
+
- åŋĢæ (Kuaishou): Orders, products, logistics
|
|
239
|
+
- å°įēĸäšĻ (Xiaohongshu): Orders, products, inventory
|
|
240
|
+
- 垎äŋĄå°åē (WeChat Store): Orders, products, after-sale
|
|
241
|
+
|
|
242
|
+
### Phase 4 â Exploratory âŦ
|
|
243
|
+
- é˛éąŧ, įžåĸ, éĨŋäēäš (API access pending policy)
|
|
244
|
+
|
|
245
|
+
## Related Resources
|
|
246
|
+
|
|
247
|
+
- [Model Context Protocol (MCP) Documentation](https://modelcontextprotocol.io/)
|
|
248
|
+
- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)
|
|
249
|
+
- [Claude Desktop â MCP Support](https://claude.ai/download)
|
|
250
|
+
- [Cherry Studio â Multi-Model MCP Client](https://cherry-ai.com/)
|
|
251
|
+
- [Platform API Comparison](docs/platforms.md)
|
|
252
|
+
|
|
253
|
+
## Citation
|
|
254
|
+
|
|
255
|
+
If you use mcp-cn-commerce in your research or project:
|
|
256
|
+
|
|
257
|
+
```bibtex
|
|
258
|
+
@software{mcp-cn-commerce,
|
|
259
|
+
author = {Wang, Zhuo},
|
|
260
|
+
title = {mcp-cn-commerce: MCP Servers for Chinese E-Commerce Platforms},
|
|
261
|
+
year = {2026},
|
|
262
|
+
url = {https://github.com/TonyWang-hub/mcp-cn-commerce}
|
|
263
|
+
}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Star History
|
|
267
|
+
|
|
268
|
+
[](https://star-history.com/#TonyWang-hub/mcp-cn-commerce&Date)
|
|
269
|
+
|
|
270
|
+
## License
|
|
271
|
+
|
|
272
|
+
MIT â see [LICENSE](LICENSE).
|