karlhepler/apple-mcp
If you are the rightful owner of apple-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Apple MCP Server provides a JSON API for full read/write access to Apple Notes and Reminders on macOS using AppleScript.
Apple MCP Server
A Model Context Protocol (MCP) server that provides full read/write access to Apple Notes and Reminders apps on macOS. This server uses AppleScript as the backend to interact with these applications, providing a clean JSON API that Claude Desktop can use.
Features
Apple Notes Tools
- searchNotes - Search notes by content or title
- readNote - Get full note content using Core Data ID
- createNote - Create new notes with optional folder
- updateNote - Update existing notes (title, content, folder) - also moves notes between folders
- deleteNote - Remove notes
- listNotes - List notes with optional folder filtering
- listNoteFolders - Get all available note folders
- createNoteFolder - Create a new folder for organizing notes
- updateNoteFolder - Rename an existing folder
- deleteNoteFolder - Delete an empty folder (fails if folder contains notes)
Apple Reminders Tools
- searchReminders - Search reminders by content or title
- listReminders - List reminders with filters (list, completed, due dates)
- createReminder - Create new reminders with optional due date and list
- updateReminder - Update reminder properties
- completeReminder - Mark reminders as completed
- deleteReminder - Remove reminders
- listReminderLists - Get all available reminder lists
- createReminderList - Create a new list for organizing reminders
- updateReminderList - Rename an existing list
- deleteReminderList - Delete an empty list (fails if list contains reminders)
Prerequisites
- macOS (required for AppleScript)
- Node.js v18.0.0 or higher
- Claude Desktop application
Installation
- Clone this repository:
git clone https://github.com/karlhepler/apple-mcp.git
cd apple-mcp
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
Configuration for Claude Desktop
- Open Claude Desktop settings
- Navigate to the MCP servers section
- Add a new server with the following configuration:
{
"apple-mcp": {
"command": "node",
"args": ["/path/to/apple-mcp/dist/index.js"],
"env": {
"APPLE_MCP_TIMEOUT": "60000",
"APPLE_MCP_REMINDERS_TIMEOUT": "90000",
"APPLE_MCP_DEBUG": "false"
}
}
}
Replace /path/to/apple-mcp with the actual path to this repository on your system.
Environment Variables (Optional)
APPLE_MCP_TIMEOUT- Global timeout in milliseconds (default: 60000)APPLE_MCP_REMINDERS_TIMEOUT- Reminders-specific timeout (default: 60000)APPLE_MCP_NOTES_TIMEOUT- Notes-specific timeout (default: 30000)APPLE_MCP_RETRY_COUNT- Maximum retry attempts for timeouts (default: 2)APPLE_MCP_RETRY_DELAY- Initial retry delay in milliseconds (default: 1000)APPLE_MCP_DEBUG- Enable debug logging (default: false)
Permissions
The first time you use this MCP server, macOS will prompt you to grant permissions:
- Automation Permission: Allow your terminal/Claude to control Notes and Reminders
- Privacy Settings: Grant access in System Settings > Privacy & Security > Automation
If you encounter permission errors, check:
- System Settings > Privacy & Security > Automation
- Ensure your terminal app has permission to control Notes and Reminders
Usage Examples
Notes Operations
Search for notes:
{
"tool": "searchNotes",
"arguments": {
"query": "meeting notes"
}
}
Read a specific note:
{
"tool": "readNote",
"arguments": {
"id": "x-coredata://1234/ICNote/p567"
}
}
Create a new note:
{
"tool": "createNote",
"arguments": {
"title": "Shopping List",
"content": "- Milk\n- Eggs\n- Bread",
"folder": "Personal"
}
}
Update a note:
{
"tool": "updateNote",
"arguments": {
"id": "x-coredata://1234/ICNote/p567",
"title": "Updated Title",
"content": "New content here"
}
}
Move a note to a different folder:
{
"tool": "updateNote",
"arguments": {
"id": "x-coredata://1234/ICNote/p567",
"folder": "Work"
}
}
Create a new folder:
{
"tool": "createNoteFolder",
"arguments": {
"name": "Project Ideas"
}
}
Rename a folder:
{
"tool": "updateNoteFolder",
"arguments": {
"currentName": "Project Ideas",
"newName": "Active Projects"
}
}
Delete an empty folder:
{
"tool": "deleteNoteFolder",
"arguments": {
"name": "Old Projects"
}
}
Reminders Operations
Create a reminder with due date:
{
"tool": "createReminder",
"arguments": {
"title": "Call dentist",
"notes": "Schedule annual checkup",
"due": "2024-12-30",
"list": "Personal"
}
}
List incomplete reminders:
{
"tool": "listReminders",
"arguments": {
"completed": false,
"list": "Work"
}
}
Complete a reminder:
{
"tool": "completeReminder",
"arguments": {
"id": "x-coredata://1234/REMCDReminder/p890"
}
}
Technical Details
Architecture
- Frontend: MCP server (TypeScript/Node.js) exposing JSON APIs
- Backend: AppleScript files for Apple app interactions
- Communication: MCP server executes AppleScript and parses results
- Transport: StdioServerTransport for Claude Desktop compatibility
Data Handling
- Uses Core Data IDs (e.g.,
x-coredata://...) for consistent item references - Dates are converted between ISO 8601 and AppleScript formats
- Rich text/HTML content in Notes is preserved
- Full PATCH-style updates (only specified fields are modified)
Error Handling
- Permission denied errors with helpful messages
- Item not found errors
- AppleScript execution failures
- Input validation using Zod schemas
Development
Project Structure
apple-mcp/
├── src/
│ ├── index.ts # Main MCP server
│ ├── types.ts # TypeScript interfaces
│ ├── tools/
│ │ ├── notes.ts # Notes MCP tools
│ │ └── reminders.ts # Reminders MCP tools
│ ├── applescript/
│ │ ├── executor.ts # AppleScript wrapper
│ │ ├── notes/ # Notes AppleScripts
│ │ └── reminders/ # Reminders AppleScripts
│ └── utils/
│ ├── error-handler.ts
│ ├── date-formatter.ts
│ └── validators.ts
Development Commands
npm run dev # Watch mode for development
npm run build # Build TypeScript
npm run clean # Clean build artifacts
npm run lint # Run ESLint
npm run typecheck # Type checking without emit
npm test # Run comprehensive test suite
npm run quick-test # Run a quick functionality test
Code Quality
Before committing changes:
- Run
npm run lintto check code style - Run
npm run typecheckto verify TypeScript types - Run
npm testto ensure all tests pass (100% required)
Troubleshooting
Permission Denied
If you get permission denied errors:
- Open System Settings > Privacy & Security > Automation
- Find your terminal app or Claude Desktop
- Enable access to Notes and Reminders
AppleScript Errors
- Ensure Notes/Reminders apps are installed and not corrupted
- Try running a simple AppleScript manually to test access
- Check Console.app for detailed error messages
Items Not Found
- Core Data IDs change if items are moved between devices
- Use search functions to find items by content if IDs fail
- Syncing issues may cause temporary inconsistencies
Testing
Quick Test
For a quick functionality check without running the full test suite:
npm run quick-test
This runs a basic test that:
- Lists note folders
- Creates, reads, updates, and deletes a test note
- Searches for notes
- Lists reminder lists
- Cleans up after itself
Full Test Suite
Run the comprehensive automated test suite to verify all functionality:
npm test
The test suite features:
- 100% coverage of all 14 documented tools (7 for Notes, 7 for Reminders)
- 45 automated tests with detailed validation
- Proper data verification - not just success flags
- Edge case testing including error handling
- Automatic cleanup of all test data
- Detailed reporting by feature category
Test Categories:
- Notes - Folders: Create, update, delete, and list folder operations
- Notes - CRUD: Full note lifecycle including creation, reading, updating, and deletion
- Notes - Search/List: Search by title/content and list with filtering
- Reminders - Lists: Create, update, delete, and list operations
- Reminders - Basic: Validates Reminders app connectivity
- Edge Cases: Error handling and boundary conditions
Notes:
- You may be prompted to grant automation permissions on first run
- Reminders tests are simplified to avoid timeout issues
- Tests account for Apple Notes behavior (e.g., Recently Deleted folder)
Known Limitations
- Rich Text: Notes HTML content may have formatting limitations
- Attachments: Image and file attachments in notes are not fully supported
- Performance: Large numbers of notes/reminders may be slow to process
- Sync: Changes may take time to sync across devices
- Recurring Reminders: Limited support for complex recurrence rules
- Search Indexing: Apple Notes search may have delays after creating/updating notes
- Folder Assignment: Notes may not immediately reflect folder changes in read operations
- Deletion Behavior: Deleted notes move to "Recently Deleted" rather than permanent deletion
- Reminders Timeouts: Complex Reminders operations may timeout with large datasets
For a comprehensive list of Apple-specific behaviors and workarounds, see .
Security Considerations
- This server requires automation permissions which could be misused
- AppleScript has full access to Notes and Reminders content
- No authentication is built into the MCP protocol
- Use only on trusted systems with trusted clients
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues and questions:
- Check existing GitHub issues
- Create a new issue with detailed information
- Include macOS version and error messages