applescript-mcp

  • OS Automation
TypeScript
MIT
57
  • Apple
-
security - not tested
A
license - permissive license (MIT)
-
quality - not tested

Enables LLM applications to interact with macOS through AppleScript.

  1. Tools
  2. Prompts
  3. Resources
  4. Server Configuration
  5. README.md

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DEBUGNoEnable debug logging for applescript-mcp
README.md

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

CommandDescriptionParameters
addCreate calendar eventtitle, startDate, endDate
listList today's eventsNone

Clipboard

CommandDescriptionParameters
set_clipboardCopy to clipboardcontent
get_clipboardGet clipboard contentsNone
clear_clipboardClear clipboardNone

Finder

CommandDescriptionParameters
get_selected_filesGet selected filesNone
search_filesSearch for filesquery, location (optional)
quick_lookPreview filepath

Notifications

CommandDescriptionParameters
send_notificationShow notificationtitle, message, sound (optional)
toggle_do_not_disturbToggle DND modeNone

System

CommandDescriptionParameters
volumeSet system volumelevel (0-100)
get_frontmost_appGet active appNone
launch_appOpen applicationname
quit_appClose applicationname, force (optional)
toggle_dark_modeToggle dark modeNone

iTerm

CommandDescriptionParameters
paste_clipboardPaste to iTermNone
runExecute commandcommand, 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

GitHub Badge

Glama performs regular codebase and documentation scans to:

  • Confirm that the MCP server is working as expected.
  • Confirm that there are no obvious security issues with dependencies of the server.
  • Extract server characteristics such as tools, resources, prompts, and required parameters.

Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.

Copy the following code to your README.md file:

Alternative MCP servers