WeCom MCP完全指南 — 消息、日程、文档、通讯录一站式搞定
企业微信(WeCom)是中国企业最常用的办公通讯工具之一。OpenClaw通过MCP Server深度集成了企业微信,让你的AI Agent可以直接在企业微信里发消息、管日程、查通讯录、处理审批。
OpenClaw Agent
↓ (MCP Protocol)
WeCom MCP Server
↓ (企业微信API)
企业微信客户端 ← 员工看到的消息/日程/文档
| 分类 | 工具 | 功能 |
|---|---|---|
| 消息 | wecom_mcp (list call) | 发送文本/图片/文件消息 |
| wecom-msg | 消息管理Skill | |
| wecom-contact | 通讯录查询 | |
| 日程 | wecom-schedule | 日程管理 |
| wecom-meeting | 会议安排 | |
| 文档 | wecom-doc | 文档协作 |
| 任务 | wecom-todo | 待办事项 |
| 表格 | wecom-smartsheet | 智能表格 |
// 发送文本消息
wecom_mcp({
action: "call",
category: "msg",
method: "sendText",
args: {
chatId: "群聊ID",
content: "今日SEO报告:新增页面8个,收录率提升12%"
}
})
// 发送Markdown消息
wecom_mcp({
action: "call",
category: "msg",
method: "sendMarkdown",
args: {
chatId: "群聊ID",
content: "# 今日数据\n- 新增页面: 8\n- 收录率: +12%\n- 流量: +5.3%"
}
})
// 直接发送到企业微信
message({
action: "send",
channel: "wecom",
target: "群聊ID或用户ID",
message: "今日SEO报告已完成,请查看"
})
// 列出MCP通讯录工具
wecom_mcp({
action: "list",
category: "contact"
})
// 查询用户信息
wecom_mcp({
action: "call",
category: "contact",
method: "getContact",
args: { userId: "用户ID" }
})
// 搜索用户
wecom_mcp({
action: "call",
category: "contact",
method: "searchUser",
args: { keyword: "张三" }
})
// 创建会议
wecom_mcp({
action: "call",
category: "meeting",
method: "create",
args: {
title: "AI Agent周会",
startTime: "2026-06-13T10:00:00+08:00",
endTime: "2026-06-13T11:00:00+08:00",
attendees: ["user1", "user2", "user3"]
}
})
// 查询日程
wecom_mcp({
action: "call",
category: "schedule",
method: "list",
args: {
startTime: "2026-06-12T00:00:00+08:00",
endTime: "2026-06-12T23:59:59+08:00"
}
})
// 创建文档
wecom_mcp({
action: "call",
category: "doc",
method: "create",
args: {
title: "OpenClaw部署文档",
content: "# 部署步骤\n1. 安装依赖\n2. 配置环境\n3. 启动服务"
}
})
// 查询文档列表
wecom_mcp({
action: "call",
category: "doc",
method: "list",
args: {}
})
// 创建待办
wecom_mcp({
action: "call",
category: "todo",
method: "create",
args: {
title: "完成SEO巡检报告",
dueDate: "2026-06-13",
assignee: "user1"
}
})
// 完成待办
wecom_mcp({
action: "call",
category: "todo",
method: "complete",
args: { taskId: "task_id" }
})
// 结合cron定时任务
// 每天18:00自动发送日报到企业微信群
cron({
action: "add",
job: {
name: "wecom-daily-report",
schedule: { kind: "cron", expr: "0 18 * * *", tz: "Asia/Shanghai" },
sessionTarget: "isolated",
payload: {
kind: "agentTurn",
message: "生成今日营销数据报告并发送到企业微信群"
}
}
})
// 监控网站状态,异常时发送告警
// Agent定期检查 → 发现异常 → 企业微信通知负责人