Skip to content

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.

License

Notifications You must be signed in to change notification settings

jayayres/swift-local-notify-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Local Notify MCP Server

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.

Overview

When integrated, you can trigger native macOS dialogs directly from Cursor prompts:

Cursor Prompt Example

Which results in a native dialog appearing on your screen:

Dialog Example

Installation

Prerequisites

  • 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

Setup

  1. Clone the git repository:

    git clone https://github.com/jayayres/swift-local-notify-mcp.git
    cd swift-local-notify-mcp
    export GITHUB_WORKSPACE=`pwd`
  2. Build the project:

    swift build
  3. 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.

Usage

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.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages