macOS Automator

macOS Automator

steipete

Automates macOS tasks by executing AppleScript and JavaScript for Automation scripts to control applications, files, and system functions. Includes 200+ pre-built automation recipes for common Mac operations.

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.

704558 views55Local (stdio)

What it does

  • Execute AppleScript and JXA scripts
  • Control macOS applications like Safari, Finder, and Terminal
  • Perform file operations and system interactions
  • Access library of 200+ pre-built automation scripts
  • Toggle system settings like dark mode
  • Extract data from applications

Best for

Mac users wanting to automate repetitive tasksDevelopers building Mac automation workflowsAI assistants that need to control Mac applicationsUsers who want to integrate Mac controls with LLM workflows
200+ pre-built automation recipesControls any macOS applicationRequires macOS automation permissions

About macOS Automator

macOS Automator is a community-built MCP server published by steipete that provides AI assistants with tools and capabilities via the Model Context Protocol. Automate macOS tasks with AppleScript and JavaScript. Control apps, files, and system efficiently using macOS Automator' It is categorized under productivity, developer tools. This server exposes 2 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install macOS Automator in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

macOS Automator is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (2)

execute_script

Automate macOS tasks using AppleScript or JXA (JavaScript for Automation) to control applications like Terminal, Chrome, Safari, Finder, etc. **1. Script Source (Choose one):** * `kb_script_id` (string): **Preferred.** Executes a pre-defined script from the knowledge base by its ID. Use `get_scripting_tips` to find IDs and inputs. Supports placeholder substitution via `input_data` or `arguments`. Ex: `kb_script_id: "safari_get_front_tab_url"`. * `script_content` (string): Executes raw AppleScript/JXA code. Good for simple or dynamic scripts. Ex: `script_content: "tell application \"Finder\" to empty trash"`. * `script_path` (string): Executes a script from an absolute POSIX path on the server. Ex: `/Users/user/myscripts/myscript.applescript`. **2. Script Inputs (Optional):** * `input_data` (JSON object): For `kb_script_id`, provides named inputs (e.g., `--MCP_INPUT:keyName`). Values (string, number, boolean, simple array/object) are auto-converted. Ex: `input_data: { "folder_name": "New Docs" }`. * `arguments` (array of strings): For `script_path` (passes to `on run argv` / `run(argv)`). For `kb_script_id`, used for positional args (e.g., `--MCP_ARG_1`). **3. Execution Options (Optional):** * `language` ('applescript' | 'javascript'): Specify for `script_content`/`script_path` (default: 'applescript'). Inferred for `kb_script_id`. * `timeout_seconds` (integer, optional, default: 60): Sets the maximum time (in seconds) the script is allowed to run. Increase for potentially long-running operations. * `output_format_mode` (enum, optional, default: 'auto'): Controls `osascript` output formatting. * `'auto'`: Smart default - resolves to `'human_readable'` for AppleScript and `'direct'` for JXA. * `'human_readable'`: For AppleScript, uses `-s h` flag. * `'structured_error'`: For AppleScript, uses `-s s` flag (structured errors). * `'structured_output_and_error'`: For AppleScript, uses `-s ss` flag (structured output & errors). * `'direct'`: No special output flags (recommended for JXA). * `include_executed_script_in_output` (boolean, optional, default: false): If `true`, the final script content (after any placeholder substitutions) or script path that was executed will be included in the response. This is useful for debugging and understanding exactly what was run. Defaults to false. * `include_substitution_logs` (boolean, default: false): For `kb_script_id`, includes detailed placeholder substitution logs. * `report_execution_time` (boolean, optional, default: false): If `true`, an additional message with the formatted script execution time will be included in the response. Defaults to false.

get_scripting_tips

Discover how to automate any app on your Mac with this comprehensive knowledge base of AppleScript/JXA tips and runnable scripts. This tool is essential for discovery and should be the FIRST CHOICE when aiming to automate macOS tasks, especially those involving common applications or system functions, before attempting to write scripts from scratch. It helps identify pre-built, tested solutions, effectively teaching you how to control virtually any aspect of your macOS experience. **Primary Use Cases & Parameters:** * **Discovering Solutions (Use `search_term`):** * Parameter: `search_term` (string, optional). * Functionality: Performs a fuzzy search across all tip titles, descriptions, keywords, script content, and IDs. Ideal for natural language queries like "how to..." (e.g., `search_term: "how do I get the current Safari URL and title?"`). This is the most common way to find relevant tips. * Output: Returns a list of matching tips in Markdown format. * **Limiting Search Results (Use `limit`):** * Parameter: `limit` (integer, optional, default: 10). * Functionality: Specifies the maximum number of script tips to return when using `search_term` or browsing a specific `category` (without `list_categories: true`). Does not apply if `list_categories` is true. * **Browsing by Category (Use `category`):** * Parameter: `category` (string, optional). * Functionality: Shows tips from a specific category. Combine with `limit` to control result count. * Example: `category: "01_intro"` or `category: "07_browsers/chrome"`. * **Listing All Categories (Use `list_categories: true`):** * Parameter: `list_categories` (boolean, optional). * Functionality: Returns a structured list of all available categories with their descriptions. This helps you understand what automation areas are covered. * Output: Category tree in Markdown format. * **Refreshing Database (Use `refresh_database: true`):** * Parameter: `refresh_database` (boolean, optional). * Functionality: Forces a reload of the knowledge base if new scripts have been added. Typically not needed as the database refreshes automatically. **Best Practices:** 1. **Always start with search**: Use natural language queries to find solutions (e.g., "send email from Mail app"). 2. **Browse categories when exploring**: Use `list_categories: true` to see available automation areas. 3. **Use specific IDs for execution**: Once you find a script, use its ID with `execute_script` tool for precise execution.

macOS Automator MCP 🤖 - Your Friendly Neighborhood RoboScripter™

macOS Automator MCP Server

🎯 Mission Control: Teaching Robots to Click Buttons Since 2024

Welcome to the automated future where your Mac finally does what you tell it to! This Model Context Protocol (MCP) server transforms your AI assistant into a silicon-based intern who actually knows AppleScript and JavaScript for Automation (JXA).

No more copy-pasting scripts like a caveman - let the robots handle the robot work! Our knowledge base contains over 200 pre-programmed automation sequences, loaded faster than you can say "Hey Siri, why don't you work like this?"

🚀 Why Let Robots Run Your Mac?

  • Remote Control Reality: Execute AppleScript/JXA scripts via MCP - it's like having a tiny robot inside your Mac!
  • Knowledge Base of Power: 200+ pre-built automation recipes. From "toggle dark mode" to "extract all URLs from Safari" - we've got your robot needs covered.
  • App Whisperer: Control any macOS application programmatically. Make Finder dance, Safari sing, and Terminal... well, terminate things.
  • AI Workflow Integration: Connect your Mac to the AI revolution. Your LLM can now actually DO things instead of just talking about them!

🔧 Robot Requirements (Prerequisites)

  • Node.js (version >=18.0.0) - Because even robots need a runtime
  • macOS - Sorry Windows users, this is an Apple-only party 🍎
  • ⚠️ CRITICAL: Permission to Automate (Your Mac's Trust Issues):
    • The application running THIS MCP server (e.g., Terminal, your Node.js application) requires explicit user permissions on the macOS machine where the server is running.
    • Automation Permissions: To control other applications (Finder, Safari, Mail, etc.).
      • Go to: System Settings > Privacy & Security > Automation.
      • Find the application running the server (e.g., Terminal) in the list.
      • Ensure it has checkboxes ticked for all applications it needs to control.
      • See example: docs/automation-permissions-example.png (placeholder image).
    • Accessibility Permissions: For UI scripting via "System Events" (e.g., simulating clicks, keystrokes).
      • Go to: System Settings > Privacy & Security > Accessibility.
      • Add the application running the server (e.g., Terminal) to the list and ensure its checkbox is ticked.
    • First-time attempts to control a new application or use accessibility features may still trigger a macOS confirmation prompt, even if pre-authorized. The server itself cannot grant these permissions.

🏃‍♂️ Quick Start: Release the Robots!

The easiest way to deploy your automation army is via npx. No installation needed - just pure robot magic!

Add this to your MCP client's mcp.json and watch the automation begin:

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

🛠️ Robot Workshop Mode (Local Development)

Want to tinker with the robot's brain? Clone the repo and become a robot surgeon!

  1. Clone the repository:

    git clone https://github.com/steipete/macos-automator-mcp.git
    cd macos-automator-mcp
    npm install # Ensure dependencies are installed
    
  2. Configure your MCP client: Update your MCP client's configuration to point to the absolute path of the start.sh script within your cloned repository.

    Example mcp.json configuration snippet:

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

    Important: Replace /absolute/path/to/your/cloned/macos-automator-mcp/start.sh with the correct absolute path on your system.

    The start.sh script will automatically use tsx to run the TypeScript source directly if a compiled version is not found, or run the compiled version from dist/ if available. It respects the LOG_LEVEL environment variable.

    Note for Developers: The start.sh script, particularly if modified to remove any pre-existing compiled dist/server.js before execution (e.g., by adding rm -f dist/server.js), is designed to ensure you are always running the latest TypeScript code from the src/ directory via tsx. This is ideal for development to prevent issues with stale builds. For production deployment (e.g., when published to npm), a build process would typically create a definitive dist/server.js which would then be the entry point for the published package.

🤖 Robot Toolbox

1. execute_script - The Script Launcher 9000

Your robot's primary weapon for macOS domination. Feed it AppleScript or JXA, and watch the magic happen! Scripts can be provided as inline content (script_content), an absolute file path (script_path), or by referencing a script from the built-in knowledge base using its unique kb_script_id.

Script Sources (mutually exclusive):

  • script_content (string): Raw script code.
  • script_path (string): Absolute POSIX path to a script file (e.g., .applescript, .scpt, .js).
  • kb_script_id (string): The ID of a pre-defined script from the server's knowledge base. Use the get_scripting_tips tool to discover available script IDs and their functionalities.

Language Specification:

  • language (enum: 'applescript' | 'javascript', optional): Specify the language.
    • If using kb_script_id, the language is inferred from the knowledge base script.
    • If using script_content or script_path and language is omitted, it defaults to 'applescript'.

Passing Inputs to Scripts:

  • arguments (array of strings, optional):
    • For script_path: Passed as standard arguments to the script's on run argv (AppleScript) or run(argv) (JXA) handler.
    • For kb_script_id: Used if the pre-defined script is designed to accept positional string arguments (e.g., replaces placeholders like --MCP_ARG_1, --MCP_ARG_2). Check the script's argumentsPrompt from get_scripting_tips.
  • input_data (JSON object, optional):
    • Primarily for kb_script_id scripts designed to accept named, structured inputs.
    • Values from this object replace placeholders in the script (e.g., --MCP_INPUT:yourKeyName). See argumentsPrompt from get_scripting_tips.
    • Values (strings, numbers, booleans, simple arrays/objects) are converted to their AppleScript literal equivalents.

Other Options:

  • timeout_seconds (integer, optional, default: 60): Maximum execution time.
  • output_format_mode (enum, optional, default: 'auto'): Controls osascript output formatting flags.
    • 'auto': (Default) Uses human-readable for AppleScript (-s h), and direct output (no -s flags) for JXA.
    • 'human_readable': Forces -s h (human-readable output, mainly for AppleScript).
    • 'structured_error': Forces -s s (structured error reporting, mainly for AppleScript).
    • 'structured_output_and_error': Forces -s ss (structured output for main result and errors, mainly for AppleScript).
    • 'direct': No -s flags are used (recommended for JXA, also the behavior for JXA in auto mode).
  • include_executed_script_in_output (boolean, optional, default: false): If true, the output will include the full script content (after any placeholder substitutions for knowledge base scripts) or the script path that was executed. This is appended as an additional text part in the output content array.
  • include_substitution_logs (boolean, optional, default: false): If true, detailed logs of placeholder substitutions performed on knowledge base scripts are included in the output. This is useful for debugging how input_data and arguments are processed and inserted into the script. The logs are prepended to the script output on success or appended to the error message on failure.
  • report_execution_time (boolean, optional, default: false): If true, an additional message with the formatted script execution time will be included in the response content array.

SECURITY WARNING & MACOS PERMISSIONS: (Same critical warnings as before about arbitrary script execution and macOS Automation/Accessibility permissions).

Examples:

  • (Existing examples for inline/file path remain relevant)
  • Using Knowledge Base Script by ID:
    {
      "toolName": "execute_script",
      "input": {
        "kb_script_id": "safari_get_active_tab_url",
        "timeout_seconds": 10
      }
    }
    
  • Using Knowledge Base Script by ID 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"
        }
      }
    }
    

Response Format:

The execute_script tool returns a response in the following format:

{
  content: Array<{
    type: 'text';
    text: string;
  }>;
  isError?: boolean;
}
  • content: An array of text content items containing the script output
  • isError: (boolean, optional) Set to true when the script execution produced an error. This flag is set when:
    • The script output (stdout) starts with "Error" (case-insensitive)
    • This helps clients easily determine if the execution failed without parsing the output text

Example Response (Success):

{
  "content": [{
    "type": "text",
    "text": "Script executed successfully"
  }]
}

Example Response (Error):

{
  "content": [{
    "type": "text",
    "text": "Error: Cannot find application 'Safari'"
  }],
  "isError": true
}

2. get_scripting_tips - The Robot's Encyclopedia

Your personal automation librari


README truncated. View full README on GitHub.

Alternatives

Related Skills

Browse all skills
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

6
cli-builder

Guide for building TypeScript CLIs with Bun. Use when creating command-line tools, adding subcommands to existing CLIs, or building developer tooling. Covers argument parsing, subcommand patterns, output formatting, and distribution.

2
chief-architect

PERSONAL APP ARCHITECT - Strategic development orchestrator for personal productivity applications. Analyzes project context, makes architectural decisions for single-developer projects, delegates to specialized skills, and ensures alignment between user experience goals and technical implementation. Optimized for personal apps targeting 10-100 users.

0
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

0
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

0
ai-organizer-ui-consolidation

Build a unified, ADHD-friendly web UI that consolidates 70+ CLI tools into a beautiful liquid glass interface for the AI File Organizer. Use when creating the complete frontend application that replaces all terminal interactions with a macOS-inspired dashboard for file organization, search, VEO prompts, and system management.

0