dingtalk-alert-mcp-py
钉钉群机器人告警 MCP Server,复刻 base_server DingTalkUtils 的钉钉机器人协议(OapiRobot + HmacSHA256 签名)。
特性
- 多群配置(
DINGTALK_GROUPS环境变量) - 文本消息发送 + 可选 @指定手机号
- 加签模式(webhook + secret → HmacSHA256 签名,与
DingTalkUtils.getDrainageServerUrl算法一致)
配置
export DINGTALK_GROUPS='{
"中台群": {"webhook": "https://oapi.dingtalk.com/robot/send?access_token=xxx", "secret": "SECxxx"},
"监控群": {"webhook": "https://oapi.dingtalk.com/robot/send?access_token=yyy", "secret": "SECyyy"}
}'
工具
| 工具 | 说明 |
|---|---|
list_groups |
列出已配置群(不含敏感信息) |
send_message(content, group?, at_phones?) |
发送文本消息到指定群或默认群 |
开发
uv sync
python3 -m unittest discover tests
接入 Claude Code
在 ~/.mcp.json 注册:
{
"mcpServers": {
"dingtalk-alert": {
"command": "uvx",
"args": ["--from", "git+https://.../dingtalk-alert-mcp-py", "dingtalk-alert-mcp"],
"env": {
"DINGTALK_GROUPS": "{\"中台群\": {\"webhook\": \"...\", \"secret\": \"...\"}}"
}
}
}
}
(或本地安装:uv sync 后 DINGTALK_GROUPS=... dingtalk-alert-mcp)
Metadata
Release files for dingtalk-alert-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dingtalk_alert_mcp-0.1.0.tar.gz | 5.7 kB | Without provenance | Details for dingtalk_alert_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dingtalk_alert_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dingtalk_alert_mcp-0.1.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / dingtalk_alert_mcp-0.1.0.tar.gz
| Download URL | dingtalk_alert_mcp-0.1.0.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fcedca6cf581cd9fb952a3ad5c1f93912987546d82a8b5bf63a47197122ef9be
|
|
BLAKE2b-256 checksum How to use checksums |
d8818356c67f946f2b24c45afa1a8dc6e5792fce25844048071445894a0f04f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / dingtalk_alert_mcp-0.1.0-py3-none-any.whl
| Download URL | dingtalk_alert_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
170996832cf6b12f6ea55742ebfff552fb3c4b9f4b2db51418b2f97d5d67ece1
|
|
BLAKE2b-256 checksum How to use checksums |
55c29cc3896a5be2725aee5611153f9b24f5046dbbb2e75e8bb5cdec7bab138c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for dingtalk-alert-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.