MCP sends WeCom message: using manual transfer notification as an example

Send Enterprise WeChat Message API

API Endpoint

https://open.xinheyun.com/319270248e0

This endpoint is the interface for the Agent channel to send messages to inquirers.


Request Content:

token

Generate a token via the OAuth client. See OAuth Client: Obtain Token for Calling C2_API for details.

curl
curl --location --request POST 'https://c2.xinheyun.com/api/open/v3/butler/channel/message/send' \
--header 'Authorization: eyJhbGciOiJIxxxxxxAMLhX2Y' \
--header 'Content-Type: application/json' \
--data-raw '{
    "body": {
        "dialogId": "xxxxx",
        "message":"Message content"
    }
}'

CASE 1: Implement “Transfer to Human” WeChat Notification via MCP

First, obtain and configure the token for the MCP tool to call this API endpoint. Configuration details are available in “OAuth Client: Obtain Token for Calling C2_API”.

1. Configure Token for MCP
  1. Go to 3Chat Agent → MCP Authorized Access → Create New

  2. Fill in the information on the pop-up page:

2. AI Task Configuration
  1. Configure as shown in the diagram:
Transfer to Human Notification
---
Trigger when the customer has any of the following situations:
When the customer wants a refund
When the customer wants to file a complaint
---
Must call the "Send Transfer to Human Notification" tool (After March 1, 2026, always use the "+" button in the top-right corner to select the "MCP" tool)

  1. Click [Save] → [Run]
3. MCP Configuration

(1) Basic Information

notify_human
---
Send Transfer to Human Notification

(2) Request Configuration
Configure according to the 3Chat API documentation.

(3) API Testing
The corresponding personal WeChat should receive a notification:

(4) Next Step
Click [Save].

Effect Demonstration: