Skip to main content

Add your description here

Project description

MCP macOS Control Server

This repository hosts an experimental Model Context Protocol (MCP) server that exposes macOS automation features to large language models. The implementation is written in Python using FastMCP and wraps AppleScript automation scripts so MCP clients can invoke common Apple application actions.

Status

  • Mail: listing accounts and mailboxes, fetching latest/unread/search results, and sending email through Apple Mail are available via dedicated MCP tools.
  • Planned: Notes, Messages, Reminders, Contacts, Calendar and other macOS apps will follow the same structure—each with its own tool module and AppleScript scripts.

Project layout

src/mcp_macos/
├── __init__.py          # FastMCP hub registering application sub-servers
├── scripts/             # AppleScript sources (grouped by application)
├── tools/               # FastMCP sub-servers (one per application)
└── utils/applescript.py # Helpers to load and execute AppleScript files

Each tool module calls into the corresponding scripts to keep AppleScript logic separate from Python orchestration. The hub imports each app-specific FastMCP server using import_server, so clients see a single manifest with prefixed tool names.

Getting started

  1. Install dependencies (requires Python 3.12):
    uv sync
    
  2. Run the MCP hub:
    uv run fastmcp dev src/mcp_macos/__init__.py
    
    or execute the packaged entry point:
    uv run mcp-macos
    

When connecting through an MCP client (e.g., Claude Desktop), ensure the Apple applications you control have granted automation permissions to your terminal or host app.

Adding new applications

  1. Create src/mcp_macos/scripts/<app>/ with AppleScript files for each action.
  2. Implement src/mcp_macos/tools/<app>.py with FastMCP tools that call those scripts.
  3. Import the new sub-server in src/mcp_macos/__init__.py.

Follow the Mail module as a reference; it demonstrates parsing AppleScript output into JSON-friendly data structures that MCP clients can consume reliably.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_macos-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_macos-0.1.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_macos-0.1.2.tar.gz.

File metadata

  • Download URL: mcp_macos-0.1.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for mcp_macos-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8415ba5ce0646beef701805dbab49fcc66311731ba146a54a30006c5ce5d55d0
MD5 09d950239d7ee4f3eec4d500d705e28e
BLAKE2b-256 2b0eafffb6d8d8af6c931a45c67deada9ac365c6c81fa818849480b5f4e5d49b

See more details on using hashes here.

File details

Details for the file mcp_macos-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mcp_macos-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for mcp_macos-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a007fd96abe2e264bf86b0a90dba543a7532dcec505ea2bdd4526d83b5506aef
MD5 71649061fb2a8a0356eede1cf73b8493
BLAKE2b-256 bb6776f298bf4a9f9b13d5f285349720f7a74cd1884942c0e298cde6944be896

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page