WeChat Server
基于MCP技术,操作微信发送消息和获取历史记录
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
Maintainer
Works with
Installation
Manual Installation
npx mcp-server-wechatConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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_wechatLocate 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.xinWeChatConfigure 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"]
}
}
}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.
(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/FilesWeChat 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.
WeChat Server Alternatives — Similar Communication Servers
Looking for alternatives to WeChat Server? Here are other popular communication servers you can use with Claude, Cursor, and VS Code.
Slack
★ 86.1kEnables interaction with Slack workspaces through comprehensive channel management, messaging, user management, file uploads, and Block Kit formatting. Features secure credential storage via macOS Keychain and supports all major Slack operations incl
LibreChat
★ 37.3kEnhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenA
Note Gen
★ 11.9kA cross-platform Markdown AI note-taking software.
DeepChat
★ 5.8k🐬DeepChat - A smart assistant that connects powerful AI to your personal world
WhatsApp MCP
★ 5.7kConnects AI assistants to the official Meta WhatsApp Cloud API for managing conversations and sending various message types through natural language. It provides tools for media management, template messages, and real-time webhook processing without
Apple
★ 3.1kEnables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
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.
Set Up WeChat Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.