{
"mcpServers": {
"mcp-server-weixin": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
License not specified.
Is it maintained?
Last commit 137 days ago. 10 stars.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
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