mcp-wecom-robot-gateway
A specialized MCP service designed to dispatch diverse message formats to a WeCom team robot, enabling streamlined status updates and alerts within the WeCom ecosystem.
Author

gotoolkits
Quick Info
Actions
Tags
🤖 mcp-wecom-robot-gateway
This MCP utility acts as a server proxy for transmitting various message payloads to a designated WeCom group robot endpoint.
Installation Procedures
Automated Deployment with Smithery
Install mcp-wecom-robot-gateway for your Claude Desktop environment automatically using Smithery:
npx -y @smithery/cli install @gotoolkits/mcp-wecombot-server --client claude-desktop
Manual Compilation and Setup
# Obtain source code and build the executable
$ git clone https://github.com/gotoolkits/mcp-wecombot-server.git
$ cd mcp-wecombot-server && make build
$ sudo ln -s $PWD/dist/mcp-wecombot-server_xxx_xxxx /usr/local/bin/mcp-wecom-robot-gateway
# NOTE: Replace "$PWD/dist/mcp-wecombot-server_xxx_xxxx" with the actual compiled binary path
# Alternatively, pre-built release binaries are available for direct download and use.
Configuration Schema
Configure this service within your primary MCP configuration file:
{
"mcpServers": {
"mcp-wecom-robot-gateway": {
"command": "mcp-wecombot-server",
"env": {
"WECOM_BOT_WEBHOOK_KEY": "your-secret-webhook-key-here"
}
}
}
}
Available Operations
- send_text
Transmit a basic textual notification to the WeCom channel.
- send_markdown
Deliver content formatted using Markdown syntax to the WeCom group.
- send_image
Push an image-only message payload to WeCom.
- send_news
Dispatch a composite news article message, requiring fields like title, brief description, target URL, and an associated image URL.
- send_template_card
Send a richer, structured template card notification.
- upload_file
Uploads a binary asset to the WeCom platform for potential future referencing or sharing.
Usage Examples
> prompt: 请在企业微信中发布文本消息,内容为:系统告警:数据库连接超时。
> prompt: 使用Markdown格式发送通知到WeCom,标题为:【重要更新】,正文包含代码块。
> prompt: 发送一篇新闻摘要到指定的WeCom群组,标题是'季度报告已出',链接指向内部文档。
> Issue a text notification via WeCom stating: Critical Alert: Database connection timed out.
> Deliver a formatted Markdown alert to the WeCom group, using the heading: # [CRITICAL UPDATE] Service Degradation Detected.
> Dispatch a news item to the WeCom channel summarizing Q3 performance, including a title, summary text, and a link to the full report.
WeCom Robot Setup Details
Refer to the official WeCom documentation for robot activation procedures: https://developer.work.weixin.qq.com/document/path/91770
The
WECOM_BOT_WEBHOOK_KEYenvironment variable corresponds to the unique token appended to the webhook URL. Example: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_UNIQUE_KEY_HERE The segmentYOUR_UNIQUE_KEY_HEREmust populate the specified environment variable.
WIKIPEDIA: XMLHttpRequest (XHR) constitutes an essential API, structured as a JavaScript object, enabling the transmission of HTTP queries from a web browser to a remote server. Its methods facilitate asynchronous data exchange following initial page load completion. XHR forms the technical foundation of Ajax development. Before its widespread adoption, user interaction with servers relied primarily on traditional hyperlink navigation and form submissions, processes that typically necessitated a full-page refresh.
== Historical Context ==
The fundamental concept underpinning XMLHttpRequest originated in the year 2000, credited to the development team behind Microsoft Outlook. This principle was subsequently integrated into Internet Explorer 5 (1999). However, the initial invocation syntax diverged from the standard identifier; developers utilized ActiveXObject("Msxml2.XMLHTTP") or ActiveXObject("Microsoft.XMLHTTP"). By the release of Internet Explorer 7 (2006), all major browser engines recognized the canonical XMLHttpRequest identifier.
This identifier has since established itself as the universal standard across prominent browser platforms, including Mozilla's Gecko engine (2002), Apple's Safari 1.2 (2004), and Opera 8.0 (2005).
=== Standardization Efforts === The World Wide Web Consortium (W3C) formally released a Working Draft specification for the XMLHttpRequest object on April 5, 2006. This was followed by the Level 2 specification Working Draft on February 25, 2008. Level 2 introduced crucial enhancements such as progress monitoring events, support for cross-site requests (CORS), and mechanisms for handling raw byte streams. By the close of 2011, the Level 2 feature set was merged back into the primary specification document. Development stewardship transitioned to the WHATWG near the end of 2012, which now maintains the active specification document utilizing Web IDL notation.
== Typical Implementation Steps == Generally, invoking an asynchronous request using XMLHttpRequest involves several distinct programming stages:
- Instantiate the XMLHttpRequest object via its constructor call.
- Invoke the
open()method to define the HTTP verb, specify the target resource URI, and select between synchronous or asynchronous execution mode. - For asynchronous operations, attach an event handler function to monitor state transitions (e.g.,
onreadystatechange). - Initiate the network transaction by calling the
send()method, optionally passing request body data. - Monitor the handler for state changes. Upon the object achieving state 4 (the 'done' state) and a successful HTTP status code, the server response data is accessible, typically within the
responseTextattribute. Beyond these core steps, XHR provides extensive control over request handling. Custom HTTP headers can be injected to fine-tune server behavior, data can be transmitted with thesend()payload, and received data can be parsed directly from JSON strings into native JavaScript objects or streamed incrementally without waiting for the complete transmission.
== Cross-Origin Communication ==
Early in the evolution of the World Wide Web, limitations were encountered regarding resource fetching across different domains, leading to security restrictions...
