使用说明
MCP服务器钉
用于钉集成的模型上下文协议(MCP)服务器。
特性
- 🤖 钉钉机器人消息发送功能
- 📦 支持多种消息类型(文本、链接、标记、actionCard、feedCard)
- 🔐 使用HMAC-SHA256进行安全的webhook签名
- 🎯 具有严格类型检查的TypeScript支持
先决条件
- Node.js 18+
用法
{
"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\"}]"
}
}
}
环境变量
| 变量 | 描述 | 必填 | 默认 |
|---|---|---|---|
DINGTALK_BASE_URL |
钉钉API基础URL | 否 | https://oapi.dingtalk.com/robot/send |
DINGTALK_BOT_CONFIGS |
机器人配置的JSON数组 | 是 | [] |
可用工具
服务器提供以下MCP工具:
dingtalk_bot_send_message
通过配置的机器人向钉聊天群发送消息。
参数:
name(string):用于发送消息的Bot名称message(object):具有特定类型字段的消息内容notify(object):@提及的通知设置
支持的消息类型:
-
短信
{ "type": "text", "content": "Hello, World!" } -
链接消息
{ "type": "link", "text": "Link description", "title": "Link Title", "messageUrl": "https://example.com" } -
Markdown消息
{ "type": "markdown", "title": "Markdown Title", "text": "## Markdown Content\n- Item 1\n- Item 2" } -
行动卡消息
{ "type": "actionCard", "title": "Action Card Title", "text": "Action card content", "singleTitle": "Read More", "singleURL": "https://example.com" } -
馈送卡消息
{ "type": "feedCard", "links": [ { "title": "Feed Item", "messageURL": "https://example.com", "picURL": "https://example.com/image.png" } ] }
许可证
麻省理工学院