Apple macOS Native Applications MCP server

Enables AI interaction with macOS native applications through AppleScript for tasks like managing contacts, notes, emails, reminders, calendar events, and maps navigation
Back to servers
Provider
Jason Liu
Release date
Apr 03, 2025
Language
Python
Stats
5 stars

Python Apple MCP is a server implementation that enables interaction with macOS native applications including Contacts, Notes, Mail, Messages, Reminders, Calendar, and Maps through AppleScript. It provides asynchronous operations, comprehensive error handling, and type-safe interfaces using Pydantic models.

Installation

Follow these steps to install the Python Apple MCP server:

  1. Clone the repository:
git clone https://github.com/jxnl/python-apple-mcp.git
cd python-apple-mcp
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

Basic Server Setup

To set up and run the MCP server:

from apple_mcp import FastMCP, Context

# Initialize FastMCP server
mcp = FastMCP("Apple MCP")

# Use the tools
@mcp.tool()
def find_contact(name: str) -> List[Contact]:
    """Search for contacts by name"""
    # Implementation here
    pass

# Run the server
if __name__ == "__main__":
    mcp.run()

Working with Individual Modules

You can also use individual modules directly:

from utils.contacts import ContactsModule
from utils.notes import NotesModule

# Initialize modules
contacts = ContactsModule()
notes = NotesModule()

# Use the modules
async def main():
    # Find a contact
    contact = await contacts.find_contact("John")
    
    # Create a note
    await notes.create_note(
        title="Meeting Notes",
        body="Discussion points...",
        folder_name="Work"
    )

# Run the async code
import asyncio
asyncio.run(main())

Module Capabilities

Contacts Module

  • Search for contacts by name
  • Retrieve all contacts
  • Create new contacts with names and phone numbers
# Example: Finding a contact
contact = await contacts.find_contact("John Doe")

# Example: Creating a contact
new_contact = await contacts.create_contact(
    name="Jane Smith", 
    phones=["123-456-7890", "098-765-4321"]
)

Notes Module

  • Search for notes by query text
  • Create new notes with title, body, and folder
  • Retrieve all notes
# Example: Creating a note
new_note = await notes.create_note(
    title="Project Ideas",
    body="1. Develop new feature\n2. Fix bugs",
    folder_name="Work Projects"
)

# Example: Finding notes
found_notes = await notes.find_note("project")

Mail Module

  • Send emails
  • Search through emails
  • Get unread emails
# Example: Sending an email
mail_module = MailModule()
result = await mail_module.send_email(
    to="[email protected]",
    subject="Meeting Invitation",
    body="Please join us for a meeting tomorrow at 2 PM."
)

Messages Module

  • Send iMessages
  • Read message conversations
  • Schedule messages for later delivery

Reminders Module

  • Create reminders with due dates
  • Search for specific reminders
  • Get all reminders

Calendar Module

  • Create calendar events
  • Search events
  • Retrieve all events

Maps Module

  • Search for locations
  • Get directions between addresses
  • Save locations to favorites

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later