loading…
Search for a command to run...
loading…
Enables Large Language Models to automate macOS applications and execute AppleScript commands through natural language. It features built-in security protection
Enables Large Language Models to automate macOS applications and execute AppleScript commands through natural language. It features built-in security protections including application allowlists and dangerous pattern detection to prevent unauthorized or risky system operations.
An MCP (Model Context Protocol) server that enables Large Language Models to execute AppleScript commands on macOS. This allows LLMs to interact with and automate macOS applications through natural language requests.
Using uv:
uv pip install mcp-applescript
Or install from source:
git clone https://github.com/pietz/mcp-applescript.git
cd mcp-applescript
uv sync
mcp-applescript
The server runs using stdio transport, making it compatible with any MCP client.
run_applescriptExecute an AppleScript command on macOS.
Parameters:
script (string): The AppleScript code to executeReturns:
Example:
tell application "Mail"
get subject of first message of inbox
end tell
get_server_statusGet the current server configuration and security settings.
Returns:
Example Response:
{
"server": "MCP AppleScript",
"version": "0.1.0",
"security": {
"allowed_apps": ["Mail", "Calendar"],
"block_dangerous": true,
"timeout_seconds": 30
}
}
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"applescript": {
"command": "mcp-applescript",
"env": {
"ALLOWED_APPS": "mail,calendar,contacts,notes",
"BLOCK_DANGEROUS": "true"
}
}
}
}
ALLOWED_APPS (optional)
"mail,calendar,contacts" (lowercase recommended)"*")"*": Explicitly allows all applications"" (empty string): Blocks all applications (lockdown mode)BLOCK_DANGEROUS (optional)
"true" or "false""true"do shell script, file system access, system control commandsTIMEOUT (optional)
"30""env": {
// ALLOWED_APPS not set = allow all apps
"BLOCK_DANGEROUS": "true" // This is the default, can be omitted
}
"env": {
"ALLOWED_APPS": "mail,calendar,contacts",
"BLOCK_DANGEROUS": "true"
}
"env": {
"ALLOWED_APPS": "*", // or omit this line
"BLOCK_DANGEROUS": "false"
}
"env": {
"ALLOWED_APPS": "" // Empty string = block all
}
Application Allowlist (optional)
ALLOWED_APPS to restrict to specific applicationsDangerous Pattern Detection
do shell script)/System, /Library, ~/.ssh)Execution Timeout
-- ❌ BLOCKED: Shell command execution
do shell script "rm -rf ~/"
-- ❌ BLOCKED: System control
tell application "System Events" to shut down
-- ❌ BLOCKED: Sensitive file access
do shell script "cat ~/.ssh/id_rsa"
-- ❌ BLOCKED: Unauthorized application (if not in ALLOWED_APPS)
tell application "Terminal" to do script "echo test"
-- ✅ ALLOWED: Reading from allowed app
tell application "Mail"
get subject of first message of inbox
end tell
ALLOWED_APPS to only the applications you need for production useget_server_status tool to understand current configurationBefore running scripts, check what's allowed:
User: "What can you access on my system?"
LLM uses: get_server_status()
Response: "I can currently access: Mail, Calendar, and Contacts.
Dangerous operations are blocked, and scripts timeout after 30 seconds."
tell application "Mail"
get subject of first message of inbox
end tell
tell application "Calendar"
get summary of every event of calendar "Work"
end tell
-- This will be BLOCKED if "System Events" not in ALLOWED_APPS
tell application "System Events"
name of first process whose frontmost is true
end tell
-- Safe if no dangerous patterns
display notification "Hello from MCP!" with title "AppleScript"
MIT
Paul-Louis Pr�ve
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mcp-applescript": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.