dudutt
快团团(拼多多旗下社群团购)网店管理 MCP 服务 —— 让 AI Agent 直接发布商品、下架商品、改价改库存。
架构定位:官方 POP API 为主,浏览器自动化兜底,双后端可插拔。 当官方接口不支持某动作(如「下架」「改价」)时,自动降级到浏览器后端或给出明确的能力提示,绝不假装成功。
为什么需要它
| 现状 | 说明 |
|---|---|
| 快团团 API 藏在拼多多开放平台 | 接口散落在 open.pinduoduo.com,无统一 SDK |
| 官方无「下架 / 改价」接口 | 只能靠库存归零 / 重建团变通,或走浏览器后台 |
| 出错代价高 | 商品误下架、价格误改直接影响真实经营 |
dudutt 把上述复杂度收敛成 MCP 工具,并内置能力协商与写操作护栏。
快速开始
pip install dudutt # 仅官方 API 后端
pip install "dudutt[browser]" # 额外支持浏览器兜底
配置凭据
# 官方 API 后端(推荐,需企业资质)
export DUDUTT_CLIENT_ID="your_client_id"
export DUDUTT_CLIENT_SECRET="your_client_secret"
export DUDUTT_ACCESS_TOKEN="your_access_token"
# 或使用 mock 后端跑通流程(无需凭据)
export DUDUTT_BACKEND="mock"
挂载到 MCP 客户端
{
"mcp": {
"dudutt": {
"type": "local",
"command": ["python", "-u", "-m", "dudutt"],
"environment": {
"DUDUTT_CLIENT_ID": "{env:DUDUTT_CLIENT_ID}",
"DUDUTT_CLIENT_SECRET": "{env:DUDUTT_CLIENT_SECRET}",
"DUDUTT_ACCESS_TOKEN": "{env:DUDUTT_ACCESS_TOKEN}"
}
}
}
}
工具一览
| 工具 | 动作 | 官方 API | 浏览器兜底 |
|---|---|---|---|
capabilities |
查询当前后端支持哪些动作 | — | — |
list_groups |
团列表 | ✅ | ✅ |
list_goods / get_goods |
商品列表 / 单品 | ✅ | ✅ |
publish_goods |
发布商品(创建团购) | ✅ | ✅ |
set_stock |
改库存 | ✅ | ✅ |
delist_goods |
下架商品 | ❌ 库存归零变通 | ✅ |
update_price |
改价 | ❌ 需重建团 | ✅ |
audit_log |
查看写操作审计 | — | — |
安全设计
- 能力协商:先查
capabilities,后端不支持时明确报错,不给幻觉结果 - dry-run 预演:写操作默认返回"将要发生什么",确认后才真正执行
- 审计日志:每次写操作落盘 JSONL,可追溯
- 幂等键:同一
idempotency_key重复调用不会重复下单
文档
- docs/SETUP.md —— 企业资质申请与授权全流程
- docs/API-MAP.md —— 动作 ↔ 官方接口映射与能力边界
License
MIT
Metadata
Release files for dudutt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dudutt-0.1.0.tar.gz | 46.7 kB | Without provenance | Details for dudutt-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dudutt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dudutt-0.1.0-py3-none-any.whl |
Total release size: 90.3 kB
Release files / dudutt-0.1.0.tar.gz
| Download URL | dudutt-0.1.0.tar.gz |
|---|---|
| Size | 46.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27908d13f5588300de465d658cf4b0fd410ff90328516d459181800ebfa13493
|
|
BLAKE2b-256 checksum How to use checksums |
0a425ba2231e7bff62cd3078bb2d9a10f9f8f3b5d232c31454adcb05a474b3ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / dudutt-0.1.0-py3-none-any.whl
| Download URL | dudutt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 43.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b0523bf7b98d91ac85e815f5c6a88e829ba568391ddf6625fc6629ab465811e
|
|
BLAKE2b-256 checksum How to use checksums |
6fa2dacb2e01e6ef7b3b0fc009410021c7261068d19850fc2c893021af95a199
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for dudutt 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.