- WeCom Bot MCP Server
Content
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
Installation
Using pip:
pip install wecom-bot-mcp-server
Or using poetry (recommended):
poetry add wecom-bot-mcp-server
Usage
- Set environment variable:
# Windows PowerShell
$env:WECOM_WEBHOOK_URL="your WeCom bot webhook URL"
# Linux/macOS
export WECOM_WEBHOOK_URL="your WeCom bot webhook URL"
- Run the server:
# Run directly after installation
wecom-bot-mcp-server
Or use in code:
from wecom_bot_mcp_server.server import main
# Start server
if __name__ == "__main__":
main()
- Send messages:
from wecom_bot_mcp_server.server import send_message, get_message_history
# Send a message
await send_message("Hello, WeCom!")
# Get message history
history = get_message_history()
Cline Configuration
- Install dependency:
poetry add wecom-bot-mcp-server
- 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:
{
"mcpServers": {
"wecom-bot-server": {
"command": "wecom-bot-mcp-server",
"args": [],
"env": {
"WECOM_WEBHOOK_URL": "<your WeCom bot webhook URL>"
},
"alwaysAllow": [
"send_message"
],
"disabled": false
}
}
}
Configuration notes:
command: Uses the installed command-line toolenv.WECOM_WEBHOOK_URL: Replace with your actual WeCom bot webhook URL
Development
- Clone repository:
git clone https://github.com/loonghao/wecom-bot-mcp-server.git
cd wecom-bot-mcp-server
- Install poetry and dependencies:
pip install poetry
poetry install --with dev
- Run tests:
poetry run pytest tests/ --cov=wecom_bot_mcp_server
- Code checks:
poetry run ruff check .
poetry run ruff format .
poetry run mypy src/wecom_bot_mcp_server --strict
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 安装:
pip install wecom-bot-mcp-server
或者使用 poetry 安装(推荐):
poetry add wecom-bot-mcp-server
使用方法
- 设置环境变量:
# Windows PowerShell
$env:WECOM_WEBHOOK_URL="你的企业微信机器人 Webhook URL"
# Linux/macOS
export WECOM_WEBHOOK_URL="你的企业微信机器人 Webhook URL"
- 运行服务器:
# 安装后可以直接运行命令
wecom-bot-mcp-server
或者在代码中使用:
from wecom_bot_mcp_server.server import main
# 启动服务器
if __name__ == "__main__":
main()
- 发送消息:
from wecom_bot_mcp_server.server import send_message, get_message_history
# 发送消息
await send_message("Hello, WeCom!")
# 获取消息历史
history = get_message_history()
在 Cline 中配置
- 安装依赖:
poetry add wecom-bot-mcp-server
- 配置 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
添加以下配置:
{
"mcpServers": {
"wecom-bot-server": {
"command": "wecom-bot-mcp-server",
"args": [],
"env": {
"WECOM_WEBHOOK_URL": "<你的企业微信机器人Webhook URL>"
},
"alwaysAllow": [
"send_message"
],
"disabled": false
}
}
}
配置说明:
command: 使用安装后的命令行工具env.WECOM_WEBHOOK_URL: 替换为你的企业微信机器人实际的 Webhook URL
开发
- 克隆仓库:
git clone https://github.com/loonghao/wecom-bot-mcp-server.git
cd wecom-bot-mcp-server
- 安装 poetry 和依赖:
pip install poetry
poetry install --with dev
- 运行测试:
poetry run pytest tests/ --cov=wecom_bot_mcp_server
- 代码检查:
poetry run ruff check .
poetry run ruff format .
poetry run mypy src/wecom_bot_mcp_server --strict
要求
- Python >= 3.10
- FastMCP >= 0.4.1
- httpx >= 0.24.1
许可证
贡献
欢迎提交 Issue 和 Pull Request!
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Playwright McpPlaywright MCP server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server