wecom-msg-audit-mcp
Integrates with Cloudflare R2 for automatic upload of media files (images) from chat messages, providing pre-signed URLs for access.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wecom-msg-audit-mcpSearch recent messages for 'invoice'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
wecom-msg-audit-mcp
企业微信会话内容存档 MCP 服务:拉取、解密并查询聊天记录,让 AI Agent 拥有合规可审计的会话访问能力。
特性
🔌 MCP 协议:基于 FastMCP 暴露工具,兼容 Cursor、Claude Desktop、Cline 等 MCP 客户端
🔐 完整解密链路:封装企业微信官方
libWeWorkFinanceSdk_C.so,自动处理 RSA 私钥解密 + SDK 对称解密📨 多种消息类型:支持文本、图片、视频、语音、文件、链接、位置、名片、表情、视频号、混排等
🗂️ 本地检索:解密结果持久化为 JSONL,支持按群、发送者、消息类型、关键词查询与分页
👥 群资料查询:自动识别内部群 / 外部客户群,补全群名称、成员列表
☁️ 媒体上传:图片自动上传到 Cloudflare R2 并返回预签名链接(其他文件保存到本地)
🛡️ Bearer 鉴权:内置 Token 校验,支持
stdio/http两种传输
Related MCP server: wechat-mcp
架构
┌────────────────────┐
│ MCP 客户端 │
│ (Cursor / Claude) │
└─────────┬──────────┘
│ MCP (stdio / http + Bearer)
▼
┌────────────────────┐
│ mcp_server.py │ FastMCP 工具定义
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ wecom_core.py │ 配置 / 业务逻辑
└─────────┬──────────┘
│ ctypes
▼
┌────────────────────┐ ┌──────────────┐
│ libWeWorkFinance │◄──►│ 企业微信 API │
│ SDK_C.so (官方) │ └──────────────┘
└────────────────────┘快速开始
1. 前置条件
拉取会话内容需要先在企业微信管理后台(work.weixin.qq.com)开启会话存档功能。开启方式和 API 参数说明见企业微信开发者文档。
Python 3.11+
企业微信会话内容存档权限:登录 管理后台 → 安全与管理 → 管理工具 → 会话内容存档
企业微信官方 SDK:libWeWorkFinanceSdk_C.so(需自行从开放平台下载)
RSA 私钥:在管理后台「会话内容存档」页面上传公钥,私钥用
openssl在本地生成(不要使用任何在线生成工具,避免私钥外泄):# 生成 2048 位 RSA 私钥(兼容企业微信会话存档) openssl genrsa -out private_key.pem 2048 # 提取对应公钥,上传到管理后台 openssl rsa -in private_key.pem -pubout -out public_key.pem
2. 安装
git clone https://github.com/deadmau5v/wecom-msg-audit-mcp.git
cd wecom-msg-audit-mcp
# 推荐使用 uv
uv sync
# 或使用 pip
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt将官方 SDK 文件 libWeWorkFinanceSdk_C.so 放置到项目根目录(或在 .env 中自定义 SDK_LIB_PATH)。
3. 配置
cp .env.example .env
# 编辑 .env,填入企业 ID、Secret、私钥路径等4. 启动
作为 MCP 服务(推荐)
# stdio 模式(默认)
uv run python mcp_server.py
# http 模式(带 Bearer 鉴权)
MCP_TRANSPORT=http MCP_PORT=8331 uv run python mcp_server.py然后在 MCP 客户端配置中接入:
{
"mcpServers": {
"wecom": {
"command": "uv",
"args": ["run", "python", "mcp_server.py"],
"cwd": "/path/to/wecom-msg-audit-mcp"
}
}
}作为 CLI 拉取
uv run python main.py输出解密后的消息到 stdout,并增量追加到 wecom_messages.jsonl。
配置项
所有配置通过环境变量(或 .env 文件)注入,禁止硬编码到代码中。
变量 | 必填 | 说明 |
| ✅ | 企业 ID(我的企业 → 企业信息) |
| ✅ | 会话内容存档 Secret(不是普通应用 Secret) |
| ⬜ | 客户联系可调用应用 Secret(用于外部客户群) |
| ⬜ | SDK 动态库路径,默认 |
| ⬜ | RSA 私钥路径,默认 |
| ⬜ | seq 进度文件,默认 |
| ⬜ | 解密消息输出文件,默认 |
| ⬜ | 单次拉取条数,1-1000,默认 |
| ⬜ | SDK 请求超时(秒),默认 |
| ⬜ | 代理与代理密码(按需) |
| ⬜ | Cloudflare R2 端点,例: |
| ⬜ | R2 存储桶(若已包含在 endpoint 路径中可省略) |
| ⬜ | 自定义访问域名(用于预签名 URL 替换) |
| ⬜ | 兼容字段(当前未使用,可保留) |
| ⬜ | R2 S3 兼容 AccessKey |
| ⬜ | HTTP 模式下的 Bearer 鉴权 Token,留空则自动生成 |
| ⬜ |
|
| ⬜ | HTTP 模式监听地址,默认 |
完整示例见 .env.example。
MCP 工具一览
工具 | 用途 |
| 检查服务就绪状态(各能力是否可用) |
| 从当前 seq 拉取并解密新消息 |
| 查看 / 重置拉取进度 |
| 按群、发送者、类型、关键词检索本地消息 |
| 从本地消息中提取所有群聊 roomid |
| 查询群聊详情(内部 / 外部自动判定) |
| 列出外部客户群 |
| 下载 / 上传消息中的媒体文件 |
示例:让 Agent 拉取并搜索
User: 帮我拉取最近的聊天记录,搜索包含"发票"的消息
Agent: 调用 wecom_pull_messages → 解密
调用 wecom_query_messages(keyword="发票", limit=20) → 返回结果安全提醒
⚠️ 本项目会处理企业敏感数据,部署前请仔细阅读本节。
.env绝不能提交到仓库——本项目已通过.gitignore默认忽略;首次git add前请确认。private_key.pem绝不能提交——同理已忽略。若不慎泄露,请立即在企业微信管理后台 重置公钥。消息数据可能包含个人隐私——
wecom_messages.jsonl、群资料导出文件等已加入.gitignore,请勿外发。Bearer Token 默认会写入
.env——HTTP 模式启动时若未设置MCP_BEARER_TOKEN,会自动生成并保存到.env;若希望每次启动都使用临时 Token,请改为外部注入或自行改造启动脚本。部署时建议:
使用反向代理(HTTPS + IP 白名单)暴露 MCP HTTP 端点
定期轮换
MSGAUDIT_SECRET和 RSA 密钥对限制
OUTPUT_JSONL所在目录的访问权限
项目结构
.
├── mcp_server.py # FastMCP 入口,工具定义
├── wecom_core.py # 核心业务:配置、SDK 封装、解密、查询
├── main.py # CLI 入口:拉取并打印消息
├── group_chat.py # 群资料识别与导出脚本
├── test_mcp_all.py # MCP 工具冒烟测试
├── restart.sh # tmux 一键重启脚本
├── fastmcp.json # FastMCP 客户端配置
├── pyproject.toml # 项目元数据
├── requirements.txt # pip 依赖
├── .env.example # 配置示例
├── .gitignore
├── LICENSE
└── README.md开发
# 启动 HTTP 模式做本地调试
MCP_TRANSPORT=http MCP_PORT=8331 uv run python mcp_server.py
# 跑冒烟测试(需要先启动服务)
uv run python test_mcp_all.py常见问题
Q: 启动报 SDK 动态库不存在?
A: 检查 .env 中 SDK_LIB_PATH 是否指向正确的 .so 文件,且有可执行权限。
Q: 报 RSA 解密 encrypt_random_key 失败?
A: 私钥与后台公钥版本不匹配,需在管理后台重新下载配套私钥。
Q: 报 errcode=60011?
A: 表示企业没有开通「会话内容存档」权限,需管理员在后台申请。
License
Available Tools
9 toolswecom_download_mediaA
下载消息中的媒体文件(图片、视频、语音、文件等)。
通过 sdkfileid 下载媒体内容。图片上传到 R2 并返回预签名访问链接,其他文件保存到磁盘。 也可指定 save_to 路径将文件保存到指定位置。
| Name | Required | Description | Default |
|---|---|---|---|
| save_to | No | 保存路径,不传则图片返回 R2 预签名链接、其他文件自动保存 | |
| sdkfileid | Yes | 媒体文件 ID(从消息的 sdkfileids 字段获取) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals key behaviors: images are uploaded to R2 and return a presigned link, other files are saved to disk, and the save_to parameter can override the default path. This provides meaningful behavioral context beyond a simple 'download', though it does not cover error handling or access permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured. It starts with a clear purpose statement, then provides key behavioral details, and ends with the optional save_to parameter. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists (as noted in context signals), the description adequately covers the tool's core functionality and return behavior for different media types. It explains the two possible outcomes (R2 link or saved file) without needing to detail return values. However, it could be more complete by noting potential error conditions or limiting factors like file size.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already has 100% coverage with descriptions for both parameters (sdkfileid and save_to). The tool description adds value by explaining the behavioral difference between images (R2 presigned link) and other files (disk save), and how save_to modifies default behavior. This provides semantic context beyond the schema's descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's core purpose: downloading media files (images, videos, voice, files) from messages. It uses a specific verb ('下载/download') and resource ('媒体文件/media files'), and it distinguishes itself from sibling tools, which focus on other operations like extracting room IDs or pulling messages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus alternatives. It lacks explicit 'when to use' or 'when not to use' instructions, and no comparison to sibling tools is made. The implied usage is for downloading media from messages, but no context is given for exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_extract_roomidsA
从本地消息记录中提取所有群聊 roomid。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral aspects such as side effects, required state (e.g., need for prior message pulling), or performance considerations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, succinct sentence that directly states the tool's purpose. No redundant or unnecessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless tool with an output schema, the description is minimally adequate but could be enhanced by mentioning dependency on local message availability or relation to sibling tools like wecom_pull_messages.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline score is 4. The description does not add parameter-specific meaning, but schema coverage is 100% by default.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description explicitly states the action (extract) and resource (all group chat roomids from local message records). It clearly distinguishes from sibling tools like wecom_pull_messages or wecom_get_group_info.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description only states what it does but does not mention prerequisites, context, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_get_config_statusA
检查服务是否就绪(消息拉取、群聊查询等能力是否可用)。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description only states readiness check, lacks details on side effects, auth requirements, or behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single, focused sentence with no unnecessary words. Front-loaded with the main purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter health check tool with output schema, the description adequately explains purpose. Could briefly mention return value but not required.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters; baseline 4 as per rules. Description adds no parameter info, but none needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool checks service readiness for specific capabilities (message pulling, group chat querying). Distinguishes from siblings that perform these actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies use for pre-check before other tools, but no explicit when-to-use or when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_get_group_infoB
获取群聊详情(外部客户群或内部群)。
| Name | Required | Description | Default |
|---|---|---|---|
| roomid | Yes | 群聊 roomid | |
| group_type | No | 群类型,可选 auto(自动尝试)、external(外部客户群)、internal(内部群) | auto |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. However, it only describes the basic functionality without disclosing behavioral traits such as authentication requirements, potential errors, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that directly states the purpose. It is front-loaded and contains no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description does not need to explain return values. However, with no annotations and minimal description, the tool lacks context about behavior and limitations. It is adequate for a straightforward tool but could be improved by adding usage hints or prerequisites.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both 'roomid' and 'group_type'. The tool description does not add meaning beyond the schema; it merely restates the parameter purpose. Baseline score of 3 is appropriate as the schema already provides sufficient clarity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves group chat details for both external and internal groups. It uses a specific verb ('获取') and resource ('群聊详情'), but does not differentiate from sibling tools like wecom_list_external_groups (which lists groups) or wecom_pull_messages (which retrieves messages).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description only states what the tool does, with no mention of when to use it, when not to, or any prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_get_seqA
获取当前消息拉取进度 seq。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description implies a read operation but does not explicitly disclose behavioral traits beyond that. With no annotations, it carries the full burden, but the minimal description is not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, short sentence with no wasted words. It is appropriately sized and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple getter with no parameters and an output schema, the description is largely sufficient. It does not explain what 'seq' is, but the output schema likely covers that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description does not need to add parameter information. Baseline is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('获取' - get) and the resource ('当前消息拉取进度 seq' - current message pull progress seq). It distinguishes from sibling tools like wecom_set_seq.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool vs alternatives. No context on prerequisites, when not to use, or comparisons to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_list_external_groupsC
列出外部客户群。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 返回群数量上限 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral aspects. It does not mention that the tool is read-only, or describe pagination, rate limits, or other traits beyond the limit parameter. The short description lacks transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, concise and front-loaded. It earns its place by stating the core purpose without unnecessary words, though it could benefit from slight expansion for completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has only one parameter and an output schema exists, the description is minimally adequate. However, it does not explain what the output contains or how it differs from sibling group tools, leaving some ambiguity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description does not add meaning beyond the parameter schema; it merely repeats the operation without elaborating on parameter behavior or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description '列出外部客户群。' clearly states it lists external customer groups, using a specific verb and resource. However, it does not explicitly distinguish from sibling tools like wecom_get_group_info, which may confuse an AI agent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives, such as wecom_get_group_info or other list tools. No exclusions, prerequisites, or context are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_pull_messagesA
从企业微信会话存档 SDK 拉取并解密聊天记录。
从上次保存的 seq 位置继续拉取,解密后返回消息列表,并自动更新 seq。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 单次拉取条数,最大 1000 | |
| save_to_file | No | 是否将解密消息追加保存到本地 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It states the tool decrypts messages, returns a list, and auto-updates seq, and optionally saves to file. However, it does not disclose potential side effects (e.g., whether it modifies data), prerequisites, or error handling. Some behavioral aspects are transparent, but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise with two sentences that front-load the main action. Every sentence adds value—purpose first, then continuation and update behavior. No redundant information, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists (so return values don't need explanation) and parameters are fully documented, the description adequately covers the core process. It explains the pull-decrypt-update workflow. Missing some edge-case context (e.g., what happens if seq is invalid), but overall sufficient for a straightforward data pull tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters (limit and save_to_file) with clear descriptions. The tool description does not add additional meaning or context for these parameters beyond what the schema provides. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it pulls and decrypts chat records from the WeCom session archive SDK, continuing from a saved seq position. It uses a specific verb-resource combination and distinguishes itself from siblings like wecom_get_seq (which only gets seq) and wecom_query_messages (which likely queries without pulling/decrypting).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for continuous pulling from a saved seq, but does not explicitly state when to use this tool versus alternatives (e.g., wecom_query_messages, wecom_get_seq) or provide conditions for not using it. The context is clear but lacks direct guidelines.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_query_messagesC
查询本地已保存的解密聊天记录。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 返回条数上限 | |
| offset | No | 分页偏移 | |
| roomid | No | 按群聊 roomid 过滤 | |
| keyword | No | 按关键词全文搜索 | |
| msgtype | No | 按消息类型过滤(text、image、file 等) | |
| from_user | No | 按发送者 userid 过滤 |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must carry full behavioral disclosure. It only states the operation without revealing if it's read-only, what preconditions exist (e.g., local storage must be populated), or how pagination works. Input schema implies pagination but description does not clarify.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, but it is under-specified for a tool with 6 parameters and an output schema. It could be expanded to include important context without verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema and multiple sibling tools, the description lacks completeness. It does not explain the local query nature, decryption context, or differentiate from wecom_pull_messages. The tool has several filters, but usage scenarios are omitted.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% with each parameter having a Chinese description (e.g., limit, offset, filters). The tool description adds no additional semantic value beyond what the schema provides, meeting the baseline expectation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool queries locally saved decrypted chat records, specifying the resource (locally saved decrypted records) and verb (query). However, it does not distinguish from sibling tool wecom_pull_messages, which might pull from server, so a slight deduction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives like wecom_pull_messages. There is no mention of prerequisites, context, or exclusions. The single sentence provides only a basic description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wecom_set_seqB
设置消息拉取起始 seq(用于重置或跳过历史消息)。
| Name | Required | Description | Default |
|---|---|---|---|
| seq | Yes | 新的 seq 值 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses that the tool sets the seq for message pulling, but does not mention side effects (e.g., overwriting previous seq, affecting future pulls), authentication needs, or error states. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys purpose and use case. It is front-loaded with the verb and resource, with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema (not shown), the description lacks details on return values, failure modes, prerequisites, or behavioral implications of setting the seq. For a tool that modifies state, more context is needed to ensure safe and correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with the parameter 'seq' described as '新的 seq 值' (new seq value). The description adds context that seq is for message pull starting point, but offers no additional meaning beyond the schema's description. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '设置' (set) and the resource '消息拉取起始 seq' (message pull starting seq), and explains the purpose: resetting or skipping historical messages. This distinguishes it from siblings like wecom_get_seq (get) and wecom_pull_messages (pull).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for resetting or skipping historical messages, but does not provide explicit when-to-use or when-not-to-use guidance, nor does it mention alternative tools. The agent can infer context but lacks clear directives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct purpose: media download, room ID extraction, config status, group info, seq management, external group listing, message pulling, message querying, and seq setting. No overlaps or ambiguity.
All tools follow a consistent 'wecom_verb_noun' snake_case pattern, with verbs like get, list, pull, query, set, extract, download. No mixing of styles.
9 tools is well-scoped for the message auditing domain. Each tool covers a necessary function without being excessive or insufficient.
The tool set covers the full workflow: config check, seq management, message pull/query, media download, and group info/extraction. No obvious gaps for the stated auditing purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
An agent-native database over MCP: shared, validated, structured records in every AI chat.
Let AI agents query data and act across all your business apps via MCP.
Shared memory for all your AI agents, your whole team and every MCP client — save, search, recall.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables Claude Code to read encrypted WeChat chat history from local database, search messages, view sessions and contacts.418Do What The F*ck You Want To Public
- FlicenseAqualityCmaintenanceEnables AI agents to control WeChat through MCP protocol, including sending messages, managing contacts, and searching messages.10
- FlicenseCqualityDmaintenanceMCP server for reading local WeChat data, enabling AI assistants to query chat history, contacts, sessions, and more via MCP tools.206
- FlicenseNot gradedqualityBmaintenanceProvides AI clients read-only access to WeChat chat history by extracting and decrypting the local Mac database, enabling search, summary, and analysis of messages.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/deadmau5v/wecom-msg-audit-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server