All Products
Search
Document Center

Direct Mail:Direct Mail MCP service

Last Updated:Jun 02, 2026
Note

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.

Note

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

dm_get_account_summary

View your Direct Mail account quota, status, and resource counts.

read-only

dm_list_mail_addresses

List or filter mail addresses.

read-only

dm_list_config_sets

List configuration sets.

read-only

dm_get_config_set

Get details of a single configuration set.

read-only

dm_list_templates

List Direct Mail templates before a batch task or test send.

read-only

dm_get_template

Get a template's subject, status, and content for pre-send review.

read-only

dm_create_template

Preview and create an email template. Created templates require review.

protected write

dm_list_receivers

List receiver list metadata.

read-only

dm_list_receiver_details

Get details of a single receiver list.

read-only

dm_create_receiver_list

Preview and create an empty receiver list.

protected write

dm_add_receiver_records

Append receiver records to a receiver list.

protected write

dm_list_tasks

List batch tasks for progress checks.

read-only

dm_list_tags

List tags used for classification and tracking.

read-only

dm_create_tag

Preview and create a tag.

protected write

dm_list_send_details

Get delivery details per recipient or email.

read-only

dm_get_send_statistics_summary

Get aggregated sending statistics.

read-only

dm_list_block_sending

Get blocked sending records, such as unsubscribed addresses.

read-only

dm_get_track_list

Get open and click tracking data.

read-only

dm_list_dedicated_ips

List purchased dedicated IPs.

read-only

dm_list_dedicated_ip_pools

List dedicated IP pools.

read-only

dm_get_ip_protection

Get the Direct Mail IP Protection switch status.

read-only

dm_send_direct_email

Send transactional emails, such as verification codes (up to 100 recipients).

protected sending

dm_start_batch_send_task

Start a batch sending task for marketing emails (no recipient limit).

protected sending

dm_send_template_test_email

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

dm_direct_email_send_assistant

Send a direct email or transactional notification to specific recipients.

dm_template_batch_send_assistant

Run a batch task with a template and receiver list, with optional test send.

dm_delivery_investigation_assistant

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

image

Note

If npx returns a "command not found" error, download Node.js from the Node.js official website.

Examples

Wukong example

Install Wukong, go to Settings, and click Add.

image

Method 1 (Recommended): Select JSON and paste the configuration.

image

Method 2: Select STDIO and fill in the fields as shown.

image

Connection successful.image

Ask Wukong a question to invoke the MCP service.

image

Contact us

For questions about the Direct Mail MCP service, email us.

  • Email: dm-support@alibaba-inc.com