notify-bot-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@notify-bot-mcp Notify the WeCom group that the deployment finished successfully."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
notify-bot-mcp
An MCP server for sending notifications to chat bots. Starting with WeCom.
通过 MCP 向一个预先配置的企业微信群机器人发送纯文本消息。Python 3.11+,官方 MCP Python SDK 2.3.0,STDIO 传输。无需模型 API Key。
安装与运行
安装 uv,克隆本仓库后执行:
uv sync --locked
cp .env.example .env在本地 .env 中填写机器人 Webhook(不要提交真实 key),运行:
uv run --env-file .env notify-bot-mcp这是 STDIO 服务,会等待 MCP 客户端输入,不会打开网页或自动发送消息。.env 由 uv --env-file 显式加载;Python 服务自身只读取环境变量。
Related MCP server: DingTalk Robot MCP
MCP 客户端配置
支持 mcpServers 配置的客户端可参考以下示例;将路径替换成实际绝对路径。若图形客户端找不到 uv,使用 command -v uv 返回的绝对路径。
{
"mcpServers": {
"notify-bot": {
"command": "uv",
"args": [
"--directory", "/absolute/path/notify-bot-mcp",
"run", "--locked", "--env-file", "/absolute/path/notify-bot-mcp/.env",
"notify-bot-mcp"
]
}
}
}每个服务实例对应一个机器人。确保用户知道配置的是哪个群,并在客户端确认目标与消息内容后调用工具。工具描述和 annotations 是提示,不是服务器端权限校验;本版本不提供公网端点。
工具
send_message(content: str) 只接收内容,不接受任意 URL。
{"content": "发布完成:新增用户导出功能。"}成功返回 status: accepted、provider: wecom 和 errcode: 0,表示平台受理,不是已读回执。失败返回 MCP 工具错误。空白或超过 2048 UTF-8 字节的文本拒绝发送;不会自动截断或拆分。
行为边界
仅允许
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=...,不跟随重定向。单次 HTTP 操作配置 10 秒超时;没有自动重试、去重或持久化队列。
超时、网络错误、异常响应意味着投递可能不确定:先检查群消息,再决定是否重试。
不记录内容、Webhook 或平台原始错误正文。日志走 stderr,stdout 留给协议。
HTTP 客户端不读取代理环境变量(
trust_env=False),需要直连企业微信端点。暂不支持 Markdown、@成员、文件、多群、钉钉或飞书。
开发和测试
uv sync --locked
uv run --locked pytest测试使用 httpx MockTransport,覆盖发送载荷、UTF-8 边界、平台错误、超时、重定向、配置与密钥脱敏,并验证 MCP 内存会话及真实 STDIO 子进程。STDIO 测试仅提交无效内容,不向企业微信发送请求。
真实群测试需由使用者配置自己的测试机器人,并明确发送内容。当前模拟验证不代表真实平台联调已完成。
src/notify_bot_mcp/
server.py MCP 工具注册与入口
wecom.py 校验、HTTP 发送、响应处理
tests/ 发送层与 MCP 协议测试参考与许可
MIT License. 本项目为独立开源工具,不是企业微信官方产品。仓库源码可本地安装;尚未声明在 PyPI 发布。
Available Tools
1 toolsend_messageADestructive
Send UTF-8 plain text (max 2048 bytes) to the configured WeCom group. Requires explicit user intent to send. Accepted does not mean read. Never automatically retry unknown delivery.
Inputs: content (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With a single tool there is no possibility of misselection between tools. The one tool's purpose — send plain text to a configured WeCom group — is unambiguous and self-contained.
The lone tool follows a clear verb_noun convention (send_message). No competing conventions exist to conflict with it, so the naming surface is fully predictable.
A single send_message tool is defensible for a narrow notification bot, but the surface feels thin — delivery status, targeting, and message options are all absent. It sits at the borderline the rubric flags for 1-2 tool servers.
Core outbound notification is covered, but the lifecycle is a dead end: no way to check delivery/read status, list groups or members, or send rich content such as mentions or files. Agents hitting 'did it arrive?' or 'notify a specific person' have no operation to call.
Maintenance
Related MCP Connectors
Hosted MCP messaging across owners, tools, and machines, with readable transcripts.
Configure in-product messaging apps. Tools configure apps only; no message bodies or file bytes.
WhatsApp (Web + Business API), SMS, contacts, and call records via 2Chat's MCP server.
Let agents send content-free push notifications to a paired phone via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables posting text messages to Google Chat spaces through webhook-based integration, providing simple and secure message delivery without OAuth setup requirements.MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to send DingTalk single and group chat messages via MCP protocol, supporting userId, name, or batch sending to up to 20 users.33MIT
- AlicenseAqualityBmaintenanceEnables sending messages to DingTalk group chats through custom bot webhooks, supporting text, Markdown, images, news, and template card messages.5MIT
- AlicenseAqualityCmaintenanceEnables sending messages to Feishu group chats via custom bot webhook, supporting text, rich text, interactive cards, Markdown-converted cards, and chat sharing without requiring an enterprise app.6MIT