run_osascriptLABSCO SUMMARY
Typed tools first, raw AppleScript as the escape hatch.
Moving a window, clicking a menu item and reading the clipboard each have their own validated tool, which is more predictable than generating AppleScript from scratch every time. run_osascript is still there for whatever the twelve do not cover.
What it is
An MCP server that wraps osascript in twelve typed tools with input validation, so a client can move windows, click menu items, type, read the clipboard and enumerate browser tabs on macOS.
What you get
- Windows moved, resized and targeted by index, and the frontmost app reported with its bundle ID (manage_windows, get_frontmost_app)
- The menu bar introspected and its items clicked, so a buried command is reachable (app_menu)
- Text typed and individual keys or shortcut combinations pressed (type_text, press_key)
- The clipboard read and written (get_clipboard, set_clipboard)
- Browser tabs listed with their titles and URLs (get_browser_tabs)
- Applications launched and URLs opened, and native macOS notifications posted (open_app, open_url, send_notification)
- Raw AppleScript run for the cases the typed tools do not cover (run_osascript)
Requirements
A current macOS and a recent Node; runs with npx -y mcp-osascript. macOS automation permissions have to be granted, and errors are classified so a permission refusal reads differently from a failure.
Setup effort
One command — claude mcp add osascript -- npx -y mcp-osascript
USE CASES
Reading what you have open in the browser
List the tabs with their titles and URLs, including which one is active.
Clicking a menu item that has no shortcut
Introspect the app's menu bar and click the item by name.
Arranging windows for a task
Position and resize the windows, checking which app is in front.
Moving text between apps
Read the clipboard, or set it and type the result into the focused field.
Being told when a long job finishes
Post a native macOS banner at the end of the run.
Automating something the typed tools do not cover
Fall back to raw AppleScript for that one step.
12 tools
Listed in project docs. Your client may show a different list.
get_clipboardset_clipboardsend_notificationopen_urlopen_appget_frontmost_appget_browser_tabstype_textpress_keymanage_windowsapp_menuBEFORE YOU INSTALL
What to know first
Tools you get
12 tools named in the project's documentation.
Requires
- npx on PATH
- Node.js 18+
Where it runs
All 4 documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
Claude Code
claude mcp add osascript -- npx -y mcp-osascriptMCP Clients
Claude Desktop, Cursor
{
"mcpServers": {
"osascript": {
"command": "npx",
"args": [
"-y",
"mcp-osascript"
]
}
}
}VS Code
{
"servers": {
"osascript": {
"command": "npx",
"args": [
"-y",
"mcp-osascript"
]
}
}
}