Skip to main content

WeChat Chat Attitude

简介

WeChat Chat Attitude 是一个基于 Model Context Protocol(MCP)的微信单聊分析服务。服务在本机发现或导入聊天数据,准备指定联系人的聊天记录,再由接入的模型分析对方态度、回复变化、沟通风格和可观察到的行为倾向。

服务不内置模型,适用于支持 MCP 的模型或 Agent。

功能特点

  • 支持 macOS 和 Windows;
  • 支持本机微信数据发现,以及单聊 JSON、已解密数据库导入;
  • 支持近期聊天、历史聊天和微信运行中的最新记录刷新;
  • 通过 MCP 一次提供选中聊天证据,超大记录时保留分块兼容;
  • 数据仅通过本机 stdio 连接,不开放网络端口。

系统要求

  • macOS 或 Windows;
  • 支持自定义 MCP 配置的模型或 Agent;
  • 自动下载模式需要 uv;
  • 本地模式需要 Python 3.10 或更高版本。

AI 工具使用配置

PyPI package(推荐)

将下面的配置添加到模型或 Agent 的 MCP 设置中:

{
  "mcpServers": {
    "wechat-chat-attitude": {
      "command": "uvx",
      "args": [
        "--python", "3.11",
        "--from", "wechat-chat-attitude", "wechat-chat-attitude-mcp"
      ],
      "description": "本地微信聊天分析 MCP 服务"
    }
  }
}

重启模型或 Agent 后,首次启动会自动下载发行包。自动下载模式不需要访问源码仓库,仓库可以保持 private。

本地运行

需要离线使用、审阅源码或客户端无法运行 uvx 时,在项目目录执行:

macOS:

python3 install_mcp.py --client generic --config-mode local

Windows PowerShell:

py -3 install_mcp.py --client generic --config-mode local

也可以直接运行 install.command(macOS)或 install.bat(Windows)生成配置。

快速开始

  1. 添加上面的 MCP 配置并重启模型或 Agent;

  2. 使用类似下面的语句发起分析:

    使用 wechat-chat-attitude,分析“<联系人>”的微信单聊,重点关注对方的态度、回复变化、沟通风格和可观察到的行为倾向,并给出自然的聊天建议。

  3. 首次使用时,按模型提示选择微信账户和联系人,并完成本机授权;

  4. 首次授权后,普通刷新可以保持微信运行;服务会复制并校验数据库/WAL,再建立在线只读快照。 只有在线快照持续变化时,才需要稍后重试或改用退出微信的离线稳定快照。

刷新最新记录时,可使用:

在微信保持运行的情况下,重新获取“<联系人>”的最新微信记录,再结合近期内容和回复间隔进行分析。

无法自动获取时

部分微信版本不支持本机自动发现。此时先准备单聊 JSON 或已解密数据库,再使用:

使用 wechat-chat-attitude,导入“<数据文件绝对路径>”,联系人为“<联系人>”,然后分析聊天态度、回复变化和沟通风格。

输入格式和示例见 examples/example-chat.json、输入格式 和 本机获取说明。

隐私说明

  • 服务仅在本机通过 stdio 运行,不监听网络端口;
  • 原始聊天不会写入服务日志,数据库密钥不会返回给模型;
  • 服务不会修改微信数据库或账户文件;
  • 使用云模型时,已读取的聊天内容会进入对应模型的上下文,并受其数据政策约束;
  • 发行包不包含真实聊天、数据库密钥或个人联系人示例。

常见问题

客户端找不到 MCP

保存配置后完全退出并重新打开客户端。自动下载模式需确认 uvx 位于系统 PATH;无法使用 uvx 时切换到本地运行。

找不到联系人或出现多个候选

提供精确备注、昵称或微信号,并从候选列表中选择。服务不会自动猜测联系人。

当前微信版本不支持自动获取

改用单聊 JSON 或稳定的已解密数据库导入,具体格式见 输入格式。

Metadata

Release files for wechat-chat-attitude 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wechat-chat-attitude 1.1.1
File Size Uploaded Provenance Actions
wechat_chat_attitude-1.1.1.tar.gz 83.3 kB With provenance Details for wechat_chat_attitude-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wechat-chat-attitude 1.1.1
File Interpreter ABI Platform Actions
wechat_chat_attitude-1.1.1-py3-none-any.whl Python 3 none any Details for wechat_chat_attitude-1.1.1-py3-none-any.whl

Total release size: 153.0 kB

Release files / wechat_chat_attitude-1.1.1.tar.gz

Download URL wechat_chat_attitude-1.1.1.tar.gz
Size 83.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bd0ddb51d6f5d8ca37b95a50bfe91f62ae93c8542ce2b29680cb110e04bf2c6b
BLAKE2b-256 checksum
How to use checksums
1afca37260d67adef1ef4d856c64d8d1bae334ced7f008e5dbe100f57dd1e8e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / wechat_chat_attitude-1.1.1-py3-none-any.whl

Download URL wechat_chat_attitude-1.1.1-py3-none-any.whl
Size 69.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ebc0be47f08e3e95d87eb9fd3693b2dd1c2a50b412c8033ef13994dbb703b9a
BLAKE2b-256 checksum
How to use checksums
8a478faf67fa983b5aeef6cfec5cebb55547a2ed7dea6e99cf4175ce8ab3159e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Security for wechat-chat-attitude 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wechat_chat_attitude-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page