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-mcpNotify 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: Google Chat MCP Server
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.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds substantial context beyond the annotations: explicit user intent, UTF-8 plain text limit, the distinction between accepted and read, and a no-auto-retry rule for unknown delivery. These are important operational cautions for a destructive, non-idempotent send operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short sentences, all front-loaded and purposeful. Each sentence adds either purpose, constraint, or safety guidance without repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter send tool with no output schema, the description covers the operation, input constraints, required user intent, and key delivery semantics. Annotations already cover read-only, destructive, openness, and idempotency traits, so little is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has one undocumented content parameter at 0% description coverage. The description compensates by defining the payload format as UTF-8 plain text with a maximum size, which is the key semantic detail an agent needs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: send plain text to the configured WeCom group. It also includes key constraints such as UTF-8 and 2048-byte maximum, so the agent can identify the operation immediately.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a clear usage condition: explicit user intent is required before sending. It does not need to route to a sibling because none are listed, but it could be slightly stronger by specifying when not to use it beyond intent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
send_message
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
- AlicenseNot gradedqualityDmaintenanceEnables posting text messages to Google Chat spaces using webhooks, providing simple integration without OAuth setup required.1MIT
- 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.328 npm3MIT
- AlicenseNot gradedqualityCmaintenanceEnables sending messages to DingTalk group chats through custom bot webhooks, supporting text, Markdown, images, news, and template card messages.1,616 npmMIT