AI Calendar

This folder exposes a small HTTP JSON API for creating and editing calendar events, plus an iCalendar feed you can subscribe to in Google Calendar.

There is no browser UI—only this documentation page and the endpoints below.

Timezone

All timed events are anchored to Europe/Prague (Czech Republic). Daylight saving follows EU rules (typically CET UTC+1 / CEST UTC+2).

When you send a datetime without a timezone suffix, it is interpreted as local wall clock time in Prague, not UTC.

For clarity, prefer ISO 8601 with offset or Z, for example 2026-05-04T14:30:00+02:00.

Storage

Events are stored in data/events.json on the server (no database).

Security

There is no authentication in this app. Anyone who can reach mcp.php can change events; anyone who can reach ical.php can read the feed. Restrict access at the network or reverse-proxy layer if needed.

Endpoint: mcp.php (JSON API)

Use POST with a JSON body. Every request must include "action".

GET is supported only for read-only checks: ?action=list or ?action=get&id=<uuid>

Actions

list — optional date filters (times interpreted in Europe/Prague):

{"action":"list"}
{"action":"list","date":"2026-05-04"}
{"action":"list","from":"2026-05-01","to":"2026-05-31"}

get

{"action":"get","id":"EVENT_UUID"}

create — required: title, start, end. Optional: description, all_day (boolean).

{"action":"create","title":"Meeting","description":"Room A","start":"2026-05-04T10:00:00+02:00","end":"2026-05-04T11:00:00+02:00","all_day":false}

update — required: id. Any other field may be included to replace that field on the event.

{"action":"update","id":"EVENT_UUID","title":"New title","start":"2026-05-04T12:00:00+02:00"}

delete

{"action":"delete","id":"EVENT_UUID"}

All-day events

Set "all_day": true. Then start and end must be calendar dates only: YYYY-MM-DD.

Important: For all-day events, end is the exclusive end date (same rule as iCalendar and Google). A single day on May 4 is:

{"action":"create","title":"Holiday","all_day":true,"start":"2026-05-04","end":"2026-05-05"}

(the event covers May 4 only; May 5 is the first day after the event).

Description text and “formatting”

For agents: you may use emoji in description (and in title if you like). Store them as normal UTF-8 characters in the JSON string—no special encoding beyond valid JSON (escape quotes inside strings as usual). Google Calendar and most clients show emoji in the event text.

The calendar stores plain text only. There is no HTML or Markdown rendering in the feed.

Google Calendar shows the description as plain text. Line breaks you store are preserved: use newline characters in the JSON string for multiple paragraphs or bullet lines.

The server exports descriptions according to iCalendar text rules (RFC 5545): backslashes, semicolons, commas, and newlines are escaped for ICS consumers—clients display normal readable text.

Characters outside ASCII (e.g. Czech letters, emoji) are supported (UTF-8).

Endpoint: ical.php (subscribe in Google Calendar)

Subscribe by URL: in Google Calendar use “From URL” / “By URL” and paste the full HTTPS URL to ical.php on your server.

Google’s servers poll the URL periodically; changes made via mcp.php appear after the next refresh.

Successful responses

JSON includes "ok": true and often "timezone": "Europe/Prague". Errors return HTTP 4xx/5xx with "ok": false and an error or errors field.