Direct Mail MCP service performance depends on your AI agent's capabilities. Optimize the agent's prompt and knowledge base for best results.
Overview
Model Context Protocol (MCP) is a standardized interface for large language models and AI assistants. Like a USB port, it lets AI connect to and operate external tools for complex tasks.
Direct Mail supports MCP. Use this protocol to authorize an AI agent to perform operations and interact with Direct Mail through chat.
Capabilities
The Direct Mail MCP STDIO server provides query tools and protected workflows for sending emails, managing templates, running batch tasks, managing tags, and managing receiver lists. It uses the Alibaba Cloud SDK.
The Direct Mail MCP service supports only STDIO, not HTTP. Configure it through STDIO or a JSON configuration file.
Configuration
Prerequisites
-
Node.js
>=20 -
An Alibaba Cloud account with Direct Mail activated.
-
A RAM AccessKey ID and AccessKey Secret with the required Direct Mail permissions.
-
Direct Mail resources required for sending, such as approved mail addresses, templates, tags, and receiver lists.
This service is an MCP STDIO process launched by an MCP Host. It is not intended for interactive shell use.
MCP Host configuration
Configure the MCP Host to launch the package with npx and pass your Alibaba Cloud credentials as environment variables:
{
"mcpServers": {
"aliyun-direct-mail": {
"command": "npx",
"args": ["-y", "alibabacloud-direct-mail-mcp"],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "your-access-key-id",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "your-access-key-secret",
"ALIYUN_DM_REGION_ID": "ap-southeast-1"
}
}
}
}
Create an AccessKey ID and AccessKey Secret for a RAM user. For more information, see Create an AccessKey. The AccessKey Secret is shown only at creation. Store it securely.
ALIYUN_DM_REGION_ID defaults to ap-southeast-1. Available region IDs and endpoints are listed in Service Endpoints.
Tools
The following table lists available tools. For precise parameters and confirmation fields, check the tool schema from the MCP Host.
|
Tool |
Description |
Risk level |
|
|
View your Direct Mail account quota, status, and resource counts. |
read-only |
|
|
List or filter mail addresses. |
read-only |
|
|
List configuration sets. |
read-only |
|
|
Get details of a single configuration set. |
read-only |
|
|
List Direct Mail templates before a batch task or test send. |
read-only |
|
|
Get a template's subject, status, and content for pre-send review. |
read-only |
|
|
Preview and create an email template. Created templates require review. |
protected write |
|
|
List receiver list metadata. |
read-only |
|
|
Get details of a single receiver list. |
read-only |
|
|
Preview and create an empty receiver list. |
protected write |
|
|
Append receiver records to a receiver list. |
protected write |
|
|
List batch tasks for progress checks. |
read-only |
|
|
List tags used for classification and tracking. |
read-only |
|
|
Preview and create a tag. |
protected write |
|
|
Get delivery details per recipient or email. |
read-only |
|
|
Get aggregated sending statistics. |
read-only |
|
|
Get blocked sending records, such as unsubscribed addresses. |
read-only |
|
|
Get open and click tracking data. |
read-only |
|
|
List purchased dedicated IPs. |
read-only |
|
|
List dedicated IP pools. |
read-only |
|
|
Get the Direct Mail IP Protection switch status. |
read-only |
|
|
Send transactional emails, such as verification codes (up to 100 recipients). |
protected sending |
|
|
Start a batch sending task for marketing emails (no recipient limit). |
protected sending |
|
|
Preview and send a test email using a template. Not for production use. |
protected sending |
Protected write and sending tools return a preview and confirmation action when the execute parameter is omitted. The MCP Host should display the preview and proceed only after explicit user approval.
Optional agent skill
The MCP service runs independently. The optional agent skill helps the AI assistant select tools, verify previews, and handle confirmation flows per Direct Mail business processes. It provides workflow guidance without changing MCP service runtime behavior.
Download alibabacloud-direct-mail-agent-skill.zip.
Prompts
Hosts that support MCP listPrompts / getPrompt can use scenario-based workflow guidance. Prompt details match the externally hosted skill. For precise field definitions, check the tool schema and structuredContent returned by the service.
|
Prompt |
Use case |
|
|
Send a direct email or transactional notification to specific recipients. |
|
|
Run a batch task with a template and receiver list, with optional test send. |
|
|
Investigate task progress, delivery details, statistics, or tracking data. |
Quick start
After configuring credentials in the MCP Host, run the service with npx:
npx -y alibabacloud-direct-mail-mcp

If npx returns a "command not found" error, download Node.js from the Node.js official website.
Examples
Wukong example
Contact us
For questions about the Direct Mail MCP service, email us.
-
Email:
dm-support@alibaba-inc.com




