Skip to main content
Glama
mcp-macos-popup

mcp-macos-popup

by vakandi

mcp-macos-popup

MCP server for native macOS popup notifications, with multi-screen support.

It shows dark glassy popup cards on macOS and lets an AI agent target a specific display. On multi-monitor setups, it can list every screen and return the screen that currently has focus.

Tools

  • show_popup — quick notification popup

  • show_docs — larger Markdown popup

  • show_html — same card, sanitized HTML body (dashboards, KPI tiles, badges, SVG)

  • dismiss_all_popups — close all popups

  • list_screens — list connected displays

  • get_focused_screen — return the focused display

All card tools accept an optional screen argument: display id, index, label, primary, or focused.

Related MCP server: MCPing

Markdown surface (show_docs)

The docs card renders more than a notification has any right to:

  • headings (ATX and setext), horizontal rules, hard breaks, escapes

  • nested / ordered / task lists

  • tables with per-column alignment, inline code and bold inside cells

  • blockquotes, nested — >, >>, >>> render as indented rails

  • fenced code with a language label and token highlighting for js/ts/py/rs/go/sh/sql/java/swift/c/cpp/csharp/php/rb/json/yaml/toml/ini/html/css/md, plus diff colouring

  • inline code spans with one, two or three backticks

  • mermaid diagrams: a ```mermaid fence is rendered to SVG (flowchart, sequence, state, ER, gantt, pie, class). Mermaid is lazy-loaded, dark-themed and sandboxed with securityLevel: strict; invalid syntax keeps the source visible in a red-bordered block

  • a ```buttons fence renders real action buttons, one per line: Label | target | style where target is an https:// URL or copy:value

Raw HTML is escaped in Markdown mode, not rendered.

HTML mode (show_html, or show_docs with format:"html")

Same 480 px card, but the body is a sanitized HTML fragment — the mode for KPI tiles, status badges, event lists, dossier boards and anything that has to be seen rather than read. A 480 px card holds a four-tile row, a dated list, coloured state pills and an alert row, legible at a glance with no scrolling.

Sanitized, never injected as-is: DOMParser parses into an inert document, then a whitelist rebuilds the tree.

  • dropped with subtree: script, style, iframe, object, embed, form, input, button, textarea, select, video, canvas, link, meta, foreignObject

  • unknown tags are unwrapped; on* handlers never survive

  • id and data-* are dropped; class survives

  • href only http(s)/mailto; img only https: or data:image/(png|jpeg|gif|webp)

  • style keeps a property whitelist and rejects url(), @import, expression()

  • SVG primitives (path, rect, circle, polyline, text…) are allowed, no scriptable SVG element

Utility classes shipped by the renderer: .row .between .grid .grid-2 .grid-3 .card .kpi .kpi-label .pill (.ok .warn .bad) .bar>i .muted .mono .small .right .center.

mcp-cli call macos-popup show_html '{"title":"RMA","html":"<div class=\"row between\"><span class=\"kpi\">16</span><span class=\"pill ok\">5 mails</span></div>"}'

Card layout

Cards fill the right edge top to bottom; a card that would cross the bottom of the work area opens a second column on its left. Two columns maximum, and closing a card re-packs the stack so the left column slides back into the freed place.

Install

npm install -g mcp-macos-popup

Or run directly:

npx mcp-macos-popup

Electron is installed automatically as a dependency.

MCP configuration

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

Usage

mcp-cli call macos-popup show_popup '{"title":"Elia","message":"the answer","level":"info","duration":10}'
mcp-cli call macos-popup list_screens '{}'
mcp-cli call macos-popup get_focused_screen '{}'

Multi-screen

If four displays are connected, call list_screens or get_focused_screen first, then pass the chosen display id as screen:

mcp-cli call macos-popup show_popup '{"title":"Elia","message":"hello","screen":"focused"}'

Development

npm install
npm run daemon

Bundled skill

skill/macos-popup/ is the agent-facing skill that ships with this package: when to fire a card, how to choose Markdown vs HTML, the 480 px layout budget, the utility classes, and four copy-paste recipes. skill/macos-popup/references/html-cookbook.md is the HTML cookbook; references/markdown-cookbook.md covers the Markdown cards.

cp -R skill/macos-popup ~/.config/opencode/skills/macos-popup

scripts/notify.py takes the text as a file or on stdin, so apostrophes and newlines never reach a shell, and it falls back to the daemon's HTTP endpoint when mcp-cli is absent — which makes it usable from cron and from subworker shells.

Available Tools

6 tools
dismiss_all_popupsA

Immediately close every popup currently shown on screen.

Inputs: no named parameters.

get_focused_screenA

Return the display that currently has focus, so a popup can be shown on the right screen.

Inputs: no named parameters.

list_screensA

List every connected macOS display, including ids, labels, sizes and which one is focused.

Inputs: no named parameters.

show_docsA

Show a larger documentation-style popup on Wael's macOS screen. Renders MARKDOWN by default (headings, lists, tables, nested quotes, code, mermaid diagrams, buttons). Use it to surface rich information: a summary report, API results, a changelog, key findings. Stays longer on screen than show_popup. FORMAT: markdown is the default and covers 95% of cards. Pass format="html" ONLY when the card must lay something out visually — KPI tiles, multi-column dashboards, inline SVG charts, progress bars, comparison grids. HTML is sanitized: only a whitelist of tags and CSS properties survives, no script, no iframe, no form, no external stylesheet, no url() in styles. BUTTONS: a fenced block tagged buttons renders real action buttons in place, one per line, e.g. buttons\nOpen the thread | https://example.com\nCopy SN | copy:SN123\nClose\n. The same buttons can also be passed through the buttons parameter. A markdown link is clickable too and opens the default browser, but a button is louder and survives a 480px card better.

Inputs: title (required), html, level, format, +5 more.

show_htmlA

Show the docs card in HTML mode — the explicit 'I need a real layout' tool. Same card as show_docs, same buttons, but the body is an HTML fragment instead of Markdown. Reach for it when Markdown cannot express the shape: KPI tiles in a grid, a sprint board, a comparison matrix, inline SVG sparkline or donut, progress bars, a mini dashboard with five boxes. For prose, a table, a diff or a mermaid diagram, keep show_docs in markdown — it is shorter and it renders better at 430px. SANITIZED, always: whitelist of tags (div/span/p/h1-h6/table/ul/ol/li/section/strong/em/code/pre/blockquote/details/svg primitives/a/img https), whitelist of CSS properties (no position, no url(), no @import), no script, no iframe, no form, no event handler, no data-* attribute. A dropped tag is unwrapped, its text survives. Utility classes provided by the card: .row .between .grid .grid-2 .grid-3 .card .kpi .kpi-label .pill .pill.ok|.warn|.bad .bar>.bar i .muted .mono .right .center .small. Inline style is allowed for the rest.

Inputs: html (required), title (required), level, screen, +3 more.

show_popupA

Show a quick notification popup on Wael's macOS screen via a native Electron window (dark glassy card, top-right, auto-dismiss). Use it to alert Wael of important information: task done, deploy finished, error found, etc. Add buttons to make the card actionable: a button can open an http(s) URL in his real browser (where his sessions are logged in), copy a value to the clipboard, or dismiss the card. The message body stays plain text — for a link inside the text or a markdown report, use show_docs.

Inputs: title (required), level, screen, source, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 6 tools

    Disambiguation4/5

    The three show_* tools are explicitly delineated by guidance (quick notification vs markdown docs vs HTML layout), but show_html is essentially show_docs with format="html", creating a deliberate redundancy that relies on prose instructions to resolve. get_focused_screen and list_screens also overlap, since the latter already reports which display is focused.

    Naming Consistency5/5

    All six tools are snake_case verb_noun constructions (show_popup, show_docs, dismiss_all_popups, get_focused_screen, list_screens). The only deviation is singular/plural in show_popup vs show_docs, which is semantically justified.

    Tool Count5/5

    Six tools is well-scoped for a popup-display server; each maps to a distinct capability (render, dismiss, screen discovery). No bloat and nothing trivially redundant beyond the intentional docs/html split.

    Completeness3/5

    Core lifecycle is covered — render, bulk dismiss, and screen targeting — but there is no per-popup dismiss by id, no way to list active popups, and no mechanism for button clicks or user responses to be reported back to the agent, which undercuts the advertised actionable cards.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to automate macOS desktop tasks including mouse control, keyboard input, screenshots, window management, and UI interaction.
      417
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to send desktop notifications on macOS with rich formatting, urgency levels, and sound options.
      1
      16 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides native macOS desktop automation for AI agents, enabling screen capture, mouse/keyboard control, window management, and iOS/Android simulator control in both foreground and background modes without focus stealing.
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to control macOS desktop apps via screenshots, mouse clicks, keyboard input, accessibility queries, and AppleScript.
      11
      9 npm
      MIT