|
| 1 | +# 🔔 macOS Notification MCP |
| 2 | + |
| 3 | +A Model Context Protocol (MCP) server that enables AI assistants to trigger macOS notifications, sounds, and text-to-speech. |
| 4 | + |
| 5 | +## ✨ Features |
| 6 | + |
| 7 | +- 🔊 **Sound Notifications**: Play system sounds like Submarine, Ping, or Tink |
| 8 | +- 💬 **Banner Notifications**: Display visual notifications with customizable title, message, and subtitle |
| 9 | +- 🗣️ **Speech Notifications**: Convert text to speech with adjustable voice, rate, and volume |
| 10 | +- 🎙️ **Voice Management**: List and select from available system voices |
| 11 | +- 🧪 **Testing Tools**: Diagnostic utilities to verify all notification methods |
| 12 | + |
| 13 | +## 🚀 Quick Start with uvx (Recommended) |
| 14 | + |
| 15 | +The fastest way to use this tool is with `uvx`, which runs packages without permanent installation: |
| 16 | + |
| 17 | +```bash |
| 18 | +# Install uv if you don't have it |
| 19 | +curl -LsSf https://astral.sh/uv/install.sh | sh |
| 20 | + |
| 21 | +# Run the MCP server directly (no installation needed) |
| 22 | +uvx macos-notification-mcp |
| 23 | +``` |
| 24 | + |
| 25 | +## ⚙️ Configure Claude Desktop |
| 26 | + |
| 27 | +Add this to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`): |
| 28 | + |
| 29 | +```json |
| 30 | +{ |
| 31 | + "mcpServers": { |
| 32 | + "macos-notification-mcp": { |
| 33 | + "command": "uvx", |
| 34 | + "args": ["macos-notification-mcp"] |
| 35 | + } |
| 36 | + } |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +Then restart Claude Desktop. |
| 41 | + |
| 42 | +## 📦 Alternative Installation Methods |
| 43 | + |
| 44 | +Standard installation: |
| 45 | + |
| 46 | +```bash |
| 47 | +pip install macos-notification-mcp |
| 48 | +``` |
| 49 | + |
| 50 | +Install from source: |
| 51 | + |
| 52 | +```bash |
| 53 | +git clone https://github.com/devizor/macos-notification-mcp |
| 54 | +cd macos-notification-mcp |
| 55 | +pip install . |
| 56 | +``` |
| 57 | + |
| 58 | +## 🛠️ Available Notification Tools |
| 59 | + |
| 60 | +### 🔊 Sound Notification |
| 61 | +```python |
| 62 | +sound_notification(sound_name="Submarine") |
| 63 | +``` |
| 64 | +Available sounds: Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping, Pop, Purr, Sosumi, Submarine, Tink |
| 65 | + |
| 66 | +### 💬 Banner Notification |
| 67 | +```python |
| 68 | +banner_notification( |
| 69 | + title="Task Complete", |
| 70 | + message="Your analysis is ready", |
| 71 | + subtitle=None, # Optional |
| 72 | + sound=False, # Optional: Play sound with notification |
| 73 | + sound_name=None # Optional: Specify system sound |
| 74 | +) |
| 75 | +``` |
| 76 | + |
| 77 | +### 🗣️ Speech Notification |
| 78 | +```python |
| 79 | +speak_notification( |
| 80 | + text="The process has completed", |
| 81 | + voice=None, # Optional: System voice to use |
| 82 | + rate=150, # Optional: Words per minute (default: 150) |
| 83 | + volume=1.0 # Optional: Volume level 0.0-1.0 |
| 84 | +) |
| 85 | +``` |
| 86 | + |
| 87 | +### 🎙️ Voice Management |
| 88 | +```python |
| 89 | +list_available_voices() # Lists all available text-to-speech voices |
| 90 | +``` |
| 91 | + |
| 92 | +### 🧪 Testing |
| 93 | +```python |
| 94 | +test_notification_system() # Tests all notification methods |
| 95 | +``` |
| 96 | + |
| 97 | +## 🔒 Implementation Details |
| 98 | + |
| 99 | +- ⏱️ **Rate Limiting**: Notifications are processed one at a time with a minimum interval of 0.5 seconds |
| 100 | +- 🔄 **Queuing**: Multiple notification requests are handled sequentially |
| 101 | +- 🪟 **OS Integration**: Uses native macOS commands (`afplay`, `osascript`, `say`) |
| 102 | +- 🔌 **FastMCP**: Built on the FastMCP framework for AI communication |
| 103 | + |
| 104 | +## ⚠️ Troubleshooting |
| 105 | + |
| 106 | +- 🔐 **Permissions**: Ensure notifications are allowed in System Settings → Notifications |
| 107 | +- ⏳ **Timing**: Only one notification is processed at a time |
| 108 | +- 🌐 **Environment**: If using the command directly (not uvx), you may need to use full paths |
| 109 | + |
| 110 | +## 📄 License |
| 111 | + |
| 112 | +MIT License |
0 commit comments