DM

devizor/macos-notification-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

38 stars 5 forks 质量 63 趋势 12MIT

macOS 通知 MCP 使 AI 助手能够触发原生 macOS 音效、视觉通知和文本转语音。为使用 Model Context 协议构建的 Claude 及其他 AI 模型。

概览

一个模型上下文协议(MCP)服务器,使AI助手能够触发macOS通知、声音和文本转语音。 - 🔊 : 播放系统声音如Submarine、Ping或Tink - 💬 : 显示带有可定制标题、消息和字幕的视觉通知 - 🗣️ : 可调节语音、速率和音量将文本转换为语音 - 🎙️ : 从可用系统语音中列出并选择 - 🧪 : 验证所有通知方式的诊断工具 使用该工具最快的方式是 uvx,它可以运行无需永久安装的软件包: 将此添加到你的Claude桌面配置中(~/Library/Application Support/Claude/claude_desktop_config.json): 可用音色:低音、吹奏、瓶子、青蛙、放克、玻璃、英雄、摩尔斯、叮、爆裂、呼噜、索苏米、潜水艇、叮当 - ⏱️ :通知一次处理一条,最小间隔为0。

概述(AI 翻译)

一个模型上下文协议(MCP)服务器,使AI助手能够触发macOS通知、声音和文本转语音。

✨ 特色

  • 🔊 声音通知:播放系统听起来像Submarine、Ping或Tink
  • 💬 横幅通知:显示可自定义标题、消息和副标题的视觉通知
  • 🗣️ 语音通知:将文本转换为语音,可调节语音、语速和音量
  • 🎙️ 语音管理:列出并选择可用的系统语音
  • 🧪 测试工具:用于验证所有通知方法的诊断工具

🚀 快速入门 UVX(推荐)

使用该工具最快的方式是使用 uvx,它运行无需永久安装的软件包:

⚙️ 配置Claude桌面

将此添加到您的Claude桌面配置中(~/Library/Application Support/Claude/claude_desktop_config.json):

然后重启Claude Desktop。

📦 替代安装方法

标准安装:

从源头安装:

🛠️ 可用通知工具

🔊 声音通知

可用音色:低音、吹奏、瓶子、青蛙、放克、玻璃、英雄、摩尔斯、叮、爆裂、呼噜、索苏米、潜水艇、叮当

💬 横幅通知

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

🔔 macOS Notification MCP

A Model Context Protocol (MCP) server that enables AI assistants to trigger macOS notifications, sounds, and text-to-speech.

✨ Features

  • 🔊 Sound Notifications: Play system sounds like Submarine, Ping, or Tink
  • 💬 Banner Notifications: Display visual notifications with customizable title, message, and subtitle
  • 🗣️ Speech Notifications: Convert text to speech with adjustable voice, rate, and volume
  • 🎙️ Voice Management: List and select from available system voices
  • 🧪 Testing Tools: Diagnostic utilities to verify all notification methods

The fastest way to use this tool is with uvx, which runs packages without permanent installation:

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Run the MCP server directly (no installation needed)
uvx macos-notification-mcp

⚙️ Configure Claude Desktop

Add this to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "macos-notification-mcp": {
      "command": "uvx",
      "args": ["macos-notification-mcp"]
    }
  }
}

Then restart Claude Desktop.

📦 Alternative Installation Methods

Standard installation:

pip install macos-notification-mcp

Install from source:

git clone https://github.com/devizor/macos-notification-mcp
cd macos-notification-mcp
pip install .

🛠️ Available Notification Tools

🔊 Sound Notification

sound_notification(sound_name="Submarine")

Available sounds: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink

💬 Banner Notification

banner_notification(
    title="Task Complete",
    message="Your analysis is ready",
    subtitle=None,  # Optional
    sound=False,    # Optional: Play sound with notification
    sound_name=None # Optional: Specify system sound
)

🗣️ Speech Notification

speak_notification(
    text="The process has completed",
    voice=None,     # Optional: System voice to use
    rate=150,       # Optional: Words per minute (default: 150)
    volume=1.0      # Optional: Volume level 0.0-1.0
)

🎙️ Voice Management

list_available_voices()  # Lists all available text-to-speech voices

🧪 Testing

test_notification_system()  # Tests all notification methods

🔒 Implementation Details

  • ⏱️ Rate Limiting: Notifications are processed one at a time with a minimum interval of 0.5 seconds
  • 🔄 Queuing: Multiple notification requests are handled sequentially
  • 🪟 OS Integration: Uses native macOS commands (afplay, osascript, say)
  • 🔌 FastMCP: Built on the FastMCP framework for AI communication

⚠️ Troubleshooting

  • 🔐 Permissions: Ensure notifications are allowed in System Settings → Notifications
在 GitHub 查看完整 README

安装

uvx macos-notification-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "macos-notification-mcp": { "command": "uvx", "args": ["macos-notification-mcp"] } } }