mcp-dingtalk-notifier-service
An MCP utility facilitating the transmission of diverse message formats—including plain text, structured markdown, visual media, news digests, and rich template cards—to DingTalk group bots. It incorporates secure signature validation and supports binary artifact uploading.
Author

HundunOnline
Quick Info
Actions
Tags
🌐 mcp-dingtalk-notifier-service
This application functions as an MCP (Message Conduit Protocol) server component engineered to interface with and dispatch various message payloads to DingTalk team chat robots.
English
Project Synopsis
This is a core MCP server utility designed for broadcasting different message types (text, Markdown, images, news summaries, and template cards) into specified DingTalk team channels. Key functionalities include handling binary file uploads and implementing cryptographic signature checking for request authenticity.
Core Capabilities
- Capability to dispatch standard text payloads.
- Support for rendering content formatted via Markdown.
- Mechanism for sending static or dynamic image content.
- Functionality to transmit curated news bulletin structures.
- Ability to push complex, structured template cards.
- Secure handler for uploading external files.
- Mandatory cryptographic hash verification for request integrity.
Deployment Guide
Manual Setup Procedure
sh
Obtain source code and initiate compilation
$ git clone https://github.com/HundunOnline/mcp-dingdingbot-server.git $ cd mcp-dingdingbot-server && make build $ sudo ln -s $PWD/dist/mcp-dingdingbot-server_xxx_xxxx /usr/local/bin/mcp-dingtalk-notifier-service
Note: Substitute "$PWD/dist/mcp-dingdingbot-server_xxx_xxxx" with the actual generated executable name.
Alternatively, utilize a pre-packaged binary release artifact.
Configuration Parameters
{ "mcpServers": { "mcp-dingtalk-notifier-service": { "command": "mcp-dingdingbot-server", "env": { "DINGDING_BOT_WEBHOOK_KEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", "DINGDING_BOT_SIGN_KEY": "SECxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } } } }
Operational Environment Variables
DINGDING_BOT_WEBHOOK_KEY: The essential access token (webhook key) required for the DingTalk notification endpoint. This parameter is mandatory.DINGDING_BOT_SIGN_KEY: The secret credential used during HMAC-SHA256 signature validation. This is optional but strongly advised for securing communications.
Supported Operations
- send_text
Initiate transmission of a plain text notification to the target DingTalk channel.
- send_markdown
Dispatch a richly formatted message structured using Markdown syntax.
- send_image
Broadcast an image file or URL to the group.
- send_news
Transmit a multi-part news item, comprising a headline, descriptive summary, hyperlink, and associated media URL.
- send_template_card
Submit a message utilizing the advanced DingTalk template card layout.
- upload_file
Mechanism to upload arbitrary files to the DingTalk platform for potential sharing or storage.
Example Interactions
prompt
prompt: 在钉钉群聊中推送纯文本通知,内容为:系统状态检查已完成。 prompt: 针对用户操作,发送一条包含层级标题的Markdown警告。 prompt: 发布一篇包含标题、摘要、链接及图片的聚合新闻简报。
Send an alert message via DingTalk containing the following plain text: System health check completed successfully. Dispatch a warning payload formatted with Markdown emphasizing hierarchical headings. Initiate broadcast of an aggregated news brief detailing title, summary, URL, and an accompanying image link.
DingTalk Robot Integration Details
Refer to the official documentation for robot setup procedures: https://open.dingtalk.com/document/robots/custom-robot-access
DINGDING_BOT_WEBHOOK_KEY: Corresponds to the access token appended to the robot's send URL. Example:
https://oapi.dingtalk.com/robot/send?access_token=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaaThe token,693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa, must be supplied here.DINGDING_BOT_SIGN_KEY: The shared secret for request authentication when signature defense is activated in the DingTalk robot's security configuration. Validation employs the HMAC-SHA256 algorithm using the request timestamp and this secret key.
中文
项目综述
本工具作为一套基于MCP(消息通道协议)的服务端组件,专门用于向钉钉团队机器人投递包括文本、Markdown、图像、新闻摘要及结构化模板卡片在内的多种消息类型。它同时支持二进制资源的上传和安全签名验证机制。
关键特性
- 纯文本信息推送能力
- 支持Markdown格式渲染
- 静态或动态图像内容发送
- 结构化新闻摘要传递功能
- 复杂布局的模板卡片发布
- 二进制文件上传处理
- 请求真实性验证(通过加密哈希算法)
部署指引
手动安装步骤
sh
获取源代码并执行编译
$ git clone https://github.com/HundunOnline/mcp-dingdingbot-server.git $ cd mcp-dingdingbot-server && make build $ sudo ln -s $PWD/dist/mcp-dingdingbot-server_xxx_xxxx /usr/local/bin/mcp-dingtalk-notifier-service
请将 "$PWD/dist/mcp-dingdingbot-server_xxx_xxxx" 替换为实际生成的执行文件名。
亦可选用预编译的发布包进行部署。
配置参数
{ "mcpServers": { "mcp-dingtalk-notifier-service": { "command": "mcp-dingdingbot-server", "env": { "DINGDING_BOT_WEBHOOK_KEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", "DINGDING_BOT_SIGN_KEY": "SECxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } } } }
运行环境参数
DINGDING_BOT_WEBHOOK_KEY: 用于访问钉钉机器人的接入令牌(Webhook密钥)。此项为必需配置项。DINGDING_BOT_SIGN_KEY: 用于HMAC-SHA256签名验证过程中的共享密钥。此项可选,但强烈推荐用于保护通信安全。
可用指令集
- send_text
向指定钉钉频道发送纯文本通知。
- send_markdown
推送使用Markdown语法渲染的富文本消息。
- send_image
广播图像文件或URL至群组。
- send_news
发送包含标题、简述、超链接及相关媒体URL的多段式新闻摘要。
- send_template_card
提交采用钉钉高级模板卡片布局的消息。
- upload_file
用于将任意文件上传至钉钉平台的功能接口。
钉钉机器人集成参考
机器人配置流程请参阅官方指南: https://open.dingtalk.com/document/robots/custom-robot-access
DINGDING_BOT_WEBHOOK_KEY: 对应于机器人发送URL中附加的访问凭证。 示例:
https://oapi.dingtalk.com/robot/send?access_token=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa其中的693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa部分即为您需填写的密钥。DINGDING_BOT_SIGN_KEY: 当钉钉机器人的安全设置中启用签名防御时,此密钥用于请求认证。验证过程使用HMAC-SHA256算法,结合请求时间戳与该密钥进行比对。
