Skip to content

Give AI agents macOS calendar access with ekctl CLI

pattern

AI agents cannot interact with macOS Calendar or Reminders because no CLI tool bridges the gap to EventKit

claude-codemacoscalendarremindersclieventkitai-agentsmcp
22 views

Problem

macOS Calendar and Reminders store events and tasks in the EventKit framework, which is only accessible through Apple's native APIs. There is no built-in command-line tool for managing calendars or reminders. This means AI coding agents like Claude Code have no way to check your schedule, create events, or manage reminders as part of an automated workflow. You end up copying calendar data manually or building one-off AppleScript hacks that break between macOS versions.

Solution

Install ekctl, a CLI for managing calendars and reminders on macOS that wraps the EventKit framework. Then expose it to your AI agent as a tool.

Install ekctl:

brew install schappi/tap/ekctl

Basic calendar operations:

# List all calendars
ekctl calendars list

# List today's events
ekctl events list --from today --to tomorrow

# Create an event
ekctl events create \
  --calendar "Work" \
  --title "Sprint planning" \
  --start "2026-02-11T09:00:00" \
  --end "2026-02-11T10:00:00"

# List reminders
ekctl reminders list --calendar "Tasks"

# Create a reminder
ekctl reminders create \
  --calendar "Tasks" \
  --title "Review PR #42" \
  --due "2026-02-11T17:00:00"

Expose as a Claude Code skill in .claude/commands/calendar.md:

Check my calendar for today and summarize upcoming events.
If I ask to schedule something, use ekctl to create the event.

Available commands:
- `ekctl calendars list` -- list calendars
- `ekctl events list --from <date> --to <date>` -- list events
- `ekctl events create --calendar <name> --title <title> --start <iso> --end <iso>`
- `ekctl reminders list --calendar <name>` -- list reminders
- `ekctl reminders create --calendar <name> --title <title> --due <iso>`

Or expose as an MCP tool server:

{
  "mcpServers": {
    "calendar": {
      "command": "ekctl",
      "args": ["mcp-server"],
      "description": "macOS Calendar and Reminders access via EventKit"
    }
  }
}

Alternative: gogcli for Google Calendar:

# If you use Google Calendar instead of iCloud
# gogcli provides similar CLI access
go install github.com/steipete/gogcli@latest
gogcli events list --days 7

Why It Works

ekctl is a native macOS binary that links directly against the EventKit framework -- the same API that Calendar.app and Reminders.app use. It exposes structured command-line output that AI agents can parse and act on. Because it uses the real EventKit API (not AppleScript or screen scraping), it handles recurring events, calendar subscriptions, and iCloud sync correctly. The CLI interface means any AI agent with shell access can read and write calendar data without custom API integrations.

Context

  • ekctl requires macOS calendar permissions -- grant access when prompted on first run
  • An alternative is gogcli which provides Google Calendar access but has more limited local EventKit functionality
  • Output is plain text by default; use --json flag for structured output that AI agents parse more reliably
  • Works with all calendar providers synced to macOS: iCloud, Google Calendar, Exchange, CalDAV
  • Combine with a daily cron job or Claude Code hook to get morning briefings of your schedule
  • The MCP server mode lets any MCP-compatible AI client (not just Claude Code) access your calendars
  • This same approach extends to other macOS frameworks -- Contacts, Photos, and HealthKit could all benefit from CLI wrappers
About this share
Contributormblode
Repositorymblode/shares
CreatedFeb 10, 2026
View on GitHub