macos-mcp
v1.2.1
Published
MCP server for controlling macOS features (volume, mail) via AppleScript
Maintainers
Readme
macos-mcp
A comprehensive Model Context Protocol (MCP) server that provides tools for controlling macOS system features via AppleScript. Control your Mac's applications, system settings, and more through a simple interface.
Features
Audio Tools
get_volume_settings- Get all volume settings (output, input, alert, mute status)get_volume- Get current output volume (0-100)set_volume- Set output volume levelis_muted- Check if audio is mutedmute- Mute audio outputunmute- Unmute audio outputtoggle_mute- Toggle mute statebeep- Play system beep sound
Calendar Tools
calendar_list_calendars- List all calendarscalendar_list_events- List calendar events with date filteringcalendar_create_event- Create new calendar events with location, notes, and morecalendar_delete_event- Delete calendar events by title
Chrome Tools
chrome_get_all_tabs- List all tabs across all Chrome windowschrome_get_active_tab- Get the currently active tabchrome_open_url- Open a URL in a new tabchrome_close_tab- Close a specific tabchrome_reload_tab- Reload a specific tabchrome_execute_javascript- Execute JavaScript in a tabchrome_get_windows- List all Chrome windowschrome_scroll- Scroll a page by pixels or to top/bottom
Contacts Tools
contacts_list_people- List all contactscontacts_create_contact- Create a new contact with name, email, phone, organizationcontacts_delete_contact- Delete a contactcontacts_list_groups- List all contact groupscontacts_search- Search contacts by name, email, or organizationcontacts_update- Update existing contact informationcontacts_add_to_group- Add a contact to a group
Finder Tools
finder_open_path- Open files or folders in Finderfinder_new_window- Open a new Finder windowfinder_get_selection- Get currently selected itemsfinder_get_current_path- Get the current Finder directoryfinder_set_view- Change Finder view modefinder_search- Search for files in Finderfinder_move_to_trash- Move files to trashfinder_empty_trash- Empty the trashfinder_create_folder- Create a new folder
Mail Tools
get_mail_accounts- List configured Apple Mail accountsget_mails- Get emails from inboxcompose_mail- Compose new email with recipients, subject, bodysearch_mails- Search emails by subject, sender, or contentcheck_mail- Check for new mailget_unread_count- Get unread counts per mailboxget_total_unread_count- Get total unread count
Notes Tools
notes_list_folders- List all Notes foldersnotes_list_notes- List notes from a foldernotes_create_note- Create a new note (supports HTML)notes_delete_note- Delete a notenotes_update- Update note contentnotes_search- Search notes by title or contentnotes_create_folder- Create a new foldernotes_move- Move a note to a different foldernotes_get- Get details of a specific notenotes_delete_folder- Delete a foldernotes_get_folder_info- Get folder informationnotes_search_in_folder- Search within a specific foldernotes_search_by_title- Search by title only
Reminders Tools
reminders_get_lists- Get all reminder listsreminders_get_reminders- Get reminders from a listreminders_create_reminder- Create a new reminder with due date and priorityreminders_complete_reminder- Mark a reminder as completedreminders_delete_reminder- Delete a reminderreminders_update- Update reminder detailsreminders_create_list- Create a new reminder listreminders_delete_list- Delete a reminder listreminders_search- Search reminders by title or body
Safari Tools
safari_get_all_tabs- List all tabs across all Safari windowssafari_get_active_tab- Get the currently active tabsafari_open_url- Open a URL in a new tabsafari_close_tab- Close a specific tabsafari_reload_tab- Reload a specific tabsafari_execute_javascript- Execute JavaScript in a tabsafari_get_windows- List all Safari windowssafari_navigate- Navigate to a URL in the current tabsafari_search_web- Perform a web searchsafari_go_back- Navigate back in historysafari_go_forward- Navigate forward in history
Terminal Tools
terminal_get_windows- List all Terminal windowsterminal_get_tabs- List tabs in a windowterminal_execute_command- Execute a command in a tabterminal_new_window- Create a new Terminal windowterminal_new_tab- Create a new tabterminal_close_tab- Close a specific tabterminal_get_current_directory- Get current working directoryterminal_get_contents- Get terminal output contentsterminal_clear- Clear the terminal screen
Installation
npm install -g macos-mcp
# or
bunx macos-mcpUsage
Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"macos": {
"command": "bunx",
"args": ["macos-mcp"]
}
}
}Or if installed globally:
{
"mcpServers": {
"macos": {
"command": "macos-mcp"
}
}
}Claude Code
Add to your Claude Code MCP settings (~/.claude/settings.json):
{
"mcpServers": {
"macos": {
"command": "bunx",
"args": ["macos-mcp"]
}
}
}Running Directly
# With bun
bun run macos-mcp
# Or after global install
macos-mcpInteractive CLI
The project also includes an interactive CLI for testing and manual control:
# Run the CLI
bun run cli
# Or with npm
npm run cliSee cli/README.md for more details on the interactive CLI.
Testing with MCP Inspector
npx @modelcontextprotocol/inspector bunx macos-mcpPermissions
This MCP server uses AppleScript to control macOS features. You may need to grant permissions:
- Accessibility: System Settings > Privacy & Security > Accessibility
- Automation: System Settings > Privacy & Security > Automation
- Application Permissions: When first accessing apps (Mail, Calendar, Contacts, Notes, Reminders), macOS will prompt for permission
Project Structure
cli/ # Interactive CLI interface
├── audio.ts # Audio controls
├── calendar.ts # Calendar management
├── chrome.ts # Chrome browser control
├── contacts.ts # Contacts management
├── finder.ts # Finder operations
├── mail.ts # Mail operations
├── notes.ts # Notes management
├── reminders.ts # Reminders management
├── safari.ts # Safari browser control
├── terminal.ts # Terminal control
└── index.ts # CLI entry point
mcp/ # MCP server
├── index.ts # Tool definitions and handlers
├── macos-mcp.ts # MCP server entry point
├── tools/ # Tool definitions
└── handlers/ # Tool handlers
src/ # Core functionality
├── audio/ # Audio control functions
├── calendar/ # Calendar functions
├── chrome/ # Chrome automation
├── contacts/ # Contacts management
├── finder/ # Finder operations
├── mail/ # Apple Mail functions
├── notes/ # Notes functions
├── reminders/ # Reminders functions
├── safari/ # Safari automation
└── terminal/ # Terminal controlDevelopment
Local Development
# Clone the repo
git clone https://github.com/kartikk-k/macos-mcp.git
cd macos-mcp
# Install dependencies
bun install
# Run the MCP server
bun run start
# Run the interactive CLI
bun run cli
# Test with inspector
bun run inspectorAdding New Tools
- Add your function to the appropriate module in
src/ - Export it from the module's
index.ts - Add the tool definition to
mcp/tools/{module}.ts - Add the handler in
mcp/handlers/{module}.ts - (Optional) Add CLI interface in
cli/{module}.ts
See CLAUDE.md for detailed development guidelines.
License
MIT
