AT
Pear — iCloud for AI Agents

Pear — iCloud for AI Agents

@ ashton
4 min read
pear-mcp

The Problem

Apple doesn’t have a public API for iCloud. No REST endpoints, no OAuth flows, no developer portal for Calendar, Reminders, or Contacts. If you want to programmatically interact with your personal productivity data, you’re out of luck.

Meanwhile, AI agents are getting good enough to manage your schedule, triage your tasks, and draft messages — but they can’t actually touch any of it. The data lives in iCloud, and iCloud is a black box.

I built Pear to fix that.

What Pear Does

Pear is an MCP server that connects AI agents to your iCloud account. It exposes 28 tools across Calendar, Reminders, and Contacts — everything from listing today’s events to finding the best meeting time based on your preferences.

It works with Claude Desktop, ChatGPT, Cursor, Windsurf, and anything else that supports the Model Context Protocol.

Once connected, you can do things like:

  • “What’s on my calendar this week?”
  • “Schedule a 1-hour meeting with John sometime Thursday afternoon”
  • “Create a reminder to review the Q1 report by Friday”
  • “Find Sarah’s phone number”
  • “Give me a briefing for today”

The daily briefing is particularly useful — it pulls your events, pending reminders, and enriches attendee data with contact information so you know who you’re meeting and have context before you walk in.

Architecture

Under the hood, Pear uses CalDAV and CardDAV — the open standards that iCloud actually implements. These are the same protocols your Mac’s Calendar.app uses to sync with Apple’s servers.

Claude / ChatGPT / Cursor
↓ MCP (JSON-RPC over HTTP)
Pear API (pearmcp.com/api/mcp)
↓ CalDAV / CardDAV
iCloud Servers

The core library is TypeScript, built as a monorepo with Turbo. The MCP endpoint is a Next.js 15 API route deployed on Vercel. Authentication uses bearer tokens — your AI agent never sees your Apple credentials.

The Tools

28 tools across 7 domains:

DomainToolsHighlights
Calendar7List, search, create, update, delete events. Recurring events with full RRULE support.
Reminders4Create, update, complete tasks with priority and due dates.
Contacts9Full CRUD plus groups, photo updates, and search across name/email/phone/org.
Scheduling2AI-powered slot finder with scoring algorithm. Availability checking.
Briefing1Aggregated day summary with attendee enrichment from contacts.
Batch4Bulk create/delete up to 50 items per call.
System1List available calendars.

Intelligent Scheduling

The find_best_time tool doesn’t just find empty slots — it scores them. Each candidate slot starts at a base score of 50, then gets bonuses or penalties:

  • +20 for falling within work hours
  • +15 for matching your preferred time of day (morning/afternoon/evening)
  • +15 for landing on a preferred day of the week
  • -10 for proximity to reminder deadlines
  • -10 for non-work days
  • -5 for outside work hours

Work schedules are configurable per request. The algorithm generates 30-minute-aligned candidates, filters out conflicts, scores the rest, and returns the top 5 with reasoning.

Timezone Handling

This was harder than it sounds. iCloud stores events in various timezone formats, all-day events behave differently across calendar clients, and recurring events need timezone-aware expansion. Pear handles full IANA timezone support with proper DST transitions — every timestamp returned is localized to your specified timezone.

Security Model

The one thing I didn’t want to compromise on:

  • App-specific passwords — Pear never asks for your main Apple ID password. You generate a revocable app-specific password through Apple.
  • AES-256 encryption — Credentials are encrypted at rest in Supabase.
  • No caching — iCloud data is proxied in real-time, never stored on Pear’s servers.
  • Open source — The entire codebase is public. Audit it yourself.

Getting Started

The easiest way is through the Claude Plugin Marketplace:

Terminal window
/plugin marketplace add AshtonAU/pear-plugin

Or add it directly as an MCP server:

{
"mcpServers": {
"pear": {
"url": "https://pearmcp.com/api/mcp",
"headers": {
"Authorization": "Bearer pear_sk_your_key_here"
}
}
}
}

Sign up at pearmcp.com, connect your iCloud account, grab an API key, and you’re set.

What’s Next

Pear currently supports iCloud exclusively. Google Calendar and Outlook are next on the roadmap, along with a mobile companion app and integrations with Zapier and Make.

The source is available at github.com/AshtonAU/pear-mcp under AGPL-3.0. Contributions welcome.