
MacOS Notify
STDIOmacOS MCP server for native notifications with tmux integration for AI assistants
macOS MCP server for native notifications with tmux integration for AI assistants
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.
npm install -g macos-notify-mcp
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)
First, install the package globally:
npm install -g macos-notify-mcp
Use the claude mcp add
command:
claude mcp add macos-notify -s user -- macos-notify-mcp
Then restart Claude Code.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
{ "mcpServers": { "macos-notify": { "command": "macos-notify-mcp" } } }
send_notification
- Send a macOS notification
message
(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 locationlist_tmux_sessions
- List available tmux sessions
get_current_tmux_info
- Get current tmux session information
# 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
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
The tool detects terminals using various methods:
CURSOR_TRACE_ID
environment variableVSCODE_IPC_HOOK_CLI
or VSCODE_REMOTE
environment variablesALACRITTY_WINDOW_ID
or ALACRITTY_SOCKET
environment variablesTERM_PROGRAM=iTerm.app
TERM_PROGRAM=Apple_Terminal
When running inside tmux, the tool attempts to detect which terminal emulator the active tmux client is using:
For advanced tmux client tracking, see examples/tmux-client-tracking.sh
.
The project consists of two main components:
MCP Server/CLI (TypeScript/Node.js)
MacOSNotifyMCP.app (Swift/macOS)
The MacOSNotifyMCP.app is bundled with the npm package and is automatically available after installation. No additional setup is required.
macos-notify-mcp -m "test"
to verifymacos-notify-mcp --list-sessions
# 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
MIT
Yuki Yano