Skip to content

WeCom Bot MCP Server企业微信机器人 AI 助手

一个遵循 Model Context Protocol (MCP) 的企业微信机器人服务器

WeCom Bot Logo

快速安装

bash
npx -y @smithery/cli install wecom-bot-mcp-server --client claude
bash
pip install wecom-bot-mcp-server
bash
uvx wecom-bot-mcp-server

基本配置

json
{
  "mcpServers": {
    "wecom": {
      "command": "uvx",
      "args": ["wecom-bot-mcp-server"],
      "env": {
        "WECOM_WEBHOOK_URL": "your-webhook-url"
      }
    }
  }
}

多机器人配置

配置多个机器人用于不同用途(告警、CI/CD、团队通知):

json
{
  "mcpServers": {
    "wecom": {
      "command": "uvx",
      "args": ["wecom-bot-mcp-server"],
      "env": {
        "WECOM_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=default",
        "WECOM_BOTS": "{\"alert\": {\"name\": \"告警机器人\", \"webhook_url\": \"https://...?key=alert\"}, \"ci\": {\"name\": \"CI 机器人\", \"webhook_url\": \"https://...?key=ci\"}}"
      }
    }
  }
}
bash
# JSON 配置(推荐)
export WECOM_BOTS='{
  "alert": {"name": "告警机器人", "webhook_url": "https://...?key=alert"},
  "ci": {"name": "CI 机器人", "webhook_url": "https://...?key=ci"}
}'

# 或使用独立变量
export WECOM_BOT_ALERT_URL="https://...?key=alert"
export WECOM_BOT_CI_URL="https://...?key=ci"

JSON 转义工具

WECOM_BOTS 的值需要进行 JSON 转义。可使用以下在线工具转换:

使用 list_wecom_bots 工具查看所有已配置的机器人。了解更多 →

Released under the MIT License.