WeCom Bot

Provides a WeCom bot MCP server that sends messages via webhook and supports message history.
  • python

2

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcp-mirror-loonghao_wecom-bot-mcp-server": {
      "command": "wecom-bot-mcp-server",
      "args": [],
      "env": {
        "WECOM_WEBHOOK_URL": "<your WeCom bot webhook URL>"
      }
    }
  }
}

You can run a lightweight MCP server that sends messages to WeCom using a dedicated CLI. This server handles message delivery via webhook, supports Markdown formatting, and tracks history for you to review later. It’s easy to deploy and integrates with your existing MCP clients.

How to use

Install and run the server, then use your MCP client to send messages and fetch history. You provide the WeCom webhook URL as an environment variable, start the server, and then call the server’s functions to send messages or retrieve history.

How to install

Prerequisites you need before installing:

  • Python 3.10 or newer
  • pip (for installing packages)
  • poetry (optional but recommended for dependency management)

Steps to install and prepare the server:

pip install wecom-bot-mcp-server

Or, using poetry (recommended):

poetry add wecom-bot-mcp-server

Cline configuration and usage

Configure the Cline MCP settings so your editor can start and manage the MCP server directly from VSCode.

{
  "mcpServers": {
    "wecom-bot-server": {
      "command": "wecom-bot-mcp-server",
      "args": [],
      "env": {
        "WECOM_WEBHOOK_URL": "<your WeCom bot webhook URL>"
      },
      "alwaysAllow": [
        "send_message"
      ],
      "disabled": false
    }
  }
}

Additional usage notes

Environment variable you must set before starting the server is the webhook URL for your WeCom bot. Start the server after setting the environment variable, then you can send messages and fetch message history from your MCP client.

Development and tooling

When developing locally, you can install dependencies and run tests to ensure quality and compatibility.

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

Example usage from code

Send a message and retrieve history using the programmatic API.

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()

Available tools

send_message

Sends a message to WeCom via the MCP server. Accepts a string and forwards it to the webhook asynchronously.

get_message_history

Retrieves the history of messages sent through the MCP server.

main

Entry point to start the MCP server when running as a script.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational