The macOS Automator MCP Server provides a specialized interface for executing AppleScript and JavaScript for Automation (JXA) scripts on macOS systems. It features a knowledge base of pre-defined scripts that can be accessed by ID and supports various script execution methods including inline scripts, script files, and argument passing.
The simplest way to use this server is through npx
. Add the following configuration to your MCP client's mcp.json
:
{
"mcpServers": {
"macos_automator": {
"command": "npx",
"args": [
"-y",
"@steipete/macos-automator-mcp@latest"
]
}
}
}
If you prefer to run the server directly from a cloned repository:
Clone the repository:
git clone https://github.com/steipete/macos-automator-mcp.git
cd macos-automator-mcp
npm install
Configure your MCP client to use the local version:
{
"mcpServers": {
"macos_automator_local": {
"command": "/absolute/path/to/your/cloned/macos-automator-mcp/start.sh",
"env": {
"LOG_LEVEL": "DEBUG"
}
}
}
}
Before using the server, you must configure macOS permissions:
The execute_script
tool runs AppleScript or JXA scripts on macOS.
{
"toolName": "execute_script",
"input": {
"script_content": "tell application \"Safari\" to get URL of front document"
}
}
{
"toolName": "execute_script",
"input": {
"script_path": "/Users/username/scripts/my_script.applescript",
"timeout_seconds": 30
}
}
{
"toolName": "execute_script",
"input": {
"kb_script_id": "safari_get_active_tab_url",
"timeout_seconds": 10
}
}
{
"toolName": "execute_script",
"input": {
"kb_script_id": "finder_create_folder_at_path",
"input_data": {
"folder_name": "New MCP Folder",
"parent_path": "~/Desktop"
}
}
}
The get_scripting_tips
tool helps you discover available scripts in the knowledge base.
{
"toolName": "get_scripting_tips",
"input": {
"list_categories": true
}
}
{
"toolName": "get_scripting_tips",
"input": {
"category": "safari"
}
}
{
"toolName": "get_scripting_tips",
"input": {
"search_term": "clipboard"
}
}
{
"toolName": "execute_script",
"input": {
"kb_script_id": "safari_get_front_tab_url"
}
}
{
"toolName": "execute_script",
"input": {
"kb_script_id": "chrome_open_url_new_tab_profile",
"input_data": {
"url": "https://example.com",
"profile_name": "Default"
}
}
}
{
"toolName": "execute_script",
"input": {
"kb_script_id": "finder_create_new_folder_desktop",
"input_data": {
"folder_name": "My Project"
}
}
}
{
"toolName": "execute_script",
"input": {
"kb_script_id": "fileops_read_text_file",
"input_data": {
"file_path": "~/Documents/notes.txt"
}
}
}
{
"toolName": "execute_script",
"input": {
"script_content": "set volume output volume 50"
}
}
{
"toolName": "execute_script",
"input": {
"kb_script_id": "systemsettings_toggle_dark_mode_ui"
}
}
You can configure the server using environment variables:
LOG_LEVEL
: Set logging level (DEBUG
, INFO
, WARN
, ERROR
)KB_PARSING
: Control knowledge base parsing (lazy
or eager
)LOCAL_KB_PATH
: Path to local knowledge base (default: ~/.macos-automator/knowledge_base
)timeout_seconds
parameteroutput_format_mode
set to direct
or auto
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "macos_automator" '{"command":"npx","args":["-y","@steipete/macos-automator-mcp@latest"]}'
See the official Claude Code MCP documentation for more details.
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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"macos_automator": {
"command": "npx",
"args": [
"-y",
"@steipete/macos-automator-mcp@latest"
]
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"macos_automator": {
"command": "npx",
"args": [
"-y",
"@steipete/macos-automator-mcp@latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect