WeCom Bot MCP Server
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Provides a Model Context Protocol (MCP) server implementation for WeCom (WeChat Work) bot, enabling sending of text, markdown, image and file messages to WeCom groups, with support for @mentions and message history tracking.
WeCom Bot MCP Server
A Model Context Protocol (MCP) compliant server implementation for WeCom (WeChat Work) bot.
Features
- Support for multiple message types:
- Text messages
- Markdown messages
- Image messages (base64)
- File messages
- @mention support (via user ID or phone number)
- Message history tracking
- Configurable logging system
- Full type annotations
- Pydantic-based data validation
Requirements
- Python 3.10+
- WeCom Bot Webhook URL (obtained from WeCom group settings)
Installation
There are several ways to install WeCom Bot MCP Server:
1. Automated Installation (Recommended)
Using Smithery (For Claude Desktop):
Using VSCode with Cline Extension:
- Install Cline Extension from VSCode marketplace
- Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Search for "Cline: Install Package"
- Type "wecom-bot-mcp-server" and press Enter
2. Manual Installation
Install from PyPI:
Configure MCP manually:
Create or update your MCP configuration file:
Configuration
Setting Environment Variables
Log Management
The logging system uses platformdirs.user_log_dir()
for cross-platform log file management:
- Windows:
C:\Users\<username>\AppData\Local\hal\wecom-bot-mcp-server
- Linux:
~/.local/share/hal/wecom-bot-mcp-server
- macOS:
~/Library/Application Support/hal/wecom-bot-mcp-server
The log file is named mcp_wecom.log
and is stored in the above directory.
Usage
Starting the Server
Usage Examples (With MCP)
Direct API Usage
Send Messages
Send Files
Send Images
Development
Setup Development Environment
- Clone the repository:
- Create a virtual environment and install dependencies:
Testing
Code Style
Building and Publishing
Project Structure
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
- Author: longhao
- Email: hal.long@outlook.com
This server cannot be installed
A server for sending messages via WeCom bots using FastMCP, supporting asynchronous communication and message tracking through webhooks.