Metadata-Version: 2.4
Name: wecom-crm-mcp
Version: 0.1.0
Summary: WeCom (Enterprise WeChat) External Contact MCP Server — a Python SDK and Model Context Protocol server covering the full 客户联系 API surface: customers, tags, group chats, moments, mass messaging, transfer-on-handover, statistics.
Project-URL: Homepage, https://github.com/andyleimc-source/wecom-crm-mcp
Project-URL: Repository, https://github.com/andyleimc-source/wecom-crm-mcp
Project-URL: Issues, https://github.com/andyleimc-source/wecom-crm-mcp/issues
Project-URL: Documentation, https://github.com/andyleimc-source/wecom-crm-mcp#readme
Author-email: Andy Lei <andy.lei@nocoly.com>
License: MIT
License-File: LICENSE
Keywords: crm,external-contact,llm,mcp,model-context-protocol,wechat-work,wecom,企业微信,客户联系
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: diskcache>=5.6
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=1.2
Requires-Dist: pydantic>=2.6
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# wecom-crm-mcp

WeCom (企业微信) **客户联系 / External Contact** MCP Server — Python SDK + Model Context Protocol server covering the full customer-contact API surface.

## Why

GitHub has plenty of WeCom **group-bot webhook** MCP servers, but none covers the full 客户联系 API: customer management, tags, group chats, customer moments (朋友圈), mass-send (群发), transfer-on-handover, statistics. This does.

## Coverage

11 modules, mapping 1:1 to the [official 客户联系 docs](https://developer.work.weixin.qq.com/document/path/90664):

| Module | MCP tool | What it does |
|---|---|---|
| 客户管理 | `wecom_customer` | list / get / batch_get / remark |
| 客户标签 | `wecom_tag` | list / create / edit / delete / mark |
| 在职继承 | `wecom_transfer_active` | transfer customers/groups between active employees |
| 离职继承 | `wecom_transfer_resigned` | reassign resigned employees' customers/groups |
| 客户群 | `wecom_group_chat` | list / detail / opengid convert |
| 联系我 / 入群 | `wecom_contact_way` | manage 「联系我」 and 「加入群聊」 QR codes |
| 客户朋友圈 | `wecom_moment` | publish / cancel / list moments |
| 获客助手 | `wecom_acquisition` | acquisition links / quota / stats |
| 消息推送 | `wecom_msg_template` | mass-send / welcome / group-welcome |
| 统计管理 | `wecom_statistics` | follow / group-chat data |
| 附加功能 | `wecom_misc` | media upload / product album / sensitive words |

Plus two helpers: `wecom_upload_media` and `wecom_describe_action`.

## Install

```bash
pip install wecom-crm-mcp
```

## Configure

```bash
export WECOM_CORPID=ww...
export WECOM_CORPSECRET=...       # the External Contact secret, not app secret
export WECOM_AGENTID=1000001       # optional, needed for mass-send
```

Claude Desktop / Claude Code `~/.claude.json`:

```json
{
  "mcpServers": {
    "wecom-crm": {
      "command": "wecom-crm-mcp",
      "env": {
        "WECOM_CORPID": "ww...",
        "WECOM_CORPSECRET": "..."
      }
    }
  }
}
```

## Example

```
User: 帮我给所有带 "VIP" 标签的客户发一条朋友圈，内容"春节快乐"
Claude: [calls wecom_tag action=list] [wecom_customer action=batch_get]
        [wecom_upload_media] [wecom_moment action=add_moment_task]
```

## License

MIT
