mcp-wecombot-server
by: gotoolkits
An MCP server application that sends various types of messages to the WeCom group robot.
📌Overview
Purpose: The mcp-wecombot-server aims to facilitate communication by sending various message types to WeCom group robots.
Overview: mcp-wecombot-server is a server application designed for seamless integration with WeCom, allowing users to send different types of messages directly to group chats. It supports features such as text, markdown, images, and news messages, enhancing group communications on the WeCom platform.
Key Features:
-
Send Text Messages: Enables users to send simple text messages to WeCom groups, providing a straightforward way to communicate.
-
Send Markdown Messages: Supports markdown formatting for messages, allowing users to present information in a structured and visually appealing way.
-
Send Image Messages: Allows the transmission of image messages, enhancing the visual aspect of group communications.
-
Send News Messages: Provides the ability to share news items that include title, description, URL, and image, keeping group members informed with rich content.
-
Send Template Card Messages: Facilitates the sending of template card messages for more complex information presentation.
-
Upload Files: Allows users to upload files to WeCom, enabling easy sharing of documents and resources within groups.
🚀 mcp-wecombot-server
An MCP server application that sends various types of messages to the WeCom group robot.
Installation
Installing via Smithery
To install mcp-wecombot-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @gotoolkits/mcp-wecombot-server --client claude-desktop
Manual Installation
# Clone the repo and build
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
# Replace "$PWD/dist/mcp-wecombot-server_xxx_xxxx" with the actual binary file name
# You can also download and use the pre-compiled release binary package.
Configuration
{
"mcpServers": {
"mcp-wecombot-server": {
"command": "mcp-wecombot-server",
"env": {
"WECOM_BOT_WEBHOOK_KEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
}
}
}
}
Usage
-
send_text
Send a text message to WeCom group -
send_markdown
Send a markdown message to WeCom group -
send_image
Send an image message to WeCom group -
send_news
Send a news message to WeCom group, including title, description, URL, and pic URL -
send_template_card
Send a template card message to WeCom group -
upload_file
Upload a file to WeCom
Samples
> prompt: 给我在WeCom发送一条文本消息,消息内容为:这是一条测试消息
> prompt: 给我在WeCom发送一条markdown消息,消息内容为:# 这是一条测试 Markdown 消息
> prompt: 给我在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, the description: This is a graphic message, the link: https://github.com/gotoolkits, and the image: https://img-blog.csdnimg.cn/fcc22710385e4edabccf2451d5f64a99.jpeg
WeCom Robot
WeCom group robot configuration guide can be referred to:
https://developer.work.weixin.qq.com/document/path/91770
WECOM_BOT_WEBHOOK_KEY
is the robot webhook key.
Example webhook URL:
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa
The string afterkey=
is your ownWECOM_BOT_WEBHOOK_KEY
.