mcp-server-macos
v1.3.3Let your AI assistant use your Mac: an MCP server for macOS, built on pymacos.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_clipboard Read the clipboard
Read the clipboard: its text, whether it holds an image, and the files on it. What the user copied last may be private (a password, a message): read it when the task calls for it.
get_clipboard_image Get the image on the clipboard
Get the image on the clipboard, as a PNG. Fails when the clipboard holds no image.
set_clipboard Copy text to the clipboard
Put text on the clipboard, replacing what it held, for the user to paste.
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to put on the clipboard. |
sensitive | boolean | True for a password or a token: clipboard managers are asked not to show it or keep it in their history. Any app can still read it, so clear the clipboard after use. |
copy_files_to_clipboard Copy files to the clipboard
Put files on the clipboard, replacing what it held, as if they were copied in Finder: pasting in Finder copies them there, and apps like Mail attach them.
| Parameter | Type | Description |
|---|---|---|
paths * | array | The paths of the files and folders to copy. They must exist. |
copy_image_to_clipboard Copy an image to the clipboard
Put an image on the clipboard, from a file, replacing what it held. Other apps get it as an image copied in Preview, not as a file.
| Parameter | Type | Description |
|---|---|---|
path * | string | The path of the image file, in any format macOS opens (PNG, JPEG, HEIC, GIF, TIFF, PDF...). |
clear_clipboard Clear the clipboard
Empty the clipboard. What it held is gone.
wait_for_clipboard_change Wait for something to be copied
Wait until the user, or an app, copies something new, and return it. Clearing the clipboard doesn't count. Fails when nothing is copied in time.
| Parameter | Type | Description |
|---|---|---|
include_sensitive | boolean | False to wait on past a copy marked as sensitive (a password, from a password manager), for the next one. |
timeout_seconds | number | How long to wait, in seconds, before giving up. |
show_alert Show an alert
Show the user an alert with an OK button, and wait until it's dismissed. To tell them something without waiting, send a notification instead.
| Parameter | Type | Description |
|---|---|---|
message * | string | What the dialog says. |
detail | Smaller text under the message. | |
timeout_seconds | number | How long to wait for the user, in seconds, before closing the dialog as if it was cancelled. |
ask_confirmation Ask a yes or no question
Ask the user a yes or no question in a dialog, and wait for the answer.
| Parameter | Type | Description |
|---|---|---|
message * | string | What the dialog says. |
cancel | string | The label of the button that cancels. |
ok | string | The label of the button that confirms. |
timeout_seconds | number | How long to wait for the user, in seconds, before closing the dialog as if it was cancelled. |
title | The dialog's title. |
ask_text Ask for a line of text
Ask the user for a line of text in a dialog, and wait for it. What they type comes back as the result, a password included: ask for one only when the task needs it.
| Parameter | Type | Description |
|---|---|---|
message * | string | What the dialog says. |
default | string | Text the field starts with. Not a secret: other processes of the user can see it. |
hidden | boolean | True to show dots instead of what's typed, for a password. |
timeout_seconds | number | How long to wait for the user, in seconds, before closing the dialog as if it was cancelled. |
title | The dialog's title. |
ask_choice Ask to pick from a list
Let the user pick one option from a list, in a dialog. It waits until they answer, or the time runs out.
| Parameter | Type | Description |
|---|---|---|
options * | array | The options to pick from. |
default | The option selected when the dialog opens. | |
prompt | What the dialog says above the list. | |
timeout_seconds | number | How long to wait for the user, in seconds, before closing the dialog as if it was cancelled. |
title | The dialog's title. |
ask_for_files Ask to pick files
Let the user pick a file, or several, in the system's file picker. It waits until they answer, or the time runs out.
| Parameter | Type | Description |
|---|---|---|
folder | The folder the picker opens in. | |
multiple | boolean | True to let the user pick several files. |
prompt | What the picker says. | |
timeout_seconds | number | How long to wait for the user, in seconds, before closing the dialog as if it was cancelled. |
types | Limit the choice, by extension (['pdf', 'png']) or type identifier (['public.image']). |
ask_for_folder Ask to pick a folder
Let the user pick a folder in the system's folder picker. It waits until they answer, or the time runs out.
| Parameter | Type | Description |
|---|---|---|
folder | The folder the picker opens in. | |
prompt | What the picker says. | |
timeout_seconds | number | How long to wait for the user, in seconds, before closing the dialog as if it was cancelled. |
check_notification_permission Check whether notifications are allowed
Check whether send_notification can show notifications, without sending one. A Focus mode such as Do Not Disturb can still hide notifications that are allowed.
send_notification Send a notification
Show a notification on this Mac, in the top-right corner of the screen and in Notification Center. macOS shows it as coming from Script Editor. Text over 4096 characters is clipped. Don't put a secret in a notification: other processes of the user can see its text while it's being posted.
| Parameter | Type | Description |
|---|---|---|
message * | string | The notification's text. |
sound | The name of a system alert sound to play, e.g. 'Glass', 'Ping' or 'Basso'. Silent by default. | |
subtitle | A line between the title and the text. | |
title | The title, in bold above the text. |
get_ui_elements List what an app shows
List what an app shows on screen: its buttons, text fields, links, checkboxes, tabs and menus, each with an id, its name, its value and where it is. Use it to see an app before acting on it, rather than a screenshot: then press_ui_element, set_ui_element_value or click_menu_item with what it gives. Only what can be seen is listed: the window in front, with the panels over it. When a menu, a dialog or a sheet (a save panel) is open, only it is, as nothing else can be used until it closes. Web pages are read too, in Safari, Chrome and Electron apps. Some apps (games, a few cross-platform ones)…
| Parameter | Type | Description |
|---|---|---|
app | The app, by name, bundle identifier or path. The app in front by default. | |
include_text | boolean | Also list what's there to be read (text, headings, images), not only the controls. |
max_elements | integer | The most elements to list. |
find_ui_elements Find an element on screen
Find the elements on screen with a name, a role, or both: the 'Send' button, the search field. Those named exactly so come first ('Save' before "Don't Save"), then the others, top to bottom. Text is found too, not only controls. Give a name, a role, or both.
| Parameter | Type | Description |
|---|---|---|
app | The app, by name, bundle identifier or path. The app in front by default. | |
name | A part of its name, label, text, placeholder or tooltip, in any case. | |
role | What it is: 'button', 'text field', 'link', 'check box', 'menu item', 'search field'... |
wait_for_ui_element Wait for an element
Wait until an element shows up (a page loaded, a dialog opened, a button enabled), and return it; null if it doesn't within the timeout. An app that isn't running yet is waited for too.
| Parameter | Type | Description |
|---|---|---|
app | The app, by name, bundle identifier or path. The app in front by default. | |
name | A part of its name, label or text, in any case. | |
role | What it is: 'button', 'text field', 'link'... | |
timeout_seconds | number | How long to wait at most, in seconds. |
get_focused_ui_element Get the focused element
Get the element keystrokes go to now (a text field, a list), in whichever app. Null when there's none.
get_ui_element_at Get the element at a point
Get the element at a point of the screen, in whichever app shows it there: what a click there would reach.
| Parameter | Type | Description |
|---|---|---|
x * | number | Across, in points from the left of the main display. |
y * | number | Down, in points from the top of the main display. |
read_ui_element_text Read an element's text
Read all the text an element holds, its own and what's in it, what's scrolled out of view included: a long text area, a message, a dialog.
| Parameter | Type | Description |
|---|---|---|
id * | integer | The element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it. |
focus_ui_element Focus an element
Bring an element's app to the front and give it the keyboard focus, for type_text or press_keys to go to it.
| Parameter | Type | Description |
|---|---|---|
id * | integer | The element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it. |
set_ui_element_value Set an element's value
Set what an element holds: a text field's text, replacing it, or a slider's position. When the app refuses, or a web form doesn't notice, focus_ui_element and type_text instead.
| Parameter | Type | Description |
|---|---|---|
id * | integer | The element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it. |
value * | Text for a text field (it replaces what's there), a number for a slider. |
press_ui_element Press an element
Use an element as a click would: press a button, follow a link, toggle a checkbox, choose a tab or a menu item. It's done through Accessibility: the pointer doesn't move, and the window needn't be in front. What it does is the app's: a button may send, delete or buy.
| Parameter | Type | Description |
|---|---|---|
id * | integer | The element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it. |
click_ui_element Click an element
Click an element's middle with the mouse, bringing its app to the front: for a double-click, a right click, or an element press_ui_element doesn't work on.
| Parameter | Type | Description |
|---|---|---|
id * | integer | The element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it. |
button | string | 'right' opens a context menu. |
count | integer | 2 double-clicks: opens a file in a list. |
perform_ui_action Perform an element's action
Ask an element to do one of its actions, as its actions field lists them.
| Parameter | Type | Description |
|---|---|---|
action * | string | One of the element's actions: 'AXShowMenu' opens its menu, 'AXIncrement' and 'AXDecrement' step a slider or a stepper, 'AXConfirm', 'AXCancel', 'AXPick'. |
id * | integer | The element's id, from get_ui_elements, find_ui_elements or another tool of these that returned it. |
find_tools Find a tool
Search every tool this server has, enabled or not: the best matches first. A tool that isn't enabled yet is called once its toolset is, with enable_toolsets.
| Parameter | Type | Description |
|---|---|---|
query * | string | What the tool should do, in a few words, such as 'encrypt a pdf' or 'take a screenshot'. |
limit | integer | The most tools to return. |
toolset | Only this toolset's tools: all of them, whatever the query. |
enable_toolsets Enable toolsets
Add toolsets to this server: their tools are listed, and callable, from now on, as the others. Enable only what the task needs: each toolset makes the list of tools longer. The toolsets: - appearance: Tools for the system appearance (Light and Dark mode, the accent color...). Tools: get_appearance, set_appearance, wait_for_appearance_change - apps: Tools for applications: the running and the installed ones, opening, quitting and uninstalling them. Tools: list_running_apps, get_frontmost_app, get_running_app, list_installed_apps, open_app, activate_app, set_app_hidden, quit_app, get_default_ap…
| Parameter | Type | Description |
|---|---|---|
names * | array | The toolsets to add, such as ['pdf']. |