- MCP 邮件通知服务
Content
MCP 邮件通知服务
本项目基于 Model Context Protocol (MCP) 实现了一个简单的邮件通知服务,支持通过 SSE(Server-Sent Events)与客户端通信,并通过 QQ 邮箱发送通知邮件。
功能特性
- 提供 SSE 实时消息推送接口
- 支持通过 MCP 协议发送邮件通知
- 健康检查接口
- 支持优雅关闭所有连接
目录结构
.
├── .env # 环境变量配置
├── package.json # 项目依赖与脚本
├── src/
│ ├── index.ts # 服务器入口
│ ├── mcp/
│ │ └── notify.ts # MCP 通知服务实现
│ └── tool/
│ └── notify.ts # 邮件发送工具
└── tsconfig.json # TypeScript 配置
快速开始
-
安装依赖
npm install -
配置环境变量
在项目根目录下创建
.env文件,内容示例:SMTP_USER=你的QQ邮箱 SMTP_PASS=你的QQ邮箱SMTP授权码 -
启动服务
npx ts-node src/index.ts默认监听端口为
8721,可通过环境变量PORT修改。
API 说明
-
GET /health
健康检查接口,返回服务状态。 -
GET /sse
建立 SSE 连接,用于实时消息推送。 -
POST /messages?sessionId=xxx
客户端发送消息接口,需携带sessionId。
MCP 工具:notify
- 方法:
notify - 参数:
method:通知方式,目前仅支持"email"to:收件人邮箱content:邮件内容
依赖
许可协议
MIT
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.