CalDAV / iCloud compatibility
These Calendar-specific observations from real iCloud CalDAV constrain the client. Contacts and Mail use separate protocol clients and destination policies. See CardDAV compatibility and Mail compatibility.
Compatibility summary
Section titled “Compatibility summary”| Item | Value |
|---|---|
| Protocol | CalDAV over HTTPS |
| Endpoints | caldav.icloud.com and p[0-9]{1,3}-caldav.icloud.com:443 |
| Authentication | HTTP Basic with ICLOUD_EMAIL and ICLOUD_PASSWORD (app-specific password) |
| Writes | Conditional PUT/DELETE with a strong If-Match; create uses If-None-Match: * |
| Recurrence | RRULE, EXDATE, and RECURRENCE-ID with TZID; at most 2,000 occurrences |
| Limits | 366-day range; 400 results; 60 reads and 20 writes per minute |
Discovery
Section titled “Discovery”- Entry:
https://caldav.icloud.com. - The response redirects to a
pXX-caldav.icloud.comshard. It often includes the explicit port:443. go-webdavFindCalendarHomeSetreturns a path without the shard host. The server uses custom PROPFIND code indiscovery.go.net/httpconverts 301 to GET. Discovery keeps the method through allowlisted redirects and direct PROPFIND requests.- The server does not cache a failed discovery. A later call can retry after a transient error.
- Discovery requires exactly one successful principal and one calendar home set.
Multiple values return
protocol_error.
Calendar selection for search and availability
Section titled “Calendar selection for search and availability”search_events and find_free_slots use the same calendar.read selection
boundary. Implicit selection retains only permitted discovered paths before
event queries. No permitted calendar returns authorization, not availability.
An explicitly requested forbidden path rejects the entire selection before queries.
Default unscoped and wildcard read scopes retain access to all discovered calendars.
Explicit selections retain their ten-unique-path limit and remove duplicates.
Discovery does not inherit that limit. Search processes calendar before
calendars; availability processes calendars before calendar.
Permitted discovery order stays unchanged. Search falls back to discovery for
empty selections. Availability rejects explicitly empty selections.
calendar-query REPORT
Section titled “calendar-query REPORT”- Partial
calendar-datawith nested<comp>returns empty VEVENTs on iCloud. - Only a bare
<C:calendar-data/>request works reliably. - A UID
prop-filterreturns 412. UID lookup first sends GET for<uid>.ics. - If the resource is missing, lookup sends a bounded time-range REPORT. The range is 50 years before and after the current time.
- The fallback does not find an event outside this range if its filename is not
<uid>.ics. The error text states this range. - Request
D:getetagwith calendar-data. This ETag enables If-Match on the REPORT path. - Imported-UID lookup always sends another GET before a mutation. This step preserves VERSION, PRODID, and VTIMEZONE.
- A 207 Multi-Status is not proof that each matched resource succeeded. A
failed response or propstat status, a missing resource href, or a missing
calendar-datavalue returnspartial_failure. Availability fails closed and never derives free slots from an incomplete REPORT. A 207 with zeroDAV:responseelements is a valid empty result. - REPORT payloads are incomplete for encoding with go-ical.
Event text
Section titled “Event text”- Event reads decode iCalendar TEXT in SUMMARY, LOCATION, and DESCRIPTION as title, location, and notes. This includes recurrence overrides.
- Explicit TEXT value types are case-insensitive. Reading does not change stored properties.
- Escaped commas, semicolons, backslashes, and newlines become ordinary text. Unicode stays unchanged. Missing and empty properties produce empty fields.
search_eventsmatches query text against these decoded fields. The successfuldelete_eventresponse also decodesdeletedTitle, including dry runs.- Invalid TEXT escapes or value types return
protocol_errorwhen read. An invalid delete title fails before mutation. Errors do not include remote text. - A malformed content line returns
protocol_errorfor the complete read. Two examples are text after a quoted parameter value and a parameter list without a colon. Search and availability then fail for all selected calendars.
Writes
Section titled “Writes”- Use PUT to store server-created events as
text/calendarobjects named<uid>.ics. - Imported events can use a different filename. Always resolve the UID before a mutation.
- Create always sends
If-None-Match: *. Thus, a concurrent create with the same UID cannot overwrite an event silently. - HTTP 412 from create maps to
conflict. - Update and delete use If-Match for optimistic concurrency. HTTP 412 maps to
concurrent_modification. - A mutation fails closed when no ETag is available.
- Update always gets the full object first. This step preserves VERSION, PRODID, and VTIMEZONE.
- Update preserves the existing DTSTART and DTEND form: DATE, TZID, or Z.
- Never force UTC Z on a TZID series.
create_event,update_event, andvalidate_eventreject a CR in a title, location, or notes before any request.create_eventandvalidate_eventalso reject a CR or LF inrrule;update_eventhas norruleargument. The error isvalidationand names the field, not the value. Notes keep LF.- The client encodes the complete object before PUT. If the encoder rejects
the object, the client returns
protocol_errorwith a fixed message and sends no PUT. The message repeats no event text, remote name, or encoder text. - An update keeps unknown stored properties. A stored parameter or value with a
bare CR therefore blocks
update_eventwithprotocol_error, for a series or one occurrence.delete_eventwithscope=occurrencerewrites the series object, so it fails the same way. A seriesdelete_eventsends no PUT and still works. Reads still return the event and its busy interval. - Automatic retries apply only to reads. The client never repeats PUT, DELETE, or a full-series delete.
- A transport failure after dispatch returns
outcome_unknownwith reconciliation guidance. Gateway 502, 503, and 504 have the same result. - A write-side 429 is a definitive
rate_limitedresponse. - A redirect after mutation dispatch also returns
outcome_unknown. An automatically followed response observed after dispatch has the same result. - The client never follows or repeats that mutation.
MCP update_event can return a cached result for idempotency_key. This path
sends no new CalDAV mutation. See the
update idempotency contract.
Validated location cache
Section titled “Validated location cache”The client keeps at most 1,024 process-local resource locations. A key is the
validated calendar path plus the exact UID. Search populates it only from
validated CalendarObject responses. A lookup first tries the cached location,
then the <uid>.ics path, then the bounded REPORT fallback.
A cached path returning 404 is evicted and uses the normal fallback. A UID mismatch or a resource outside its calendar fails closed. A confirmed series delete invalidates the entry. An ambiguous delete does not. The cache stores no ETag and grants no mutation permission: every write still reads and validates the complete object. Identical UIDs in different calendars stay isolated.
Recurrence
Section titled “Recurrence”- Recurrence expansion preserves the RRULE TZID. It never calls
.UTC()on Dtstart. - Expansion handles EXDATE and RECURRENCE-ID overrides. It includes occurrences that overlap the range start.
- Each override must have a unique recurrence identifier and a recurring master.
Ambiguous objects return
protocol_errorbefore use or mutation. - Each VEVENT must contain exactly one DTSTART. A missing or duplicate start,
a duplicate DTEND or DURATION, both DTEND and DURATION, or a duplicate
DTSTAMP fails closed with
protocol_errorbefore search, get, expansion, availability, or mutation. A missing start never becomes a year-1 busy interval. - When DTEND is missing, DURATION sets the duration. Calendar days and weeks follow local time across DST.
- Without DURATION, an all-day event ends on the next civil day.
- A VALUE=DATE event is a civil day in the effective query timezone, not a UTC instant. Search and availability project both bounds onto local midnight, so a Paris all-day event overlaps a UTC query that covers Paris midnight.
- A timed event with DTSTART and no DTEND or DURATION has zero duration. It is
a point: it matches when
rangeStart <= DTSTART < rangeEnd, and availability does not invent a busy interval for it. - The remote REPORT widens a non-UTC candidate window by 26 hours on each side before local exact filtering, because a server may resolve floating and DATE values in its own calendar timezone (RFC 4791 section 7.3). A dense calendar that overflows the REPORT budget fails closed instead of reporting a complete search.
- A floating series keeps its recurrence identity in wall-clock coordinates.
The exact offset-free
recurrenceIdreturned by read survives update and delete under a non-UTC default, without shifting one or more hours. - An occurrence update or delete validates that
recurrence_idnames an existing generated slot or a detached override. A nonexistent slot returnsnot_foundwith no PUT or DELETE, and an already excluded slot returnsalreadyExcludedwithwouldMutate=false. - A successful delete dry run compares a supplied caller ETag with the current
strong GET ETag and returns
concurrent_modificationwhen they differ. This applies to every dry-run outcome, including an already-excluded occurrence: the no-op preview is not returned for a stale read. A missing caller ETag keeps the point-in-time preview. - A weak server ETag never reaches the delete preflight. The GET and REPORT
readers reject it one layer earlier with
protocol_error, so the ETag in the fetched object is always a strong value. A missing server ETag still fails closed withconcurrent_modificationwhen the caller supplied one, because no comparison is possible. - The
alreadyExcludedresult field is reported for an excluded occurrence, so a caller can tell a confirmed no-op from an actionable delete. - A DELETE dry run is a point-in-time preflight, not a lock.
- Discovery classifies a collection by
DAV:resourcetype: a positiveCALDAV:calendarwith VEVENT support is included even under/inbox/or/notification/;schedule-inboxandschedule-outboxare excluded by their own resourcetype. A failed response or a failedresourcetypepropstat returnspartial_failure; an optional description or color 404 does not. - Update accepts
YYYY-MM-DDforstart/endonly when the existing property already uses the DATE form. DATE-only input against a timed event fails before PUT. - Update requires the matching value form in both directions. A DATE-TIME
startorendagainst aVALUE=DATEproperty fails withvalidationbefore any conditional PUT. The stored form is never converted, so a clock time is not silently discarded on an all-day event. This covers a series update, an occurrence update, start-only and end-only patches, an all-day event without DTEND, and an all-day occurrence override. The error names the field and gives guidance;start_dateandend_datedescribe the explicit conversion feature that does not exist yet. A read withget_eventshows the stored form before an update. - A naive wall time in a DST fold uses the first occurrence, matching iCalendar
TZID parsing. An explicit offset that selects the second fold cannot be
written as a bare TZID wall time and is rejected before PUT. The check
compares the requested instant with
ResolveWallClockof its local wall form under the existing TZID, for a series start, a series end, an occurrence start, and a derived occurrence end. It returnsvalidationwith guidance and no PUT. First-fold instants, normal hours, UTC events, floating values, DATE values, and UTC-bound ends of a mixed-form event keep their instants. The rule uses the same resolver as recurrence expansion, so it matches the RFC 5545 section 3.3.5 first-fold interpretation that a later read applies. - Create applies the same round-trip rule to both
startandendwhen it writes a named TZID. A second-fold instant returnsvalidationbefore theIf-None-Match: *PUT. An all-day create and a UTC create keep their values, because they do not store a bare TZID wall time. - An explicit
Zor numeric offset with an omittedtimezonekeeps the fixed UTC recurrence policy.ICLOUD_MCP_DEFAULT_TZapplies only to offset-free input. - A recurring write enforces the RFC 5545 UNTIL value type and rejects
BYHOUR/BYMINUTE/BYSECOND on a DATE start. A timed UNTIL must end in
Z. Invalid values are rejected, never truncated into a different recurrence. - A recurring write rejects duplicate rule parts, COUNT with UNTIL, and incompatible selector/frequency pairs such as WEEKLY+BYMONTHDAY or MONTHLY+BYWEEKNO.
- A recurring RFC3339 value with a numeric offset and no IANA timezone repeats as a fixed UTC instant. It is never serialized with an unnamed TZID.
- A recurring VTIMEZONE keeps historical non-minute UTC-offset seconds when they exist.
- An occurrence override copies the master duration form. A DURATION with days or weeks stays nominal across DST. An elapsed DURATION stays elapsed.
- A title-only occurrence update does not change its start or end.
- A start-only occurrence update keeps the inherited duration. An all-day override keeps DATE bounds, and a timed event without an end keeps zero duration.
- Expansion returns at most 2,000 occurrences. The iterator advances at most 100,000 times for each series.
- A preflight estimate rejects a rule that would exceed the work budget before the requested range.
- Update and delete accept
seriesoroccurrencescope. Occurrence scope never deletes the series resource. - Occurrence EXDATE and RECURRENCE-ID values match the master DATE, TZID, or Z form.
- An EXDATE whose value type cannot match DTSTART fails closed with
protocol_errorbefore expansion. DATE against DATE-TIME, and floating against absolute DATE-TIME, never match. Multiple EXDATE properties and comma-separated values stay supported. - A floating DATE-TIME (no
Z, noTZID) stays floating. The result setsisFloatingand uses an offset-free local value such as2026-07-01T09:00:00; the server never invents a UTC offset. - A zoned recurrence expands on the wall clock. A spring-gap occurrence uses
the pre-gap UTC offset, as RFC 5545 section 3.3.5 requires, and sets
dstAdjusted. A fold uses the first occurrence. Neither case is silent. - A RECURRENCE-ID override is resolved before the occurrence cap applies. An
override moved outside the requested range therefore consumes no result
capacity, and an override moved into the range is still returned. The cap
bounds the final projected set: the results are ordered by effective start
and then by stable identity, and one result beyond the cap sets
truncatedByExpansion. The same master and override set always returns the same page. - Availability interprets a floating event in the requested timezone before
querying and filtering, so it cannot make the same wall-clock slot look free.
A naive
startorendwith an explicittimezoneis parsed in that timezone, not in the default location. Gap and fold wall times use the same RFC 5545 resolver as recurrence expansion. - A timed recurring create writes TZID and a generated VTIMEZONE. It uses the
explicit
timezoneor theICLOUD_MCP_DEFAULT_TZfallback. A start that does not exist in that zone fails before the request. - This method keeps wall-clock RRULEs correct across DST.
- The client does not implement
this-and-future. Its end-to-end safety is not proven. - The client rejects RDATE and ranged
RECURRENCE-ID(THISANDFUTURE) withprotocol_error. Availability results never omit them silently. See decision 0001 for the RFC-grounded assessment, safety gaps, and fixture matrix. A live iCloud probe of 2026-12-04 keeps this rejection: decision 0004 records the stored shapes, the provider filter gaps, and the three no-go decisions. - A preflight check tests date-selector reachability over a bounded Gregorian cycle. The check runs before the recurrence iterator.
- The client rejects the non-RFC
BYEASTERextension. - It also rejects ordinal
BYDAYoutside monthly or yearly rules. - It rejects calendar selectors with hourly, minutely, or secondly frequency.
- These cases fail closed because the dependency cannot stop an empty internal selector scan.
Group-scheduled events
Section titled “Group-scheduled events”get_event reports isGroupScheduled when the object has ORGANIZER or
ATTENDEE. It never returns an address or parameter from those properties.
Reads tolerate historical empty or non-URI cal-addresses without returning
the identities. Their presence still sets isGroupScheduled.
Search and availability retain the event and its busy interval.
Mutation validation still rejects malformed cal-addresses with protocol_error.
A series or occurrence update or delete of such an object is denied with
authorization by default, before any PUT or DELETE. The approved path needs
all of these:
- The operator sets an explicit
ICLOUD_MCP_PERMISSIONSvalue that grantscalendar.write(update) orcalendar.delete(delete) and the separatecalendar.schedulecapability. A legacy switch and ordinary write/delete are not enough. - The call sets
acknowledge_scheduling=true. - The call passes the current strong
etagfromget_event.
The service rechecks ORGANIZER and ATTENDEE on its final GET and compares
the supplied ETag with the current one. A changed object invalidates the
approval. A deletion dry_run reports isGroupScheduled and a fixed
notificationRisk without mutating or exposing identities.
This guard does not assert live Apple notification behavior. It prevents an unreviewed mutation of an object that could produce one.
Parser and result limits
Section titled “Parser and result limits”- Inbound stdio JSON-RPC frames have a 1 MiB limit. Each serialized Calendar or MCP result has a 256 KiB limit.
- Calendar REPORT XML has these limits: depth 32, 262,144 tokens, 4,096 response elements, 16,384 propstats, and 32,768 properties.
- Parsed iCalendar has 1,024 components and 10,000 total properties at most.
- Each component has at most 1,024 properties. Other limits are 512 overrides, 64 parameters per property, 64 alarms, and 2,000 EXDATE values.
- One remote property value has a 1 MiB limit.
- PROPFIND and single-object GET bodies have an 8 MiB limit. REPORT has a 32 MiB limit.
- A single-calendar search materializes at most 2,500 events.
- Multi-calendar
search_eventsstill queries each selected calendar. It uses at most four concurrent reads in one request. The domain-wide semaphore still caps all concurrent MCP requests at four. It fails closed when more than 10,000 filtered events materialize. find_free_slotsaccepts at most 10,000 returned events across permitted calendars, for explicit and implicit selections. It counts before busy filtering.- Availability reads ordered waves of at most four calendars. It projects each batch to busy intervals and releases the wave results before the next reads. It keeps no Event value between waves.
- The collector appends intervals to one bounded slice and runs a single sort and merge at the end. Earlier waves are not copied or re-sorted again.
- A separate interval budget of 10,000 busy intervals fails closed with
payload_too_large, like the event budget. - Overflow returns
payload_too_largewith guidance to narrow the range or calendars. No partial availability is returned. Incomplete searches and truncated recurrence also fail closed. - Cancellation joins the active wave. Errors follow selected-calendar order, not completion order. Availability stops before starting another wave on failure.
- Results, calendar-index warnings, and free-slot output keep input order.
- Every search row carries the validated calendar path and the recurrence identifier when applicable. The internal resource href stays private.
- Sort order is start, UID, calendar, then title. Identical events from different calendars therefore keep a deterministic order.
- This failure occurs before the public sorted result limit of 400 events.
Bounded cursor continuation
Section titled “Bounded cursor continuation”search_events has two explicit modes. A call without cursor keeps the legacy
response. It keeps the legacy ordering, duplicate handling, offset meaning and
first-400 row window. It never returns nextCursor.
A call with cursor: "start" opts into bounded keyset paging. It needs a
nonempty explicit calendar or calendars selection and offset: 0. limit
stays 1 to 400 and can change between pages. Empty or malformed cursor values
are validation errors.
Each continuation is a stateless v1 token with a base64url payload and an
HMAC-SHA256 signature. The payload holds only a positive expiry, a query digest,
and a last-row identity digest. It never holds a raw query, UID, title, calendar
path, ETag, or internal href. The 32-byte key lives for one registered handler.
The payload also carries an unpredictable generation ID for the completed scan.
A restart or new registration invalidates all tokens. A token expires 300
seconds after issuance and can be reused as a read until then. It is not
encrypted, a lease, or a single-use credential.
The token binds the normalized range, its effective timezone, explicit selected
calendars, result filters, default presence, compact and recurrence modes, and
the current calendar.read scope. limit is not bound. The explicit selection
and scope, token structure, signature, expiry, and query binding are checked
before any Calendar backend access. A continuation loads only its own
generation. If that generation is absent, expired, or evicted, the call returns
stale_cursor without a backend fetch; it never rebases onto a newer scan.
Cursor mode keeps the primary order start, UID, calendar, then title. It adds recurrence ID, end time, override flag, internal path, ETag, and a full-row digest as strict tie-breaks. Exact duplicate backend rows in one calendar are collapsed only in this opt-in mode. Distinct calendars and recurring overrides stay distinct. Legacy duplicate handling does not change.
The first cursor page scans every selected calendar in waves of at most four concurrent reads. It keeps only one wave of backend results alive, applies the 2,500 expanded-event per-calendar limit and the 10,000 filtered materialized limit during the merge, and stops scheduling waves after a definitive overflow. It retains the 366-day range, ten explicit calendars, the 32 MiB REPORT limit, and all recurrence work caps. More than 2,500 expanded events in one calendar fails closed before paging. Pagination does not permit loading a whole history.
The completed scan is kept in process memory for at most 300 seconds, the
cursor lifetime, in at most four generation-scoped snapshots and at most 32 MiB
of retained event text in total. The oldest snapshot is evicted first. A single
snapshot larger than the byte budget is refused: no continuation token is
issued and the response states the cache bound. Later pages of the
same generation reuse it without another backend REPORT. A repeated
cursor=start with the same query creates an independent generation instead of
overwriting an unexpired one; budget pressure evicts the oldest generation, and
its outstanding tokens then return stale_cursor. A partial failure is not
cached. The snapshot is never written to disk or logs and disappears on process
exit. A source edit after the first page is not visible to that generation, and
total is that generation’s snapshot count.
nextCursor is emitted only when an explicit selection has a complete page with
at least one later row. It is omitted on partialFailure, recurrence truncation,
materialization overflow, authentication, authorization, protocol or payload
errors, cancellation, and deadline. In cursor mode truncated is true when rows
remain or the result is incomplete. A result beyond the 256 KiB serialized
budget uses only rows that fit with the token and metadata. If zero rows fit, it
returns no cursor and asks for a narrower range, compact mode, or fewer
calendars.
The floating and daylight-saving warning describes the completed scan in cursor mode. The first page computes it before the snapshot is stored, and every later page replays the same warning once, even when that page holds no affected row. A direct query without a cursor keeps page-local semantics: the warning describes only the returned rows.
total is the bounded snapshot count while the generation is live. A token
whose generation expired or was evicted is stale and the caller restarts. Within
a live generation, inserted or moved rows do not appear.
No provider-level snapshot isolation or exhaustive coverage is claimed.
- Recurrence work has a limit of 100,000 iterator advances for each series. One search has a total limit of 250,000 advances.
- The search reserves selector reachability proof work before iteration.
- Calendar permits four concurrent reads and two concurrent writes.
Working hours require exact ASCII HH:MM values from 00:00 through 24:00.
Invalid hours or weekdays return a validation error before free-slot calculation.
A free-slot result with truncated: true means at least one more qualified slot
exists beyond limit; the client checks one extra slot without materializing
the rest. An exact-limit result sets truncated: false. The slot boundaries,
greedy non-overlapping policy, and 200-slot cap do not change.
Working-hour boundaries use the same RFC 5545 resolver as event values: a gap moves forward and a fold selects the first occurrence. A completely skipped civil date is empty and keeps its own weekday label; it is never an alias for a neighbouring real day.
Civil-day iteration is independent of whether local midnight exists. A midnight gap (for example America/Santiago on 2026-09-06) or a skipped date (for example Pacific/Apia on 2011-12-30) cannot stall the calculation, and a deterministic civil-day work bound fails closed if a pathological range would exceed it.
Limits (Apple)
Section titled “Limits (Apple)”- Approximately 50,000 events per calendar. Apple returns 403 when the limit is exceeded.
- One process supports one Calendar Apple Account. The optional Contacts domain uses the same configured identity through a separate client.
- Mail can use a different mailbox address and app-specific password.