mac-mcp
by AllenReder
README.md
# mac-mcp
[](https://glama.ai/mcp/servers/AllenReder/mac-mcp)
English | [简体中文](README.zh-CN.md)
A native Swift [MCP](https://modelcontextprotocol.io) server for personal data on macOS — Reminders, Calendar, Contacts, Notes, Mail, Messages, Photos, and system notifications. Zero third-party dependencies.

## Features
- **One LaunchAgent owns all permissions** — Ships as a signed `.app` holding macOS TCC grants in a single background process, shared across every MCP client over a local Unix socket (`0600`) with in-process fallback.
- **Permission-scoped tools** — 23 tools split by domain and boundary (`*_read`, `*_write`, `*_delete`, `*_send`), 9 enabled by default, with strict schema validation and per-action policies.
- **Safe by default** — Uses public Apple frameworks first (EventKit, Contacts, PhotoKit, UserNotifications), shows a local confirmation dialog before sends or destructive actions, and supports `request_id` idempotency.
- **Zero dependencies** — Pure Swift, built directly with Swift Package Manager.
## Quick Start
**Requirements:** macOS 14+ (building from source requires Swift 6.0 / Xcode 16+).
### Install from Releases
```bash
mkdir -p ~/Applications
curl -fL https://github.com/allenreder/mac-mcp/releases/latest/download/mac-mcp-macos.zip -o /tmp/mac-mcp.zip
[ -x ~/Applications/mac-mcp.app/Contents/MacOS/mac-mcp ] && ~/Applications/mac-mcp.app/Contents/MacOS/mac-mcp uninstall || true
rm -rf ~/Applications/mac-mcp.app && ditto -xk /tmp/mac-mcp.zip ~/Applications && rm /tmp/mac-mcp.zip
~/Applications/mac-mcp.app/Contents/MacOS/mac-mcp install
```
> Prebuilt releases are ad-hoc signed (not notarized). If you download via a browser, clear quarantine first: `xattr -dr com.apple.quarantine ~/Applications/mac-mcp.app`. Upgrading an ad-hoc build may require re-granting macOS permissions.
### Or build from source
```bash
git clone https://github.com/allenreder/mac-mcp.git
cd mac-mcp
scripts/install.sh
```
To keep TCC grants across rebuilds, sign with your own certificate:
```bash
SIGN_IDENTITY="Apple Development: Your Name (XXXXXXXXXX)" scripts/install.sh
```
### Connect your MCP client
For Claude Code:
```bash
claude mcp add mac -- ~/Applications/mac-mcp.app/Contents/MacOS/mac-mcp
```
Or add it to any client's JSON config (use an absolute path if `~` is not expanded):
```json
{
"mcpServers": {
"mac": {
"command": "~/Applications/mac-mcp.app/Contents/MacOS/mac-mcp"
}
}
}
```
### Hermes and other Agent Plugins clients
[`agent-plugin/`](agent-plugin) is an [Agent Plugins v1](https://agent-plugins.org) package: the `mac` MCP server plus a skill that teaches the agent the permission flow and tool conventions. It starts the app you installed above and ships no binary. For [Hermes Agent](https://github.com/NousResearch/hermes-agent):
```bash
hermes plugins install mac-mcp
hermes plugins enable mac-mcp
```
On first use, ask your agent to call `access_read` (`{"action": "status"}`) and `access_request` for any missing permissions. Full Disk Access (for Messages and Mail search) opens System Settings directly.
### Try it on Glama
mac-mcp is listed on [Glama](https://glama.ai/mcp/servers/AllenReder/mac-mcp). There you can browse its tools, check its quality score, and try it in the [MCP Inspector](https://glama.ai/mcp/inspector) before installing.
## Tools
| Domain | Group | Tools | Backend |
|---|---|---|---|
| Permissions | `core` | `access_read`, `access_request` | — |
| Reminders | `core` | `reminders_read`, `reminders_write`, `reminders_delete` | EventKit |
| Calendar | `core` | `calendar_read`, `calendar_write`, `calendar_delete` | EventKit |
| Contacts | `core` | `contacts_read`, `contacts_write`, `contacts_delete` | Contacts |
| Notes | `core` | `notes_read`, `notes_write`, `notes_delete` | JXA |
| Mail | `comms` | `mail_read`, `mail_write`, `mail_delete`, `mail_send` | Envelope Index + AppleScript |
| Messages | `comms` | `messages_read`, `messages_send` | `chat.db` + AppleScript |
| Photos | `media` | `photos_read`, `photos_write` | PhotoKit + AppleScript |
| Notify | `notify` | `notify` (`post`, `ask`, `speak`) | UserNotifications, AppKit |
- **Default tools (`"default"`):** `access_read`, `access_request`, `reminders_read`, `reminders_write`, `calendar_read`, `calendar_write`, `contacts_read`, `notes_read`, `notes_write`.
- **Full schema:** run `mac-mcp tools --all`.
- **Experimental actions:** `mail_send`, `messages_send`, Mail draft actions (`draft_get`, `draft_update`, `reply_draft`, `forward_draft`), Mail/Notes `attachment_export`, and Photos semantic search (`query`) are hidden unless `experimental = true`.
## Configuration
Optional config at `~/.config/mac-mcp/config.toml` (override with `MAC_MCP_CONFIG`):
```toml
tools = ["default", "comms", "photos_read"] # group names, tool names, or "all"
experimental = false # enable unverified actions
[policy] # allow / confirm / deny
mail_send = "confirm"
"reminders_delete.list" = "deny"
[files] # allowed roots for attachments, import, export
roots = ["~"]
```
Send actions (`mail_send`, `messages_send`) default to `confirm`; setting a policy to `allow` skips confirmation dialogs.
## CLI & Development
```bash
swift build && swift test
.build/debug/mac-mcp tools --all # inspect full tool schemas
.build/debug/mac-mcp spec # export machine-readable spec
.build/debug/mac-mcp call reminders_read '{"action":"lists"}' --all
scripts/mcp-call.py access_read '{"action":"status"}' # call through the installed agent
```
Other subcommands: `mac-mcp` (stdio entry), `serve` (in-process stdio), `status`, `install` / `uninstall`, `request <domain> [target_app]`.
## Uninstall
```bash
BUNDLE_ID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" ~/Applications/mac-mcp.app/Contents/Info.plist)
~/Applications/mac-mcp.app/Contents/MacOS/mac-mcp uninstall
rm -rf ~/Applications/mac-mcp.app ~/Library/Application\ Support/mac-mcp ~/Library/Logs/mac-mcp ~/.config/mac-mcp
tccutil reset All "$BUNDLE_ID"
```
## License
[MIT](LICENSE)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues