macOS Automator MCP server

Automates macOS tasks through AppleScript and JavaScript for Automation with a rich library of pre-defined scripts for application control, file operations, and system interactions.
Back to servers
Setup instructions
Provider
Peter Steinberger
Release date
May 16, 2025
Language
JavaScript
Stats
445 stars

The macOS Automator MCP Server provides a specialized interface for executing AppleScript and JavaScript for Automation (JXA) scripts on macOS systems. It features a knowledge base of pre-defined scripts that can be accessed by ID and supports various script execution methods including inline scripts, script files, and argument passing.

Installation

The simplest way to use this server is through npx. Add the following configuration to your MCP client's mcp.json:

{
  "mcpServers": {
    "macos_automator": {
      "command": "npx",
      "args": [
        "-y",
        "@steipete/macos-automator-mcp@latest"
      ]
    }
  }
}

Alternative Installation (Local Development)

If you prefer to run the server directly from a cloned repository:

  1. Clone the repository:

    git clone https://github.com/steipete/macos-automator-mcp.git
    cd macos-automator-mcp
    npm install
    
  2. Configure your MCP client to use the local version:

    {
      "mcpServers": {
        "macos_automator_local": {
          "command": "/absolute/path/to/your/cloned/macos-automator-mcp/start.sh",
          "env": {
            "LOG_LEVEL": "DEBUG"
          }
        }
      }
    }
    

Required Permissions

Before using the server, you must configure macOS permissions:

Automation Permissions

  • Go to System Settings > Privacy & Security > Automation
  • Find the application running the server (e.g., Terminal)
  • Enable checkboxes for all applications it needs to control

Accessibility Permissions

  • Go to System Settings > Privacy & Security > Accessibility
  • Add the application running the server and enable its checkbox

Tools and Usage

Execute Script Tool

The execute_script tool runs AppleScript or JXA scripts on macOS.

Basic Usage:

{
  "toolName": "execute_script",
  "input": {
    "script_content": "tell application \"Safari\" to get URL of front document"
  }
}

Using a File Path:

{
  "toolName": "execute_script",
  "input": {
    "script_path": "/Users/username/scripts/my_script.applescript",
    "timeout_seconds": 30
  }
}

Using Knowledge Base Scripts:

{
  "toolName": "execute_script",
  "input": {
    "kb_script_id": "safari_get_active_tab_url",
    "timeout_seconds": 10
  }
}

With Input Data:

{
  "toolName": "execute_script",
  "input": {
    "kb_script_id": "finder_create_folder_at_path",
    "input_data": {
      "folder_name": "New MCP Folder",
      "parent_path": "~/Desktop"
    }
  }
}

Get Scripting Tips Tool

The get_scripting_tips tool helps you discover available scripts in the knowledge base.

List All Categories:

{
  "toolName": "get_scripting_tips",
  "input": {
    "list_categories": true
  }
}

Find Scripts in a Category:

{
  "toolName": "get_scripting_tips",
  "input": {
    "category": "safari"
  }
}

Search for Specific Scripts:

{
  "toolName": "get_scripting_tips",
  "input": {
    "search_term": "clipboard"
  }
}

Example Use Cases

Browser Automation

{
  "toolName": "execute_script",
  "input": {
    "kb_script_id": "safari_get_front_tab_url"
  }
}
{
  "toolName": "execute_script",
  "input": {
    "kb_script_id": "chrome_open_url_new_tab_profile",
    "input_data": {
      "url": "https://example.com",
      "profile_name": "Default"
    }
  }
}

File System Operations

{
  "toolName": "execute_script",
  "input": {
    "kb_script_id": "finder_create_new_folder_desktop",
    "input_data": {
      "folder_name": "My Project"
    }
  }
}
{
  "toolName": "execute_script",
  "input": {
    "kb_script_id": "fileops_read_text_file",
    "input_data": {
      "file_path": "~/Documents/notes.txt"
    }
  }
}

System Interactions

{
  "toolName": "execute_script",
  "input": {
    "script_content": "set volume output volume 50"
  }
}
{
  "toolName": "execute_script",
  "input": {
    "kb_script_id": "systemsettings_toggle_dark_mode_ui"
  }
}

Configuration Options

You can configure the server using environment variables:

  • LOG_LEVEL: Set logging level (DEBUG, INFO, WARN, ERROR)
  • KB_PARSING: Control knowledge base parsing (lazy or eager)
  • LOCAL_KB_PATH: Path to local knowledge base (default: ~/.macos-automator/knowledge_base)

Troubleshooting

  • If scripts fail, check macOS Automation and Accessibility permissions
  • For script syntax errors, test in Script Editor first
  • For timeouts, increase timeout_seconds parameter
  • File paths must be absolute POSIX paths
  • For JXA scripts, use output_format_mode set to direct or auto

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_automator" '{"command":"npx","args":["-y","@steipete/macos-automator-mcp@latest"]}'

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_automator": {
            "command": "npx",
            "args": [
                "-y",
                "@steipete/macos-automator-mcp@latest"
            ]
        }
    }
}

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_automator": {
            "command": "npx",
            "args": [
                "-y",
                "@steipete/macos-automator-mcp@latest"
            ]
        }
    }
}

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