The AppleScript MCP server provides a standardized interface for AI applications to interact with macOS through AppleScript. It enables control of system functions, file management, notifications, and various macOS applications like Calendar, Notes, Mail, and Messages.
To get started with the AppleScript MCP server:
# Install dependencies
npm install
# Build the server
npm run build
After building the server, add the following to your mcp.json
file:
{
"mcpServers": {
"applescript-mcp-server": {
"command": "node",
"args": ["/path/to/applescript-mcp/dist/index.js"]
}
}
}
Some features require specific macOS permissions:
Command | Description | Parameters |
---|---|---|
add |
Create calendar event | title , startDate , endDate , calendar (optional) |
list |
List today's events | None |
# Create a new calendar event
Create a calendar event titled "Team Meeting" starting tomorrow at 2pm for 1 hour
# List today's events
What events do I have scheduled for today?
Command | Description | Parameters |
---|---|---|
set_clipboard |
Copy to clipboard | content |
get_clipboard |
Get clipboard contents | None |
clear_clipboard |
Clear clipboard | None |
# Copy text to clipboard
Copy "Remember to buy groceries" to my clipboard
# Get clipboard contents
What's currently in my clipboard?
# Clear clipboard
Clear my clipboard
Command | Description | Parameters |
---|---|---|
get_selected_files |
Get selected files | None |
search_files |
Search for files | query , location (optional) |
quick_look |
Preview file | path |
# Get selected files in Finder
What files do I currently have selected in Finder?
# Search for files
Find all PDF files in my Documents folder
# Preview a file
Show me a preview of ~/Documents/report.pdf
Command | Description | Parameters |
---|---|---|
send_notification |
Show notification | title , message , sound (optional) |
toggle_do_not_disturb |
Toggle DND mode | None |
# Send a notification
Send me a notification with the title "Reminder" and message "Time to take a break"
# Toggle Do Not Disturb
Turn on Do Not Disturb mode
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 |
# Set system volume
Set my Mac's volume to 50%
# Get active application
What app am I currently using?
# Launch an application
Open Safari
# Quit an application
Close Spotify
# Toggle dark mode
Switch to dark mode
Command | Description | Parameters |
---|---|---|
paste_clipboard |
Paste to iTerm | None |
run |
Execute command | command , newWindow (optional) |
# Paste clipboard to iTerm
Paste my clipboard contents into iTerm
# Run a command in iTerm
Run "ls -la" in iTerm
# Run a command in a new iTerm window
Run "top" in a new iTerm window
Command | Description | Parameters |
---|---|---|
run_shortcut |
Run a shortcut | name , input (optional) |
list_shortcuts |
List all available shortcuts | limit (optional) |
# List available shortcuts
List all my available shortcuts
# List with limit
Show me my top 5 shortcuts
# Run a shortcut
Run my "Daily Note in Bear" shortcut
# Run a shortcut with input
Run my "Add to-do" shortcut with input "Buy groceries"
Command | Description | Parameters |
---|---|---|
create_email |
Create a new email in Mail.app | recipient , subject , body |
list_emails |
List emails from a mailbox | mailbox (optional), count (optional), unreadOnly (optional) |
get_email |
Get a specific email by search | subject (optional), sender (optional), dateReceived (optional), mailbox (optional), account (optional), unreadOnly (optional), includeBody (optional) |
# Create a new email
Compose an email to [email protected] with subject "Meeting Tomorrow" and body "Hi John, Can we meet tomorrow at 2pm?"
# List emails
Show me my 10 most recent unread emails
# Get a specific email
Find the email from [email protected] about "Project Update"
Command | Description | Parameters |
---|---|---|
list_chats |
List available iMessage and SMS chats | includeParticipantDetails (optional, default: false) |
get_messages |
Get messages from the Messages app | limit (optional, default: 100) |
search_messages |
Search for messages containing specific text | searchText , sender (optional), chatId (optional), limit (optional, default: 50), daysBack (optional, default: 30) |
compose_message |
Open Messages app with pre-filled message | recipient (required), body (optional), auto (optional, default: false) |
# List available chats
Show me my recent message conversations
# Get recent messages
Show me my last 20 messages
# Search messages
Find messages containing "dinner plans" from John in the last week
# Compose a message
Send a message to 555-123-4567 saying "I'll be there in 10 minutes"
Command | Description | Parameters |
---|---|---|
create |
Create a note with markdown-like formatting | title , content , format (optional with formatting options) |
createRawHtml |
Create a note with direct HTML content | title , html |
list |
List notes, optionally from a specific folder | folder (optional) |
get |
Get a specific note by title | title , folder (optional) |
search |
Search for notes containing specific text | query , folder (optional), limit (optional, default: 5), includeBody (optional, default: true) |
# Create a new note with markdown formatting
Create a note titled "Meeting Minutes" with content "# Discussion Points\n- Project timeline\n- Budget review\n- Next steps" and format headings and lists
# Create a note with HTML
Create a note titled "Formatted Report" with HTML content "<h1>Quarterly Report</h1><p>Sales increased by <strong>15%</strong></p>"
# List notes
Show me all my notes in the "Work" folder
# Get a specific note
Show me my note titled "Shopping List"
# Search notes
Find notes containing "recipe" in my "Cooking" folder
Command | Description | Parameters |
---|---|---|
create_document |
Create a new Pages document with plain text | content |
# Create a new Pages document
Create a Pages document with the content "Project Proposal\n\nThis document outlines the scope and timeline for the upcoming project."
The MCP Inspector provides a web interface for testing and debugging:
npm run inspector
or
npx @modelcontextprotocol/inspector node path/to/server/index.js args...
DEBUG=applescript-mcp* npm start
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.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
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.
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.