Skip to main content
Glama
cotti-admin-mcp

cotti-admin-mcp

by zchangechen

Admin MCP v2

Cotti Admin 后台 MCP:读 + 私域新品配置写操作(Playwright UI)。

工具

读 / 查

工具

说明

admin_login

强制刷新 SSO

admin_status

Session 状态

coupon_template_list / coupon_template_get

券模板(country)

activity_list / activity_get

活动

activity_get_full

活动 + 解析 landing(h5Url/longLink)

private_domain_find_reference

找最近一条【私域】新品折扣 + 参考券

写(Phase 2,Playwright UI Save)

工具

说明

coupon_copy_save

复制参考券 → 只改名称/文案/SPU → Save

activity_copy_save

复制参考活动 → 改名称/时间/挂券 → saveGeneralActivity

activity_edit_save

修改已有活动(时间/落地页)

activity_set_online

上架 / 下架

Related MCP server: grocery-mcp

国家参数

country: ID | MY | VN | HK | MO | SG | AU(新品日历)

安装

cd mcp/admin
npm install
npx playwright install chromium

Credentials via env: ADMIN_USERNAME, ADMIN_PASSWORD (or DAVINCI_*).

Cursor 配置

{
  "mcpServers": {
    "admin": {
      "command": "node",
      "args": ["/path/to/mcp/admin/src/index.js"],
      "env": {
        "ADMIN_USERNAME": "...",
        "ADMIN_PASSWORD": "..."
      }
    }
  }
}

Skill

配套 Skill:~/.codex/skills/cotti-private-domain-rollout/

Ops 脚本

scripts/ops/ — MCP 写工具底层,也可 CLI:

COUNTRY=ID ACTIVITY_DATE=20260714 SOURCE_TEMPLATE_NO=CT20260612000001 SOURCE_ID=1203 \
PRODUCTS_JSON='[{"spuCode":"SP4680","spuName":"Blueberry & Mulberry Americano"}]' \
node scripts/ops/coupon-copy-save.js

机制

Session: ~/.admin-mcp/session.json(Playwright SSO,约 2h)

券/活动保存必须走 UI Save,裸 API 会丢字段或校验失败。

Available Tools

12 tools
activity_copy_saveC

UI copy reference activity → patch name/time/coupon → saveGeneralActivity. Requires Playwright.

Inputs: country (required), sourceId (required), activityDate (required), couponTemplateNo (required), +3 more.

activity_edit_saveB

Edit existing activity (修改): time, landing page, title. Not copy.

Inputs: country (required), activityId (required), activityNo (required), activityDate, +2 more.

activity_getC

Get activity detail by id or activityNo

Inputs: id, country, activityNo.

activity_get_fullB

Get activity with parsed landing page (h5Url, longLink, title, bg image)

Inputs: id, country, activityNo.

activity_listC

List marketing activities (supports country param)

Inputs: country, pageNum, pageSize, activityNo, +1 more.

activity_set_onlineA

Publish or unpublish activity (online=1 List / online=0 Off shelves)

Inputs: country (required), activityId (required), online.

admin_loginB

Force refresh Cotti Admin SSO session (APAC global admin)

Inputs: no named parameters.

admin_statusB

Check cached Admin session validity

Inputs: no named parameters.

coupon_copy_saveD

UI copy reference coupon → patch name/desc/SPU only → Save. Requires Playwright.

Inputs: country (required), products (required), sourceId (required), activityDate (required), +2 more.

coupon_template_getA

Get coupon template detail by templateNo, couponNo or id

Inputs: id, country, couponNo, templateNo.

coupon_template_listC

List coupon templates (supports country header via country param)

Inputs: country, pageNum, pageSize, couponName, +2 more.

private_domain_find_referenceC

Find latest 【私域】新品折扣 activity + 【私域】新品券 coupon for a country (excludes 作废). Use before copy.

Inputs: country (required), channel.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 12 tools

    Disambiguation4/5

    Tools are mostly distinct; activity_copy_save and activity_edit_save both modify activities but one creates a copy while the other edits existing, and descriptions clarify the difference. activity_get vs activity_get_full also clearly separated by detail level.

    Naming Consistency4/5

    Most tools follow resource_verb pattern (e.g., activity_list, coupon_template_get), but admin_login and admin_status use verb_noun or less consistent structure. Overall pattern is recognizable.

    Tool Count5/5

    12 tools cover the main operations for activity and coupon management plus admin session handling. This is a well-scoped number for the domain.

    Completeness4/5

    Core workflows (create/edit/list/get/online toggle for activities, create/get/list for coupons, session management) are covered. Minor gaps like missing delete operations or direct create without copy, but these can be worked around.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers