mcp-wb
mcp-wb
远程 MCP 服务器,将 Claude 连接到 Wildberries 上与买家的沟通:评价、问题和聊天。部署为组织自定义连接器——每位员工在自己的 Claude 中连接它,而 Wildberries 令牌只保留在服务器上。
功能
读取
工具 | 作用 |
| 概览:有多少评价和问题等待回复,是否有未查看的,有多少聊天 |
| 评价 |
| 问题 |
| 聊天及带游标的消息流 |
| 连接器以谁的身份运行以及被授予了什么权限 |
回复客户——仅通过草稿
工具 | 作用 |
| 准备对评价的回复 |
| 准备对已发布回复的修改(WB 在 60 天内只给一次机会) |
| 准备对问题的回答 |
| 准备聊天消息 |
| 查看和取消草稿 |
| 唯一会向买家发送内容的工具。 需要 |
| 拒绝问题并取消“未查看”标记 |
每次发送都会写入 audit 日志,包含员工邮箱、文本和结果。
Related MCP server: Meta Cloud API MCP Server
为什么这样设计
Wildberries 令牌是个人令牌,且不会离开服务器。 WB 对“问题和评价”类别的基础令牌限额为每小时 5 次请求,聊天为每小时 1 次请求;无法在这种限制下工作。个人令牌提供每秒 3 次请求,但根据 WB 规则,禁止将其传递给第三方或在云服务中使用——它专用于自有或租用基础设施上的系统。因此:自建 VPS,服务器上只有一个令牌,员工通过 OAuth 访问。
员工身份由我们的服务器确认。 Claude 不会向 MCP 服务器传递 email 或用户 ID,而组织管理后台不支持“无授权服务器”选项。因此服务器自身充当 OAuth 2.1 授权服务器(PKCE、Dynamic Client Registration、RFC 9728/8414),身份则从 Google、Yandex 或一次性代码获取。
角色。 ALLOWED_EMAIL_DOMAINS / ALLOWED_EMAILS 决定谁能登录。RESPONDER_EMAILS 和 ADMIN_EMAILS 决定谁能发送。其他人获得的令牌没有 wb:write 权限,因此物理上无法调用 wb_draft_send。
要求
具有公网 IP 且可从互联网访问的 VPS(Claude 会从自己一侧访问服务器——位于 NAT 或 VPN 后面的服务器不适用)
指向该 IP 的 A 记录的域名
Docker 和 Docker Compose
具有“问题和评价”及“与买家聊天”类别的 WB 个人令牌
Claude 组织中的 Owner 或 Primary Owner 权限(只有他们能添加连接器)
部署
1. Wildberries 令牌
卖家个人中心 → 设置 → API 访问 → 创建令牌 → “手动集成”选项卡 → 类型 个人。勾选 “问题和评价” 和 “与买家聊天” 类别,访问级别 — 读写。令牌只显示一次,有效期为 180 天——请设置更换提醒。
2. 配置
git clone <репозиторий> mcp-wb && cd mcp-wb
cp .env.example .env填写 .env。必填最低配置:
PUBLIC_URL=https://mcp-wb.вашдомен.ru
MCP_DOMAIN=mcp-wb.вашдомен.ru
ACME_EMAIL=admin@вашдомен.ru
WB_TOKEN=<токен из шага 1>
SESSION_SECRET=<openssl rand -hex 32>
ALLOWED_EMAIL_DOMAINS=вашдомен.ru
ADMIN_EMAILS=вы@вашдомен.ru
RESPONDER_EMAILS=менеджер1@вашдомен.ru,менеджер2@вашдомен.ru启动前验证令牌:
npm install && npx tsx scripts/probe-wb.ts3. 员工登录
Google Workspace(IDENTITY_PROVIDER=google)— 在 Google Cloud Console 中创建类型为“Web application”的 OAuth 客户端,在 Authorized redirect URIs 中添加:
https://mcp-wb.вашдомен.ru/idp/google/callbackGOOGLE_CLIENT_ID 和 GOOGLE_CLIENT_SECRET — 填入 .env。
Yandex ID(IDENTITY_PROVIDER=yandex)— 在 oauth.yandex.ru 创建应用,Callback URI:
https://mcp-wb.вашдомен.ru/idp/yandex/callback无外部 IdP(IDENTITY_PROVIDER=invite)— 发放一次性代码:
docker compose exec mcp-wb node dist/scripts/invite.js ivan@вашдомен.ru4. 启动
docker compose up -d --buildCaddy 会自动获取 Let's Encrypt 证书。验证:
curl https://mcp-wb.вашдомен.ru/.well-known/oauth-protected-resource/mcp应返回包含 "resource": "https://mcp-wb.您的域名.ru/mcp" 的 JSON。
5. 连接到 Claude 组织
组织中的 Settings → Connectors(该菜单项仅 Owner 可见)。
Add → Custom → Web。
URL:
https://mcp-wb.您的域名.ru/mcp无需修改 Advanced settings:服务器支持 Dynamic Client Registration,会自动注册 Claude。
保存——连接器将出现在组织所有员工中。
6. 每位员工需要做什么
打开 Claude → Connectors → 找到连接器 → Connect → 使用企业邮箱登录。之后就可以用自然语言操作:“显示本周未回复的评价”、“准备对评价 X 的回复”。
查看自己的权限:wb_whoami。
运维
操作日志。 所有发送给买家的内容都记录在数据库文件的 audit 表中:
docker compose exec mcp-wb \
node -e "const d=require('better-sqlite3')('/data/mcp-wb.db');console.table(d.prepare('SELECT datetime(ts,\"unixepoch\") t,actor,action,target,outcome FROM audit ORDER BY ts DESC LIMIT 30').all())"撤销员工访问权限 — 将其从 ALLOWED_EMAILS 中移除 / 在 Google Workspace 中停用,然后重启容器。有效令牌会在每次请求时检查访问列表,因此权限会立即失效。
更换 WB 令牌 — 每 180 天一次:在 .env 中填入新令牌,然后执行 docker compose … up -d。
限额。 客户端自行控制节奏:评价和问题每秒 3 次请求,聊天每 10 秒 10 次请求,遇到 429 时根据 X-Ratelimit-Retry 头等待。
开发
npm install
npm run dev # tsx watch
npm run typecheck
WB_SANDBOX=true npm run dev # песочница WB (только отзывы и вопросы, чата в ней нет)如需本地运行 OAuth,请设置 PUBLIC_URL=http://localhost:3000 和 IDENTITY_PROVIDER=invite。
边界
聊天:WB 没有 sandbox 主机,只能在真实卖家后台测试。
对评价和问题的回复需经过 WB 审核,不会立即发布。
修改回复——60 天内只有一次机会,之后文本永久固定。
退货申请(
returns-api)需要单独的令牌类别,本版本未接入。服务器无会话:每个 HTTP 请求都会创建独立的 MCP 服务器实例,因此没有面向客户端的服务器端通知。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityBmaintenanceConnects Claude to Amazon Seller Central via the SP-API for natural language queries on sales, inventory, reports, fees, reimbursements, and analytics.2047
- AlicenseBqualityDmaintenanceEnables Claude to manage WhatsApp templates, flows, and send messages through the WhatsApp Cloud API.3126MIT
- AlicenseAqualityDmaintenanceConnects Claude to Open WebUI, enabling chat management, RAG knowledge bases, files, functions, and prompts directly from Claude.26252MIT
- FlicenseAqualityCmaintenanceConnects Claude to your Amazon Seller Central account via the Selling Partner API, enabling queries for recent orders, sales summaries, FBA inventory, and financial events.4
Related MCP Connectors
Drive your real WhatsApp inbox from Claude — send, reply, label, assign, and triage via TimelinesAI.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Amazon brand, seller, niche & buy-box intelligence inside your own Claude or ChatGPT.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hollowmountain/wb_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server