mcp-server-notify

mcp-server-notify

一个轻量级的桌面通知工具,支持 MCP 协议集成和命令行直接调用,让 Agent 能够智能发送系统通知。

Category
Visit Server

README

mcp-server-notify

一个轻量级的桌面通知工具,支持 MCP 协议集成和命令行直接调用,让 Agent 能够智能发送系统通知。

特性

  • 🔔 发送系统桌面原生通知
  • 🤖 完整的 MCP 协议支持,轻松集成各类 Agent 工具
  • 🎵 可自定义声音和图标(本地文件或URL)
  • 📱 跨平台支持(基于 node-notifier
  • 🎯 支持点击通知后激活指定应用、URL或可执行文件。
  • ⚡ 极致轻量,开箱即用,无需复杂配置

使用方法

1. MCP服务

使用 npm

集成到 Cursor、Claude Code 或其他支持 MCP 协议的编辑器和 Agent 工具中:

{
  "mcpServers": {
    "notify": {
      "command": "npx",
      "args": ["-y", "@6starlong/mcp-server-notify"]
    }
  }
}

使用示例

配置完成后,您可以通过以下方式触发通知:

- "任务完成后通知我"
- "测试全部通过了,庆祝一下"
- "发现安全漏洞,用警告音效和图标通知我"
- "通知我代码审核结果,点击时激活 Code"
- "帮我设置一个番茄钟,25分钟后提醒我休息"

你可以通过在 ~/rules/notify.md 中创建自定义规则来避免每次手动输入这些偏好设置。例如,设置默认的通知样式、常用的声音文件路径、或特定项目的通知行为。

注意事项

  • 默认设置:系统使用 coding.png 作为默认图标,done.wav 作为默认提示音
  • 资源管理:支持本地文件路径和网络URL,网络资源可能有加载延迟,系统会自动降级处理(默认3秒)
  • 静音模式:对于频繁通知,可以指定静音模式避免干扰
  • 应用关联:点击通知后返回原应用(Windows)或打开指定的URL、程序、可执行文件。

2. 命令行使用

# 安装
npm install -g @6starlong/mcp-server-notify

# 查看帮助
mcp-notify -h

# 基本通知
mcp-notify -c "标题" "消息内容"

# 流程通知
mcp-notify -c "任务完成" "代码编译成功" --open Code

# 自动化任务通知
mcp-notify -c "测试通过" "所有单元测试已通过" --sound C:\\Windows\\Media\\tada.wav

# 集成到脚本中
npm run build && mcp-notify -c "构建成功" "可以开始部署了"

3. 编程接口

import { sendNotification } from '@6starlong/mcp-server-notify'

await sendNotification('标题', '消息', {
  icon: './icon.png',      // 本地文件或URL,false禁用
  sound: './sound.wav',    // 本地文件或URL,false禁用
  open: 'Code',            // 点击通知后要激活的应用名称
})

开发和测试

# 构建项目
pnpm run build

# 测试
pnpm test

# 开发模式(启动MCP服务器)
pnpm run dev

许可证

MIT License

贡献

欢迎提交问题和PR!

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured