wechatlog
WeChat Chatlog MCP Server - 直接下载微信聊天媒体文件到本地
claude mcp add --transport stdio lupinlin1-wechatlog-mcp-server node chatlog-mcp-server.js \ --env CHATLOG_BASE_URL="Chatlog API 服务地址,例如 http://127.0.0.1:5030" \ --env PERPLEXITY_API_KEY="可选的 Perplexity API 密钥" \ --env DEFAULT_DOWNLOAD_DIR="默认下载目录的绝对路径,例如 /tmp/chatlog-downloads"
How to use
该 MCP 服务器专为与 Claude Code CLI 集成而设计,提供微信聊天记录查询以及媒体文件的本地下载能力。通过 chatlog-mcp-server.js 提供的 API,你可以查询指定联系人或会话的聊天记录、获取联系人和群聊列表,并将图片、语音、视频及其他文件直接下载到本地存储。可与 Claude Code CLI 配合使用,以实现无缝的聊天记录检索与媒体下载工作流。工具集包括 queryChatLog、getContactList、getChatroomList、getSessionList 以及 downloadImage、downloadVoice、downloadVideo、downloadFile 等,用以完成常见的聊天信息管理和媒体获取任务。系统工具如 healthCheck 与 accessDataFile 也能帮助你验证服务状态与访问数据文件。
How to install
Prerequisites:
- Node.js >= 16.0.0
- npm 或 yarn
- 访问并运行 Chatlog API 服务
一键安装(Linux/macOS):
curl -sSL https://raw.githubusercontent.com/yourusername/wechatlog-mcp-server/main/install.sh | bash
一键安装(Windows):
powershell -Command "& { iwr https://raw.githubusercontent.com/yourusername/wechatlog-mcp-server/main/install.bat | Out-String | Invoke-Expression }"
手动安装:
# 克隆项目
git clone https://github.com/yourusername/wechatlog-mcp-server.git
cd wechatlog-mcp-server
# 运行安装脚本
./install.sh
# 或使用 Node.js 安装
node install.js
配置示例(.env):
CHATLOG_BASE_URL=http://127.0.0.1:5030
DEFAULT_DOWNLOAD_DIR=/tmp/chatlog-downloads # 必须为绝对路径(可选)
PERPLEXITY_API_KEY=your_perplexity_api_key_here # 可选
注册到 Claude:
claude mcp add chatlog node chatlog-mcp-server.js
Additional notes
💡 重要提示:
- 确保 CHATLOG_BASE_URL 指向你的 Chatlog API 服务地址且可访问
- DEFAULT_DOWNLOAD_DIR 使用绝对路径;若未设置,将使用默认下载目录
- 在生产环境中,请妥善管理 API 密钥,避免在日志中暴露
- 如遇下载冲突,服务器会自动创建目录结构并避免覆盖现有文件
- 若需要自定义下载目录,请在调用 downloadImage/downloadVideo 等接口时通过 saveDir 指定绝对路径
- 版本升级时,请参考 README 中的发布说明,以确保 MCP API 的兼容性
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.