jerryan999
MCP Serverjerryan999public

wechat mcp

基于 Model Context Protocol 的微信服务端,提供微信功能接口。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

基于 Model Context Protocol 的微信服务端,提供微信功能接口。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP WeChat服务器

基于Model Context Protocol (MCP) Python SDK的微信服务器实现,提供微信相关功能的接口。

项目简介

MCP WeChat服务器是一个基于Model Context Protocol的服务实现,旨在为AI助手提供微信相关功能的访问能力。通过该服务器,AI助手可以获取微信联系人信息、发送消息等,从而实现与微信平台的集成。

功能特点

  • 资源访问:提供微信联系人信息的访问
    • 获取最近联系人列表
    • 获取指定联系人的详细信息
  • 工具调用:提供微信操作功能
    • 向指定联系人发送消息

安装说明

前置条件

  • Python 3.8+
  • MCP Python SDK

安装步骤

  1. 克隆仓库到本地
git clone https://github.com/yourusername/mcp-wechat.git
cd mcp-wechat
  1. 安装依赖
# 使用pip
pip install -e .

# 或使用uv (推荐)
uv pip install -e .

使用方法

启动服务器

python main.py

服务器默认使用stdio作为传输协议,启动后将等待客户端连接。

作为MCP服务器集成到AI助手

在AI助手支持的环境中,可以将此服务器作为MCP服务连接,使AI助手能够访问微信功能。

API说明

资源 (Resources)

URI描述
wechat://contacts/recent获取最近联系的微信联系人列表
wechat://contacts/{contactId}获取指定联系人的详细信息

工具 (Tools)

名称描述参数
send_message发送微信消息给指定联系人contactId: 联系人ID
message: 消息内容

项目结构

mcp-wechat/
├── main.py          # 主程序入口
├── pyproject.toml   # 项目配置
├── Makefile         # 构建脚本
└── README.md        # 项目说明

开发说明

扩展功能

要添加新的资源或工具,可以修改WeChatServer类中的相应方法:

  1. 添加新资源:在setup_resource_handlers方法中扩展资源列表和处理逻辑
  2. 添加新工具:在setup_tool_handlers方法中扩展工具列表和处理逻辑

传输协议

目前服务器仅支持stdio传输协议。未来可能会添加对SSE (Server-Sent Events)协议的支持。

贡献指南

欢迎贡献代码、报告问题或提出改进建议。请遵循以下步骤:

  1. Fork本仓库
  2. 创建您的特性分支 (git checkout -b feature/amazing-feature)
  3. 提交您的更改 (git commit -m 'Add some amazing feature')
  4. 推送到分支 (git push origin feature/amazing-feature)
  5. 开启一个Pull Request

许可证

本项目采用MIT许可证 - 详见 LICENSE 文件

联系方式

如有任何问题或建议,请通过以下方式联系我们:

  • 项目Issues: GitHub Issues
  • 电子邮件: your.email@example.com

Quick Start

1

Clone the repository

git clone https://github.com/jerryan999/wechat-mcp
2

Install dependencies

cd wechat-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerjerryan999
Repowechat-mcp
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation