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
macOS Defaults MCP Server

macOS Defaults MCP Server

MCP server that enables reading and writing macOS system preferences and application settings through the defaults system.

Local
Python
Shell MCP Server

Shell MCP Server

A Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.

Local
Python
MCP Command Server

MCP Command Server

A secure server that allows LLM applications like Claude to execute whitelisted system commands with user confirmation and comprehensive security features.

Local
Python
iTerm MCP Server

iTerm MCP Server

This MCP server enables users to execute shell commands in the current iTerm2 session through integration with Claude Desktop, facilitating seamless command execution via the Model Context Protocol.

Local
TypeScript
WinTerm MCP

WinTerm MCP

A Model Context Protocol server that provides programmatic access to the Windows terminal, enabling AI models to interact with the Windows command line through standardized tools for writing commands, reading output, and sending control signals.

Local
JavaScript
MCP Server: SSH Rails Runner

MCP Server: SSH Rails Runner

Enables secure remote execution of Rails console commands over SSH for read-only operations, mutation planning, and executing approved changes in a deployed Rails environment.

Local
TypeScript