This is a barebones example of an MCP server running in Swift, demonstrating integration with Cursor. The server enables Cursor to display native macOS dialog boxes with customizable title and text messages. It is intended to just be a reference example that can be extended to unlock many different automations with MCP on macOS.
When integrated, you can trigger native macOS dialogs directly from Cursor prompts:
Which results in a native dialog appearing on your screen:
- Xcode 16 or later
- Xcode Command Line Tools
To install Xcode Command Line Tools, run:
xcode-select --install
To verify your Xcode installation:
xcode-select -p
swift --version
-
Clone the git repository:
git clone https://github.com/jayayres/swift-local-notify-mcp.git cd swift-local-notify-mcp export GITHUB_WORKSPACE=`pwd`
-
Build the project:
swift build
-
Configure Cursor by editing
~/.cursor/mcp.json
to include:{ "mcpServers": { "swift-local-notify": { "type": "stdio", "command": "$GITHUB_WORKSPACE/.build/debug/swift-local-notify-mcp" } } }
Note: Replace
$GITHUB_WORKSPACE
with your actual build directory path.
In Cursor, try a prompt like:
Run local-notify tool with title Hello and text world
You should see a native macOS dialog appear with your specified title and text.