wecom-bot-mcp-server

v0.11.2
wecom-bot-mcp-server Checked 2 hours ago Published 4 months ago

WeCom Bot MCP Server - A Python server for WeCom (WeChat Work) bot following the Model Context Protocol (MCP)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

send_wecom_file

Send file to WeCom. Args: file_path: Path to the file to send bot_id: Bot identifier for multi-bot setups. If None, uses the default bot. Returns: dict: Response with file information and status Raises: WeComError: If file sending fails

ParameterTypeDescription
file_path *stringPath to the file to send. The file MUST be located within the allowed root directory (set via WECOM_MCP_ALLOWED_ROOT env var, defaults to the current working directory). Paths outside this directory a…
bot_idBot identifier for multi-bot setups. If not specified, uses the default bot. Use `list_wecom_bots` tool to see available bots.

send_wecom_image

Send image to WeCom. Args: image_path: Path to the image file to send bot_id: Bot identifier for multi-bot setups. If None, uses the default bot. Returns: dict: Response with image information and status Raises: WeComError: If image sending fails

ParameterTypeDescription
image_path *stringPath to the image file to send (local file path or HTTP(S) URL). For local paths, the file MUST be within the allowed root directory (set via WECOM_MCP_ALLOWED_ROOT env var, defaults to CWD). Paths ou…
bot_idBot identifier for multi-bot setups. If not specified, uses the default bot. Use `list_wecom_bots` tool to see available bots.

send_message

Send message to WeCom with optional @mentions. MENTION USERS: When users want to notify/remind/cc someone, convert their intent to <@userid> syntax: - "remind Zhang San" → Add <@zhangsan> in content, use msg_type='markdown' - "notify @alice and @bob" → Add <@alice> <@bob> in content, use msg_type='markdown' - "let everyone know" → Add <@all> in content, use msg_type='markdown' User ID conventions: - Chinese names → pinyin: "张三" → "zhangsan", "李四" → "lisi" - English names → lowercase: "Alice" → "alice" - Explicit usernames → preser…

ParameterTypeDescription
content *string
bot_idBot identifier for multi-bot setups. If not specified, uses the default bot. Use `list_wecom_bots` tool to see available bots. Example values: 'default', 'alert', 'ci', 'notify'
mentioned_listarrayList of user IDs to mention. Only effective for msg_type='text'. For markdown messages, use <@userid> syntax directly in content instead. User ID format: lowercase pinyin for Chinese names (e.g., 'zha…
mentioned_mobile_listarrayList of mobile numbers to mention. Only effective for msg_type='text'. Format: Phone numbers without country code (e.g., '13800138000').
msg_typestringMessage type. CRITICAL: Choose based on whether content contains @mentions: - 'markdown': MUST use when content contains <@userid> mentions (e.g., <@zhangsan>). Also use for <font color='...'>text</fo…

send_wecom_template_card_text_notice

MCP tool wrapper for sending a text_notice template card. The structure of the template card fields follows the WeCom template_card documentation and notify-bridge examples.

ParameterTypeDescription
template_card_card_action *objectPrimary click action for the card.
template_card_main_title *objectMain title and description for the card.
template_card_source *objectSource info for the card (icon_url, desc, desc_color, etc.)
bot_idBot identifier for multi-bot setups. If not specified, uses the default bot. Use `list_wecom_bots` tool to see available bots.
template_card_emphasis_contentEmphasised numeric content area.
template_card_horizontal_content_listHorizontal content items.
template_card_jump_listJump (link) buttons.
template_card_quote_areaQuote area configuration.
template_card_sub_title_textSubtitle text under the main title.

send_wecom_template_card_news_notice

MCP tool wrapper for sending a news_notice template card.

ParameterTypeDescription
template_card_card_action *objectPrimary click action for the card.
template_card_main_title *objectMain title and description for the card.
template_card_source *objectSource info for the card (icon_url, desc, desc_color, etc.)
bot_idBot identifier for multi-bot setups. If not specified, uses the default bot. Use `list_wecom_bots` tool to see available bots.
template_card_horizontal_content_listHorizontal content items.
template_card_imageMain image configuration for the news_notice card. Should contain 'url' and optionally 'aspect_ratio'.
template_card_image_text_areaImage text area configuration. Should contain 'image_url', 'title', 'desc', etc.
template_card_jump_listJump (link) buttons.
template_card_quote_areaQuote area configuration.
template_card_vertical_content_listVertical content items.

list_wecom_bots

List all configured WeCom bots. Use this tool to discover available bots before sending messages. Each bot has an id, name, and optional description. Returns: dict: Contains 'bots' list and 'count' of available bots. Each bot entry has: id, name, description, has_webhook