返回 MCP 目录
public公开dns本地运行

mcp-wecombot-server

一个向企业微信群机器人发送多种消息的MCP服务端应用

article

README

🚀 mcp-wecombot-server 服务器

一个 MCP 服务器应用程序,可向 WeCom 群机器人发送各种类型的消息,为信息传递提供了便捷的解决方案。

smithery 徽数

🚀 快速开始

本项目是一个 MCP 服务器应用程序,主要用于向 WeCom 群机器人发送各类消息,为信息的及时传递提供了便利。

📦 安装指南

使用 Smithery 进行安装

通过 Smithery 可自动为 Claude Desktop 安装 mcp-wecombot-server,执行以下命令:

npx -y @smithery/cli install @gotoolkits/mcp-wecombot-server --client claude-desktop

手动安装

# 克隆仓库并构建
$ git clone https://github.com/gotoolkits/mcp-wecombot-server.git
$ cd mcp-wecombot-server && make build
$ sudo ln -s $PWD/dist/mcp-wecombot-server_xxx_xxxx /usr/local/bin/mcp-wecombot-server

# 注意:将 "$PWD/dist/mcp-wecombot-server_xxx_xxxx" 替换为实际的二进制文件名

# 您也可以下载并使用预编译的发布版本包。

📚 详细文档

配置示例

{
  "mcpServers": {
    "mcp-wecombot-server": {
      "command": "mcp-wecombot-server",
      "env": {
        "WECOM_BOT_WEBHOOK_KEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
      }
    }
  }
}

功能使用说明

  • send_text:向 WeCom 群发送一条文本消息。
  • send_markdown:向 WeCom 群发送一条 Markdown 格式的消息。
  • send_image:向 WeCom 群发送一张图片消息。
  • send_news:向 WeCom 群发送一条新闻消息,包括标题、描述、链接和图片地址。
  • send_template_card:向 WeCom 群发送一条模板卡片消息。
  • upload_file:将文件上传到 WeCom 服务器。

WeCom 机器人配置说明

WeCom 群机器人配置指南请参考: https://developer.work.weixin.qq.com/document/path/91770

⚠️ 重要提示

WECOM_BOT_WEBHOOK_KEY 是您的 WeCom 机器人 Webhook 唯一标识符。
例如:
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa
其中,693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa 是您自己的 WeCom 机器人 Webhook Key。

💻 使用示例

基础用法

> 提示:请在 WeCom 发送一条文本消息,内容为:这是一条测试消息。
> 提示:请在 WeCom 发送一条 Markdown 消息,内容为:# 这是一条测试 Markdown 消息。
> 提示:请在 WeCom 发送一条图文消息,标题为:这是一条图文消息,描述为:这是一条图文消息,链接为:https://github.com/gotoolkits,图片地址为:https://img-blog.csdnimg.cn/fcc22710385e4edabccf2451d5f64a99.jpeg。

> Send me a text message on WeCom with the content: This is a test message.
> Send me a Markdown message on WeCom with the content: # This is a test Markdown message
> Send me a graphic message on WeCom with the title: This is a graphic message, description: This is a graphic message, link: https://github.com/gotoolkits, and image: https://img-blog.csdnimg.cn/fcc22710385e4edabccf2451d5f64a99.jpeg
help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端