WeChat Server

v1.0.0Communicationstable

基于MCP技术,操作微信发送消息和获取历史记录

mcp-server-wechatmcpai-integration
Share:
97
Stars
0
Downloads
0
Weekly
0/5

What is WeChat Server?

WeChat Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 基于mcp技术,操作微信发送消息和获取历史记录

基于MCP技术,操作微信发送消息和获取历史记录

This server falls under the Communication category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 基于MCP技术,操作微信发送消息和获取历史记录

Use Cases

Send WeChat messages and retrieve message history through MCP. Automate WeChat communication workflows.
panxingfeng

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-server-wechat

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use WeChat Server

MCP Server WeChat enables AI assistants to send WeChat messages and retrieve chat history through the Model Context Protocol, automating communication workflows that would otherwise require manual interaction with the WeChat desktop client. The server reads message history from WeChat's local data files (specified via a folder path) and sends messages through the WeChat desktop app, making it useful for AI-driven customer communication, automated notifications, or reviewing conversation history without opening WeChat manually. It supports both individual and group contacts, with tools for single messages, bulk sends, and date-specific history retrieval.

Prerequisites

  • Python 3.9 or later installed on your system
  • WeChat desktop application installed and logged in on the same machine
  • Access to the WeChat data folder path where chat history is stored locally
  • Claude Desktop or another MCP-compatible AI client
  • pip package manager for installing the server
1

Install the mcp_server_wechat package

Install the server using pip. This installs the stdio transport version which is the simplest to configure with Claude Desktop.

pip install mcp_server_wechat
2

Locate your WeChat data folder

Find the local WeChat data directory where chat history is stored. On Windows this is typically in your user Documents or AppData folder under WeChat Files. On macOS it is usually in ~/Library/Containers/com.tencent.xinWeChat/. This path is required when running the server.

# Windows: usually something like
# C:\Users\YourName\Documents\WeChat Files\YourWeChatID

# macOS: usually something like
# ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat
3

Configure Claude Desktop to run the WeChat MCP server

Add the server to your Claude Desktop config file. Replace <folder-path> with the absolute path to your WeChat data directory found in the previous step.

{
  "mcpServers": {
    "wechat": {
      "command": "python",
      "args": ["-m", "mcp_server_wechat", "--folder-path=/path/to/WeChat/Files"]
    }
  }
}
4

Restart Claude Desktop and verify the tools are available

Restart Claude Desktop. The WeChat MCP server exposes four tools: wechat_get_chat_history, wechat_send_message, wechat_send_multiple_messages, and wechat_send_to_multiple_friends. Ask Claude to list available tools to confirm they appear.

5

(Optional) Run the SSE or Streamable HTTP server for multi-client access

For use cases where multiple clients need to connect to the WeChat server simultaneously, use the SSE or Streamable HTTP variants instead of the stdio version.

# SSE server
python -m mcp_server_wechat_sse --folder-path=/path/to/WeChat/Files

# Streamable HTTP server
python -m mcp_server_wechat_Streamable_HTTP --folder-path=/path/to/WeChat/Files

WeChat Server Examples

Client configuration

Claude Desktop configuration for the WeChat MCP server using stdio transport. Replace the folder-path with your actual WeChat data directory.

{
  "mcpServers": {
    "wechat": {
      "command": "python",
      "args": [
        "-m",
        "mcp_server_wechat",
        "--folder-path=/Users/yourname/Documents/WeChat Files/YourWeChatID"
      ]
    }
  }
}

Prompts to try

These prompts show how to use the WeChat MCP server for messaging and history retrieval.

- "Get my chat history with Alice from yesterday (use date format 25/6/12)."
- "Send a message to Bob saying 'The meeting has been moved to 3pm tomorrow'."
- "Send the same project update message to Alice, Bob, and Carol all at once."
- "Retrieve my last week of messages with the 'Project Team' group and summarize the key decisions."
- "Send three separate messages to David: first a greeting, then the agenda, then the meeting link."
- "Check my conversation with my manager from last Monday and tell me if there are any action items I haven't followed up on."

Troubleshooting WeChat Server

The server starts but wechat_get_chat_history returns empty results

Double-check the --folder-path argument points to the correct WeChat data directory for your logged-in WeChat ID. The path must include the specific WeChat ID subfolder, not just the top-level WeChat Files directory. Also verify the date format matches YY/M/D (e.g., 25/6/12 for June 12, 2025).

wechat_send_message fails or messages are not delivered

The WeChat desktop app must be running and logged in on the same machine as the MCP server. The server sends messages through the desktop client, so WeChat must be active. Ensure the contact name (to_user parameter) matches exactly how the contact appears in your WeChat friend list.

pip install fails or the module is not found after installation

Ensure you are using Python 3.9 or later with 'python --version'. If you have multiple Python versions, use 'pip3 install mcp_server_wechat' and update your MCP config to use 'python3' instead of 'python' as the command. Upgrade pip first if needed: 'pip install --upgrade pip'.

Frequently Asked Questions about WeChat Server

What is WeChat Server?

WeChat Server is a Model Context Protocol (MCP) server that 基于mcp技术,操作微信发送消息和获取历史记录 It connects AI assistants to external tools and data sources through a standardized interface.

How do I install WeChat Server?

Follow the installation instructions on the WeChat Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with WeChat Server?

WeChat Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is WeChat Server free to use?

Yes, WeChat Server is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Communication MCP Servers

Explore all communication servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-server-wechat": { "command": "npx", "args": ["-y", "mcp-server-wechat"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use WeChat Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides