WeChat chatlog MCP server for querying chat logs, contacts, groups, and downloading media files (images, voice, video, files) from WeChat database
This MCP server exhibits severe definition quality issues across nearly all dimensions. Of 11 tools, only 2 have properly formed input schemas (healthCheck, queryChatLog show Zod schemas in source). Tool descriptions range from adequate (queryChatLog: 280 chars with good Chinese context) to severely inadequate (healthCheck: 0 chars in source; getState: 18 chars). Parameter descriptions exist in the prompt but are absent or minimal in the actual TypeScript code. No output schemas are documented. Error handling is generic ('Error: ' + error.message) with no recovery guidance. The server reads like an auto-generated OpenAPI wrapper with minimal LLM optimization, descriptions use technical jargon (示例: examples in Chinese, API paths) rather than intent-focused language. Security is a major concern: the accessDataFile tool (tool #10) accepts arbitrary file paths ('data file path (relative to data directory, like: contact/contact_detail.db)') with no documented validation, risking path traversal attacks. The downloadImage/Voice/Video/File tools (tools #6-9) write to local filesystem with user-controlled saveDir and fileName parameters, creating potential for arbitrary file write exploitation. No rate limiting, permission checks, or audit logging are evident.
获取数据文件URL - 通过文件路径直接访问数据文件。支持访问数据库文件、日志文件、配置文件等系统数据文件。提供直接文件访问能力,返回包含URL、路径和文件大小的完整信息。
下载文件 - 根据文件ID下载文件。API返回302重定向到实际文件位置,保持原始文件名和扩展名。支持各种文件格式(Office文档、PDF、压缩包等)。文件ID从聊天记录中的contents.md5字段直接获取。实际文件路径:/data/msg/file/[日期]/[原始文件名]
下载图片文件 - 根据图片ID下载图片文件。API返回302重定向到实际.dat文件位置,自动解密加密图片。图片ID从聊天记录中的contents.path字段中提取文件名部分。实际文件路径:/data/msg/attach/[用户ID]/[日期]/Img/[ID].dat
下载视频文件 - 根据视频ID下载视频文件。API返回302重定向到实际.mp4文件位置。视频ID从聊天记录中的contents.path字段中提取文件名部分。实际文件路径:/data/msg/video/[日期]/[ID].mp4
下载语音文件 - 根据语音ID下载语音文件。API直接返回200 OK和MP3音频二进制数据,已自动将SILK格式转换为标准MP3格式。语音ID从聊天记录中的contents.voice字段直接获取。无需重定向,直接下载即可。
群聊列表 - 获取微信群聊列表,支持关键词搜索和分页。可通过keyword参数按群名称搜索群聊,limit和offset参数控制分页。返回群聊详细信息,包括群ID、群名称、群成员数量、群主等。所有参数均为可选,不传keyword返回所有群聊。
9 of 11 tools are inferred rather than explicitly defined in the visible TypeScript source. Tool definitions exist only in prompt metadata or are listed with .js file locations not present in the provided code.
Input schemas are either missing (empty {} objects) or inferred from prompt metadata. Of 11 tools, only queryChatLog has a visible Zod schema in TypeScript code; the rest lack proper schema definitions in the provided source.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 38 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 25 | - | v1 |
联系人列表 - 获取微信联系人列表,支持关键词搜索和分页。可通过keyword参数按昵称、备注名等搜索联系人,limit和offset参数控制分页。返回联系人详细信息,包括ID、昵称、备注名、头像等。所有参数均为可选,不传keyword返回所有联系人。
会话列表 - 获取微信会话列表,包括个人聊天和群聊会话。按照最近会话时间排序,显示最新的会话记录。limit和offset参数控制分页。返回会话详细信息,包括会话对象、最后消息时间、未读消息数等。所有参数均为可选。
Get the current state of the system
健康检查 - 检查Chatlog API服务的运行状态和可用性。此接口用于验证服务是否正常运行,返回服务状态信息。无需参数,调用成功表示服务可用,失败表示服务异常或不可访问。
聊天记录查询 - 查询指定聊天对象的聊天记录。支持按时间范围、发送者、关键词等维度筛选。talker为必需参数,标识聊天对象(用户ID或群聊);time为必需参数,支持标准时间格式查询。返回包含消息内容、时间戳、发送者等详细信息的聊天记录数据。
Tool descriptions in source code are either missing, trivial (API path only, <40 chars), or auto-generated from OpenAPI specs. None answer 'what should an LLM use this for?' Required by baseline: 194 chars average, 10-1024 char range.
accessDataFile tool accepts arbitrary file paths with only 'relative to data directory' constraint and no validation. Prompt example 'contact/contact_detail.db' is insufficient. No mention of path traversal protection, allowed directories, or validation rules. This is a path traversal vulnerability.
downloadImage, downloadVoice, downloadVideo, downloadFile tools accept user-controlled 'saveDir' and 'fileName' parameters, allowing arbitrary file writes to the local filesystem. No validation of paths, no sandboxing documented. Potential for writing files to system directories.
No output schemas documented. Users/LLMs cannot plan downstream tool calls without knowing what fields are returned. Critical for tool chaining.
Error handling is uniformly minimal: 'Error: ' + error.message with no recovery guidance, error classification, or actionable next steps. LLMs receive raw exception text instead of structured guidance.
Parameter descriptions are minimal or missing in TypeScript source code. Descriptions like 'talker', 'time', 'keyword' do not explain format, constraints, or use case. Prompt metadata has richer descriptions (in Chinese) but these are not reflected in the actual tool code.
No validation of constraints documented. E.g., queryChatLog parameter 'type' is z.array(z.any()), any array is valid, defeating validation. Time format accepts many formats (2023-01-01, 2023-01-01~2023-01-31, 2023-01-01/14:30, etc.) but no regex/format constraint enforced.
Multiple tools have incorrect or mismatched names between prompt metadata and source code (e.g., prompt says 'downloadImage' but source says 'getImage'). This confuses LLMs about which tool to call.
getState tool has description 'Get the current state of the system' which is identical to accessDataFile's source description, clear copy-paste error. Purpose and return value are ambiguous.
No pagination guidance. Tools like getContactList, getChatroomList, getSessionList return lists but no documentation of what happens when results exceed limit. No mention of total count, next_cursor, or max result caps.