WeCom Bot MCP Server
WeCom Bot MCP Server
A WeCom (WeChat Work) bot server implemented with FastMCP, supporting message sending via webhook.
中文文档 | English
Features
- Built on FastMCP framework
- Markdown message format support
- Asynchronous message sending
- Message history tracking
- Complete type hints
- Comprehensive unit tests
<a href="https://glama.ai/mcp/servers/amr2j23lbk"><img width="380" height="200" src="https://glama.ai/mcp/servers/amr2j23lbk/badge" alt="WeCom Bot Server MCP server" /></a>
Installation
Using pip:
Or using poetry (recommended):
Usage
- Set environment variable:
- Run the server:
Or use in code:
- Send messages:
Cline Configuration
- Install dependency:
- Configure Cline MCP settings:
Configure the Cline MCP settings file in VSCode. File location:
- Windows:
%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
- Linux:
~/.config/Code/User/globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
- macOS:
~/Library/Application Support/Code/User/globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
Add the following configuration:
Configuration notes:
command
: Uses the installed command-line toolenv.WECOM_WEBHOOK_URL
: Replace with your actual WeCom bot webhook URL
Development
- Clone repository:
- Install poetry and dependencies:
- Run tests:
- Code checks:
Requirements
- Python >= 3.10
- FastMCP >= 0.4.1
- httpx >= 0.24.1
License
Contributing
Issues and Pull Requests are welcome!
WeCom Bot MCP Server (中文)
English | 中文
特性
- 基于 FastMCP 框架实现
- 支持 Markdown 格式消息
- 异步消息发送
- 消息历史记录
- 完整的类型提示
- 全面的单元测试
安装
使用 pip 安装:
或者使用 poetry 安装(推荐):
使用方法
- 设置环境变量:
- 运行服务器:
或者在代码中使用:
- 发送消息:
在 Cline 中配置
- 安装依赖:
- 配置 Cline MCP 设置:
在 VSCode 中,需要配置 Cline MCP 设置文件。文件位置:
- Windows:
%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
- Linux:
~/.config/Code/User/globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
- macOS:
~/Library/Application Support/Code/User/globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
添加以下配置:
配置说明:
command
: 使用安装后的命令行工具env.WECOM_WEBHOOK_URL
: 替换为你的企业微信机器人实际的 Webhook URL
开发
- 克隆仓库:
- 安装 poetry 和依赖:
- 运行测试:
- 代码检查:
要求
- Python >= 3.10
- FastMCP >= 0.4.1
- httpx >= 0.24.1
许可证
贡献
欢迎提交 Issue 和 Pull Request!
A server for sending messages via WeCom bots using FastMCP, supporting asynchronous communication and message tracking through webhooks.