
macOS Notify MCP
An MCP server that enables AI assistants like Claude to send native macOS notifications with tmux integration, allowing notifications to focus specific tmux sessions when clicked.
Tools
send_notification
Send a macOS notification with optional tmux integration
list_tmux_sessions
List available tmux sessions
get_current_tmux_info
Get current tmux session information
README
macOS Notify MCP
A Model Context Protocol (MCP) server for macOS notifications with tmux integration. This tool allows AI assistants like Claude to send native macOS notifications that can focus specific tmux sessions when clicked.
Features
- 🔔 Native macOS notifications using UserNotifications API
- 🖱️ Clickable notifications that focus tmux sessions
- 🎯 Direct navigation to specific tmux session, window, and pane
- 🔊 Customizable notification sounds
- 🚀 Support for multiple concurrent notifications
- 🤖 MCP server for AI assistant integration
- 🖥️ Terminal emulator detection (VSCode, Cursor, iTerm2, Terminal.app)
Installation
Prerequisites
- macOS (required for notifications)
- Node.js >= 18.0.0
- tmux (optional, for tmux integration)
Install from npm
npm install -g macos-notify-mcp
Build from source
git clone https://github.com/yuki-yano/macos-notify-mcp.git
cd macos-notify-mcp
npm install
npm run build
npm run build-app # Build the macOS app bundle (only needed for development)
Usage
As MCP Server
First, install the package globally:
npm install -g macos-notify-mcp
Quick Setup with Claude Code
Use the claude mcp add
command:
claude mcp add macos-notify -s user -- macos-notify-mcp
Then restart Claude Code.
Manual Setup for Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"macos-notify": {
"command": "macos-notify-mcp"
}
}
}
Available MCP Tools
-
send_notification
- Send a macOS notificationmessage
(required): Notification messagetitle
: Notification title (default: "Claude Code")sound
: Notification sound (default: "Glass")session
: tmux session namewindow
: tmux window numberpane
: tmux pane numberuseCurrent
: Use current tmux location
-
list_tmux_sessions
- List available tmux sessions -
get_current_tmux_info
- Get current tmux session information
As CLI Tool
# Basic notification
macos-notify-cli -m "Build completed"
# With title
macos-notify-cli -t "Development" -m "Tests passed"
# With tmux integration
macos-notify-cli -m "Task finished" -s my-session -w 1 -p 0
# Use current tmux location
macos-notify-cli -m "Check this pane" --current-tmux
# Detect current terminal emulator
macos-notify-cli --detect-terminal
# List tmux sessions
macos-notify-cli --list-sessions
Terminal Detection
The tool automatically detects which terminal emulator you're using and uses this information when you click on notifications to focus the correct application. You can test terminal detection with:
# Test terminal detection
macos-notify-cli --detect-terminal
Supported Terminal Detection
The tool detects terminals using various methods:
- Cursor: Via
CURSOR_TRACE_ID
environment variable - VSCode: Via
VSCODE_IPC_HOOK_CLI
orVSCODE_REMOTE
environment variables - alacritty: Via
ALACRITTY_WINDOW_ID
orALACRITTY_SOCKET
environment variables - iTerm2: Via
TERM_PROGRAM=iTerm.app
- Terminal.app: Via
TERM_PROGRAM=Apple_Terminal
Terminal Detection in tmux
When running inside tmux, the tool attempts to detect which terminal emulator the active tmux client is using:
- Active Client Detection: Identifies the most recently active tmux client
- TTY Process Analysis: Traces processes using the client's TTY
- Environment Preservation: Checks preserved environment variables
- Process Tree Fallback: Analyzes the process tree as a last resort
For advanced tmux client tracking, see examples/tmux-client-tracking.sh
.
How it Works
- Notification Delivery: Uses a native macOS app bundle (MacOSNotifyMCP.app) to send UserNotifications API notifications
- Click Handling: When a notification is clicked, the app activates the detected terminal emulator (VSCode, Cursor, iTerm2, alacritty, or Terminal.app) and switches to the specified tmux session
- Terminal Support: Automatically detects and activates the correct terminal application
- Multiple Instances: Each notification runs as a separate process, allowing multiple concurrent notifications
Architecture
The project consists of two main components:
-
MCP Server/CLI (TypeScript/Node.js)
- Implements the Model Context Protocol
- Provides a command-line interface
- Manages tmux session detection and validation
-
MacOSNotifyMCP.app (Swift/macOS)
- Native macOS application for notifications
- Handles notification clicks to focus tmux sessions
- Runs as a background process for each notification
MacOSNotifyMCP.app
The MacOSNotifyMCP.app is bundled with the npm package and is automatically available after installation. No additional setup is required.
Troubleshooting
Notifications not appearing
- Check System Settings → Notifications → MacOSNotifyMCP
- Ensure notifications are allowed
- Run
macos-notify-mcp -m "test"
to verify
tmux integration not working
- Ensure tmux is installed and running
- Check session names with
macos-notify-mcp --list-sessions
- Verify terminal app is supported (Alacritty, iTerm2, WezTerm, or Terminal)
Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run in development
npm run dev
# Lint and format code
npm run lint
npm run format
# Build macOS app (only if modifying Swift code)
npm run build-app
License
MIT
Author
Yuki Yano
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。