Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"mcp-server-weixin": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
一个基于 Spring AI MCP Server 的微信公众号模板消息通知服务,支持通过 AI 自动发送模板消息到微信用户。
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
Email & SMS infrastructure for AI agents — send and receive real email and text messages programmatically
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API
MCP Security Weekly
Get CVE alerts and security updates for Mcp Server Weixin and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
一个基于 Spring AI MCP Server 的微信公众号模板消息通知服务,支持通过 AI 自动发送模板消息到微信用户。
mcp-server-weixin/
├── src/
│ └── main/
│ ├── java/
│ │ └── cn/bugstack/mcp/server/weixin/
│ │ ├── domain/ # 领域层
│ │ │ ├── adapter/ # 端口接口
│ │ │ ├── model/ # 领域模型
│ │ │ └── service/ # 领域服务
│ │ ├── infrastructure/ # 基础设施层
│ │ │ └── adapter/ # 适配器实现
│ │ ├── gateway/ # 网关层
│ │ │ └── dto/ # 数据传输对象
│ │ ├── types/ # 类型定义
│ │ │ └── properties/ # 配置属性
│ │ └── McpServerApplication.java
│ └── resources/
│ └── application.yml
├── Dockerfile
├── build.sh
└── push.sh
在 src/main/resources/application.yml 中配置微信公众号参数:
weixin:
api:
original_id: gh_xxxxxxxxxxxxx # 公众号原始ID
app-id: wxa7fb5870d070cb74 # 公众号 AppID
app-secret: your-app-secret # 公众号 AppSecret
template_id: your-template-id # 模板消息ID
touser: okbbf7RhnHRmW5GUHKjMegyj7lhU # 接收消息的用户OpenID
spring:
application:
name: mcp-server-weixin
ai:
mcp:
server:
name: ${spring.application.name}
version: 1.0.0
如何获取配置信息:
mvn clean package
stdio 模式:
修改 application.yml,设置 web-application-type: none,然后运行:
java -jar target/mcp-server-weixin-app.jar
SSE 模式(默认):
java -jar target/mcp-server-weixin-app.jar
服务将在 http://localhost:8102 启动。
# 构建镜像
docker build -t mcp-server-weixin:1.0.0 .
# 运行容器
docker run -d \
-p 8102:8102 \
-v $(pwd)/data:/app/data \
mcp-server-weixin:1.0.0
通过 @Tool 注解暴露的工具方法,AI 可以调用 weixinNotice 方法发送模板消息。
功能流程:
请求参数:
platform: 平台名称(如:CSDN、掘金等)subject: 消息主题description: 消息描述内容返回信息:
项目采用 DDD(领域驱动设计)架构:
数据流转:
AI → @Tool 方法 → WeiXinNoticeService → IWeiXiPort → WeiXiPort → IWeixinApiService → 微信 API
当作为 MCP Server 运行时,AI 可以通过以下方式调用:
{
"method": "tools/call",
"params": {
"name": "weixinNotice",
"arguments": {
"platform": "CSDN",
"subject": "文章发布成功",
"description": "您的文章《Spring Boot 入门教程》已成功发布到 CSDN 平台"
}
}
}
https://api.weixin.qq.com/)weixinNotice 工具方法getAccessToken: 获取 Access TokensendTemplateMessage: 发送模板消息使用 Guava Cache 实现 Access Token 缓存:
WeiXinNoticeService 中添加新的 @Tool 注解方法IWeiXiPort 接口中定义新的端口方法WeiXiPort 中实现适配逻辑IWeixinApiService 中添加对应的 API 接口项目使用微信公众平台 API:
https://api.weixin.qq.com//cgi-bin/token