macOS Notifications with tmux MCP server

Provides native macOS notifications with intelligent tmux session integration that automatically detects terminal environments and enables click-to-navigate functionality for returning to specific tmux sessions, windows, and panes.
Back to servers
Setup instructions
Provider
Yuki Yano
Release date
Jun 20, 2025
Stats
5 stars

This MCP server allows AI assistants like Claude to send native macOS notifications with tmux integration, enabling clickable notifications that can focus specific tmux sessions, windows, and panes when clicked.

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

Usage

Setting Up as MCP Server

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

The send_notification tool sends a macOS notification with the following parameters:

  • message (required): Notification message
  • title: Notification title (default: "Claude Code")
  • sound: Notification sound (default: "Glass")
  • session: tmux session name
  • window: tmux window number
  • pane: tmux pane number
  • useCurrent: Use current tmux location

List tmux Sessions

The list_tmux_sessions tool lists all available tmux sessions.

Get Current tmux Info

The get_current_tmux_info tool returns information about the current tmux session.

Using 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.

Supported Terminal Emulators

  • Cursor: Detected via CURSOR_TRACE_ID environment variable
  • VSCode: Detected via VSCODE_IPC_HOOK_CLI or VSCODE_REMOTE environment variables
  • alacritty: Detected via ALACRITTY_WINDOW_ID or ALACRITTY_SOCKET environment variables
  • iTerm2: Detected via TERM_PROGRAM=iTerm.app
  • Terminal.app: Detected 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 through a series of methods:

  1. Identifying the most recently active tmux client
  2. Tracing processes using the client's TTY
  3. Checking preserved environment variables
  4. Analyzing the process tree as a fallback

Troubleshooting

Notifications Not Appearing

  1. Check System Settings → Notifications → MacOSNotifyMCP
  2. Ensure notifications are allowed
  3. Run macos-notify-mcp -m "test" to verify

tmux Integration Not Working

  1. Ensure tmux is installed and running
  2. Check session names with macos-notify-mcp --list-sessions
  3. Verify terminal app is supported (Alacritty, iTerm2, WezTerm, or Terminal)

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "macos-notify" '{"command":"macos-notify-mcp"}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "macos-notify": {
            "command": "macos-notify-mcp"
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "macos-notify": {
            "command": "macos-notify-mcp"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later