
微信机器人MCP服务器
适用于 WeCom(企业微信)机器人的模型上下文协议 (MCP) 兼容服务器实现。
特征
支持多种消息类型:
短信
Markdown 消息
图片消息(base64)
文件消息
@mention 支持(通过用户 ID 或电话号码)
消息历史追踪
可配置的日志系统
完整类型注释
基于 Pydantic 的数据验证
要求
Python 3.10+
WeCom Bot Webhook URL(从 WeCom 群设置中获取)
安装
安装 WeCom Bot MCP Server 有以下几种方式:
1.自动安装(推荐)
使用 Smithery(适用于 Claude Desktop):
使用带有 Cline 扩展的 VSCode:
从 VSCode 市场安装Cline 扩展
打开命令面板(Ctrl+Shift+P / Cmd+Shift+P)
搜索“Cline:安装包”
输入“wecom-bot-mcp-server”并按 Enter 键
2.手动安装
从 PyPI 安装:
手动配置 MCP:
创建或更新您的 MCP 配置文件:
配置
设置环境变量
日志管理
日志系统使用platformdirs.user_log_dir()进行跨平台日志文件管理:
Windows:
C:\Users\<username>\AppData\Local\hal\wecom-bot-mcp-serverLinux:
~/.local/share/hal/wecom-bot-mcp-servermacOS:
~/Library/Application Support/hal/wecom-bot-mcp-server
日志文件名为mcp_wecom.log ,存储在上述目录中。
用法
启动服务器
使用示例(使用 MCP)
直接使用 API
发送消息
发送文件
发送图像
发展
设置开发环境
克隆存储库:
创建虚拟环境并安装依赖项:
测试
代码风格
构建和发布
项目结构
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
接触
作者:longhao
电子邮件: hal.long@outlook.com
This server cannot be installed
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.
使用 FastMCP 实现微信机器人消息发送的服务器,支持异步通信和通过 webhook 进行消息跟踪。
Related Resources
Related MCP Servers
- -security-license-qualityAn MCP server that enables communication with users through Telegram. This server provides a tool to ask questions to users and receive their responses via a Telegram bot.Last updated -838
- Asecurity-licenseAqualityEnables sending messages to webhook endpoints through the MCP protocol, supporting custom content, display names, and avatar URLs.Last updated -4223MIT License
- Asecurity-licenseAqualityAn MCP server that enables posting messages to Discord webhooks, allowing customization of content, username, and avatar URL.Last updated -1MIT License
- -security-license-qualityA simple Meta-agent Communication Protocol server built with FastMCP framework that provides 'echo' and 'dummy' tools via Server-Sent Events for demonstration and testing purposes.Last updated -