applescript-mcp

applescript-mcp

Enables LLM applications to interact with macOS through AppleScript.

joshrutkowski

OS Automation
Visit Server

Tools

system_toggle_dark_mode

[System control and information] Toggle system dark mode

system_volume

[System control and information] Set system volume

system_get_frontmost_app

[System control and information] Get the name of the frontmost application

system_launch_app

[System control and information] Launch an application

system_quit_app

[System control and information] Quit an application

system_get_battery_status

[System control and information] Get battery level and charging status

calendar_add

[Calendar operations] Add a new event to Calendar

calendar_list

[Calendar operations] List all events for today

finder_get_selected_files

[Finder and file operations] Get currently selected files in Finder

finder_search_files

[Finder and file operations] Search for files by name

finder_quick_look_file

[Finder and file operations] Preview a file using Quick Look

clipboard_get_clipboard

[Clipboard management operations] Get current clipboard content

clipboard_set_clipboard

[Clipboard management operations] Set clipboard content

clipboard_clear_clipboard

[Clipboard management operations] Clear clipboard content

notifications_toggle_do_not_disturb

[Notification management] Toggle Do Not Disturb mode using keyboard shortcut

notifications_send_notification

[Notification management] Send a system notification

iterm_paste_clipboard

[iTerm terminal operations] Paste clipboard content into iTerm

iterm_run

[iTerm terminal operations] Run a command in iTerm

README

applescript-mcp MCP Server

A Model Context Protocol server that enables LLM applications to interact with macOS through AppleScript. This server provides a standardized interface for AI applications to control system functions, manage files, handle notifications, and more.

Features

  • 🗓️ Calendar management (events, reminders)
  • 📋 Clipboard operations
  • 🔍 Finder integration
  • 🔔 System notifications
  • ⚙️ System controls (volume, dark mode, apps)
  • 📟 iTerm terminal integration

Planned Features

  • 📬 Mail (list emails, save attachments, summarize, send)
  • 🧭 Safari (open in Safari, save page content, get selected page/tab)
  • 💬 Messages (send, get, list)
  • ✅ Reminders (create, get)
  • 🗒️ Notes (create, get, list)

Prerequisites

  • macOS 10.15 or later
  • Node.js 18 or later

Available Categories

Calendar

Command Description Parameters
add Create calendar event title, startDate, endDate
list List today's events None

Clipboard

Command Description Parameters
set_clipboard Copy to clipboard content
get_clipboard Get clipboard contents None
clear_clipboard Clear clipboard None

Finder

Command Description Parameters
get_selected_files Get selected files None
search_files Search for files query, location (optional)
quick_look Preview file path

Notifications

Command Description Parameters
send_notification Show notification title, message, sound (optional)
toggle_do_not_disturb Toggle DND mode None

System

Command Description Parameters
volume Set system volume level (0-100)
get_frontmost_app Get active app None
launch_app Open application name
quit_app Close application name, force (optional)
toggle_dark_mode Toggle dark mode None

iTerm

Command Description Parameters
paste_clipboard Paste to iTerm None
run Execute command command, newWindow (optional)

Development

Setup

# Install dependencies
npm install

# Build the server
npm run build

# Launch MCP Inspector
# See: https://modelcontextprotocol.io/docs/tools/inspector
npx @modelcontextprotocol/inspector node path/to/server/index.js args...

Adding New Functionality

1. Create Category File

Create src/categories/newcategory.ts:

import { ScriptCategory } from "../types/index.js";

export const newCategory: ScriptCategory = {
  name: "category_name",
  description: "Category description",
  scripts: [
    // Scripts will go here
  ]
};

2. Add Scripts

{
  name: "script_name",
  description: "What the script does",
  schema: {
    type: "object",
    properties: {
      paramName: {
        type: "string",
        description: "Parameter description"
      }
    },
    required: ["paramName"]
  },
  script: (args) => `
    tell application "App"
      // AppleScript code using ${args.paramName}
    end tell
  `
}

3. Register Category

Update src/index.ts:

import { newCategory } from "./categories/newcategory.js";
// ...
server.addCategory(newCategory);

Debugging

Using MCP Inspector

The MCP Inspector provides a web interface for testing and debugging your server:

npm run inspector

Logging

Enable debug logging by setting the environment variable:

DEBUG=applescript-mcp* npm start

Common Issues

  • Permission Errors: Check System Preferences > Security & Privacy
  • Script Failures: Test scripts directly in Script Editor.app
  • Communication Issues: Check stdio streams aren't being redirected

Resources

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT License - see LICENSE for details

Recommended Servers

@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
ThingsPanel MCP

ThingsPanel MCP

An integration server that connects AI models with ThingsPanel IoT platform, allowing AI assistants to interact with IoT devices through natural language for device control, data retrieval, and management operations.

Official
Python
Beamlit MCP Server

Beamlit MCP Server

An MCP server implementation that enables seamless integration between Beamlit CLI and AI models using the Model Context Protocol standard.

Official
TypeScript
MCP Python Toolbox

MCP Python Toolbox

A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.

Local
Python
Shell MCP Server

Shell MCP Server

A secure server that enables AI applications to execute shell commands in specified directories, supporting multiple shell types (bash, sh, cmd, powershell) with built-in security features like directory isolation and timeout control.

Local
Python
Command Executor MCP Server

Command Executor MCP Server

A Model Context Protocol server that allows secure execution of pre-approved commands, enabling AI assistants to safely interact with the user's system.

Local
JavaScript
Siri Shortcuts MCP Server

Siri Shortcuts MCP Server

Enables interaction with macOS Siri Shortcuts via the Model Context Protocol, allowing users to list, open, and run shortcuts dynamically with optional inputs.

Local
TypeScript
DevEnvInfoServer

DevEnvInfoServer

An MCP server that provides detailed information about your development environment to the Cursor code editor, enabling more context-aware assistance.

Local
Python
mcp-cli-exec MCP Server

mcp-cli-exec MCP Server

A CLI command execution server that enables running shell commands with structured output, providing detailed execution results including stdout, stderr, exit code, and execution duration.

Local
TypeScript