The MCP-WeCom Bot Server enables sending various types of messages to WeCom groups through a robot webhook. This tool simplifies the integration between your applications and WeCom (WeChat Work) by providing a standardized interface for sending text, markdown, image, news, and template card messages.
For Claude Desktop users, the easiest way to install is through Smithery:
npx -y @smithery/cli install @gotoolkits/mcp-wecombot-server --client claude-desktop
To install manually:
# Clone the repository
git clone https://github.com/gotoolkits/mcp-wecombot-server.git
# Navigate to the directory and build
cd mcp-wecombot-server && make build
# Create a symlink to make the command available system-wide
sudo ln -s $PWD/dist/mcp-wecombot-server_xxx_xxxx /usr/local/bin/mcp-wecombot-server
Note: Replace $PWD/dist/mcp-wecombot-server_xxx_xxxx
with the actual binary filename generated during the build process.
Alternatively, you can download and use the pre-compiled binary from the releases page.
Create a configuration file for the MCP server with your WeCom robot webhook key:
{
"mcpServers": {
"mcp-wecombot-server": {
"command": "mcp-wecombot-server",
"env": {
"WECOM_BOT_WEBHOOK_KEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
}
}
}
}
Important: You need to replace the WECOM_BOT_WEBHOOK_KEY
value with your own webhook key from WeCom.
The server supports several message types that can be sent to WeCom groups:
Send simple text messages to your WeCom group:
prompt: 给我在WeCom发送一条文本消息,消息内容为:这是一条测试消息
or in English:
prompt: Send me a text message on WeCom with the content: This is a test message.
Send formatted markdown messages:
prompt: 给我在WeCom发送一条markdown消息,消息内容为:# 这是一条测试 Markdown 消息
or in English:
prompt: Send me a Markdown message on WeCom with the content: # This is a test Markdown message
Send news-style messages with title, description, URL, and image:
prompt: 给我在WeCom发送一条图文消息,图文标题为:这是一条图文消息,图文描述为:这是一条图文消息,图文链接为:https://github.com/gotoolkits,图文图片为:https://img-blog.csdnimg.cn/fcc22710385e4edabccf2451d5f64a99.jpeg
or in English:
prompt: 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
To use this server, you'll need to set up a WeCom group robot first:
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa
key=
) and use it as your WECOM_BOT_WEBHOOK_KEY
in the configuration.To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-wecombot-server" '{"command":"mcp-wecombot-server","env":{"WECOM_BOT_WEBHOOK_KEY":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-wecombot-server": {
"command": "mcp-wecombot-server",
"env": {
"WECOM_BOT_WEBHOOK_KEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-wecombot-server": {
"command": "mcp-wecombot-server",
"env": {
"WECOM_BOT_WEBHOOK_KEY": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect