Shop MCP

Connect a module

WeChat

ShopMCP connects official WeChat Mini Program customer-service callbacks to MCP clients so operators can search captured conversations, inspect media metadata, draft replies, and send approved responses when writes are enabled.

Callback-first history

WeChat does not provide a hosted API for arbitrary historical customer-service chat search. ShopMCP can search conversations and media metadata received after the callback URL has been configured.

1. Prepare a Mini Program

In the WeChat Mini Program admin console, copy the AppID and AppSecret. Choose a callback token for ShopMCP and keep it ready for both sides of the setup.

ShopMCP stores the AppSecret and callback token encrypted. Access tokens are requested server-side with the official stable token endpoint.

2. Connect WeChat in ShopMCP

Open Settings - Integrations, choose WeChat, then enter the AppID, AppSecret, callback token, and an optional account name.

  • ShopMCP verifies the AppID/AppSecret by requesting an access token.
  • After connecting, the settings page shows a callback URL for that exact connection.
  • Use the same callback token in WeChat and in ShopMCP so signature validation succeeds.

3. Configure callbacks in WeChat

Paste the generated callback URL into the Mini Program customer-service message callback settings. WeChat calls ShopMCP with signature, timestamp, nonce, and echostr during verification; ShopMCP validates the SHA1 signature and returns the challenge text.

Only new messages are searchable

Send a test customer-service message after callback setup. Older conversations are not backfilled unless WeChat later exposes an official export/backfill API that fits ShopMCP's consent model.

4. What you can ask

Common WeChat customer-service questions
GoalExample promptWhat ShopMCP reads or does
Search conversationsFind recent WeChat conversations mentioning delayed delivery.ShopMCP's stored transcript index populated by WeChat callbacks.
Open a threadShow the latest messages and media for this OpenID.Stored conversation messages plus temporary media metadata.
Draft a replyDraft a friendly reply that asks for the order number and explains the next step.Conversation context and optional operator instructions. The draft is not sent.
Send an approved replySend this exact WeChat reply after I confirm it.Official customer-service send API, only when ShopMCP write gates are enabled.

5. Writes and reply limits

WeChat customer-service sends are live customer-facing messages. ShopMCP keeps send tools behind the global integration write gate, the workspace allow_writes toggle, and the normal MCP pre-send confirmation language.

48-hour customer-service window

Customer-service replies must fit WeChat's customer-service reply window and quota rules. If a reply is outside the allowed window or over quota, WeChat rejects it and ShopMCP returns the upstream error.

6. Official references