mcpField
M
Mcp Server Dingtalk

Mcp Server Dingtalk

Local
github.com/1libCommunication2Updated 74w ago

About Mcp Server Dingtalk

MCP Server DingTalk lets MCP clients send messages to DingTalk chat groups through configured bots. It supports several message formats and signs webhook requests with HMAC-SHA256.

Key features

  1. 01Send messages through configured bots
  2. 02Support five message formats
  3. 03Sign requests with HMAC-SHA256
  4. 04Configure bots with JSON

Use cases

  1. 01Send text updates to a DingTalk group
  2. 02Share links or formatted announcements
  3. 03Post action cards or feed cards

MCP support

It exposes the dingtalk_bot_send_message tool to MCP clients for sending messages to DingTalk groups using configured bots.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"dingtalk": {
"command": "npx",
"args": [
"-y",
"mcp-server-dingtalk"
],
"env": {
"DINGTALK_BOT_CONFIGS": "<DINGTALK_BOT_CONFIGS>"
}
}
}
}
Run commandnpx -y mcp-server-dingtalk
Environment variables to set
DINGTALK_BOT_CONFIGS

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-server-dingtalk

Tools

1

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
messageobjectYesmessage to send. type Message = TextMessage | LinkMessage | MarkdownMessage | ActionCardMessage | FeedCardMessage; interface TextMessage { type: 'text'; content: string; } interface LinkMessage { type: 'link'; text: string; title: string; picUrl?: string; messageUrl: string; } interface MarkdownMessage { type: 'markdown'; title?: string; text: string; } interface ActionCardMessage { type: 'actionCard'; title: string; text: string; // markdown text btnOrientation?: '0' | '1'; // 0: vertical, 1: horizontal singleTitle?: string; // single button title singleURL?: string; // single button URL btns?: Array<{ title: string; // button title actionURL: string; // button URL }>; // array of buttons } interface FeedCardMessage { type: 'feedCard'; links: Array<{ title: string; // title of the link messageURL: string; // URL to open when the link is clicked on picURL: string; // image URL for the link }>; // array of links }
message.btnOrientationenumNo0 | 1
message.btnsarrayNo
message.contentstringNo
message.linksarrayNo
message.messageUrlstringNo
message.picUrlstringNo
message.singleTitlestringNo
message.singleURLstringNo
message.textstringNo
message.titlestringNo
message.typeenumYesmessage type to sendtext | link | markdown | actionCard | feedCard
namestringYesbot name for send message to
notifyobjectYes
notify.atMobilesarrayNomobile numbers to notify
notify.atUserIdsarrayNouser IDs to notify
notify.isAtAllbooleanNowhether to notify all users

Details

From the project README

MCP Server DingTalk

A Model Context Protocol (MCP) server for DingTalk integration.

Features

  • 🤖 DingTalk bot message sending capabilities
  • 📦 Multiple message types support (text, link, markdown, actionCard, feedCard)
  • 🔐 Secure webhook signing with HMAC-SHA256
  • 🎯 TypeScript support with strict type checking

Prerequisites

  • Node.js 18+

Usage

{
    "mcp-server-dingtalk": {
        "transport": "stdio",
        "command": "npx",
        "args": [
            "-y",
            "mcp-server-dingtalk"
        ],
        "env": {
            "DINGTALK_BOT_CONFIGS": "[{\"name\": \"your-bot-name\", \"accessToken\": \"your-access-token\", \"signSecret\": \"your-sign-secret\"}]"
        }
    }
}
Environment Variables
VariableDescriptionRequiredDefault
DINGTALK_BASE_URLDingTalk API base URLNohttps://oapi.dingtalk.com/robot/send
DINGTALK_BOT_CONFIGSJSON array of bot configurationsYes[]
Available Tools

The server provides the following MCP tool:

dingtalk_bot_send_message

Send messages to DingTalk chat groups via configured bots.

Parameters:

  • name (string): Bot name for sending messages
  • message (object): Message content with type-specific fields
  • notify (object): Notification settings for @ mentions

Supported Message Types:

  1. Text Message

    {
      "type": "text",
      "content": "Hello, World!"
    }
    
  2. Link Message

    {
      "type": "link",
      "text": "Link description",
      "title": "Link Title",
      "messageUrl": "https://example.com"
    }
    
  3. Markdown Message

    {
      "type": "markdown",
      "title": "Markdown Title",
      "text": "## Markdown Content\n- Item 1\n- Item 2"
    }
    
  4. Action Card Message

    {
      "type": "actionCard",
      "title": "Action Card Title",
      "text": "Action card content",
      "singleTitle": "Read More",
      "singleURL": "https://example.com"
    }
    
  5. Feed Card Message

    {
      "type": "feedCard",
      "links": [
        {
          "title": "Feed Item",
          "messageURL": "https://example.com",
          "picURL": "https://example.com/image.png"
        }
      ]
    }
    

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.