Use qwenpawmail-mcp to connect or register a mailbox and perform email operations.
The managed QwenPaw mailbox workflow supports these nine mail domains:
| Provider | Domains | Login credential |
|---|---|---|
| NetEase | 163.com, 126.com, yeah.net |
16-character authorization code |
| Tencent | qq.com, foxmail.com |
16-character authorization code |
| Sina | sina.com, sina.cn |
16-character authorization code |
| Alibaba | aliyun.com |
Mailbox login password; existing accounts only |
gmail.com |
16-character app password after enabling 2-Step Verification |
Enterprise mailboxes, custom domains, and Microsoft mailboxes are not supported by the current managed workflow. Do not try enterprise provider overrides or custom IMAP/SMTP hosts. Ask the user to choose one of the supported personal domains instead.
create_mailbox provides built-in registration guidance only for 163.com, 126.com, yeah.net, qq.com, and foxmail.com. Other supported domains require their official registration flow. New aliyun.com registration is unavailable; only existing accounts can be connected.
For any email operation, use this skill as the entry point. Do not invent another email workflow or bypass qwenpawmail-mcp with raw IMAP/SMTP commands.
agent.json contains only public mailbox configuration. Its expected mail shape is:
{
"mail": {
"is_new_account": false,
"credential": {
"name": "myaccount",
"domain": "163.com",
"provider": ""
},
"push": {
"mode": "off",
"rules": [],
"poll_interval_seconds": 120,
"access_control_enabled": false
}
}
}
The sensitive fields auth_code, password, and phone_number are intentionally absent from agent.json and redacted from Agent API responses. The provider credential represented by auth_code is stored encrypted after it is configured. Registration passwords and phone numbers are entered only on the provider page and are not stored by the current QwenPaw workflow. The absence of auth_code from public configuration does not mean that the user did not configure it.
QwenPaw resolves the encrypted provider credential into the managed DriverCard only at runtime. Never read, decrypt, print, copy, or modify credentials.yaml, and never search files or logs for a secret. Use the workflows below.
Read mail.is_new_account, mail.credential.name, and mail.credential.domain from agent.json. Treat provider as empty for every currently supported personal domain.
If mail is missing, ask the user to configure Email Management in the QwenPaw Agent Settings UI before continuing.
is_new_account is false: manage an existing mailboxcheck_auth directly. The managed DriverCard already receives the stored email credential through a runtime credential reference; do not look it up in agent.json and do not call set_credentials merely because secret fields are absent.check_auth succeeds, perform the requested mailbox operation.check_auth after the agent reloads.set_credentials may be used as a temporary session-only override, followed by check_auth. It does not update the encrypted QwenPaw configuration and is lost when the MCP process restarts.For temporary set_credentials, pass the full email and the provider-specific credential in the auth_code parameter. For aliyun.com, that parameter contains the login password; for the other supported domains, it contains the 16-character authorization code or app password.
is_new_account is true: register a dedicated mailboxUse the public username and domain from agent.json. If the username is blank, let create_mailbox generate one or agree on one with the user.
Registration passwords and phone numbers are entered on the provider page and are deliberately unavailable to the Agent. Do not try to recover them from files. The optional credential field in the QwenPaw dedicated-mailbox form is only for the final provider authorization code, app password, or mailbox login password after registration. Use one of these paths:
create_mailbox(domain, username) first to validate the username and obtain current provider guidance.Official registration entry points:
| Domain | Registration entry | Notes |
|---|---|---|
163.com, 126.com, yeah.net |
https://zc.reg.163.com/regInitialized |
Shared NetEase flow; phone verification required |
qq.com, foxmail.com |
https://ssl.zc.qq.com/v3/index-chs.html |
QQ registration; phone verification required |
sina.com |
https://mail.sina.com.cn/register/weixin.php |
WeChat-authorized registration |
sina.cn |
https://mail.sina.cn/register/regmail.php |
Phone/SMS registration |
gmail.com |
https://accounts.google.com/signup |
Enable 2-Step Verification, then create an app password |
aliyun.com |
Unavailable | New personal registrations are closed; use an existing account |
Consider registration successful only after a clear success message or successful inbox access. If the final username differs from the requested one, report the reason and final address.
For NetEase or Tencent domains, call create_mailbox(domain, username) and relay its alternatives, registration URL, and steps. Ask the user to complete all password, phone, CAPTCHA, and SMS steps in their own browser.
For Sina or Gmail, direct the user to the official entry above. For aliyun.com, explain that a new account cannot be registered and ask the user to choose another supported domain.
agent.json.is_new_account to false, store the secret in encrypted form, synchronize the managed DriverCard, and reload the agent.check_auth. Do not run other mail tools until it succeeds.CONTACTS.md before contact-dependent work.| Tool | Purpose |
|---|---|
list_folders |
List all mailbox folders |
list_messages |
List message envelopes in a folder with pagination |
get_message |
Fetch one message by folder and UID |
get_attachment |
Get an attachment by filename or index |
search_messages |
Search by keyword, sender, or date range |
check_auth |
Verify fresh IMAP and SMTP logins using the current runtime credential |
create_mailbox |
Return registration guidance for supported NetEase/Tencent domains |
list_threads |
List conversation threads with incremental sync |
search_threads |
Search conversation threads |
get_thread |
Get all messages in one thread |
get_mailbox_stats |
Get recent mailbox statistics |
| Tool | Purpose |
|---|---|
send_message |
Send a plain-text email with to/cc/bcc |
reply_message |
Reply with proper threading headers |
forward_message |
Forward a message as an RFC 822 attachment |
mark_messages |
Mark messages read/unread/flagged/unflagged |
move_message |
Move a message to another folder |
create_folder |
Create a mailbox folder |
set_credentials |
Set a temporary in-memory credential for this MCP process |
clear_credentials |
Clear the temporary override and fall back to injected startup credentials |
update_thread |
Add or remove custom thread labels |
| Tool | Purpose |
|---|---|
delete_message |
Permanently delete one message |
delete_thread |
Move a whole thread to trash |
check_auth.agent.json, DriverCard YAML, CONTACTS.md, logs, or chat summaries.delete_message or delete_thread.list_messages or search_messages immediately before acting.check_auth first.CONTACTS.md when the user wants newly discovered contact information retained, but never store credentials there.