@mgcrea/mcp-apple-calendar 1.31.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as BUILD_INFO, C as CALENDAR_SURFACE, a as loadConfig, r as createServer } from "./server-
|
|
2
|
+
import { A as BUILD_INFO, C as CALENDAR_SURFACE, a as loadConfig, r as createServer } from "./server-Zdj3jVBo.js";
|
|
3
3
|
import { runStdioServer } from "@mgcrea/mcp-apple-core";
|
|
4
4
|
//#region src/cli.ts
|
|
5
5
|
const LOG_PREFIX = "apple-calendar-mcp";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppBusyError as CalendarBusyError, AppNotRunningError as CalendarNotRunningError, AppleAutomationError, AppleAutomationError as AppleCalendarError, BuildInfo, InvalidDateError, Logger, OsascriptRunner, ReadOnlyMode, StoreFacts, SurfaceContext } from "@mgcrea/mcp-apple-core";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
3
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
4
4
|
import { DatabaseSync } from "node:sqlite";
|
|
5
5
|
//#region src/build-info.d.ts
|
|
6
6
|
declare const BUILD_INFO: BuildInfo;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as BUILD_INFO, C as CALENDAR_SURFACE, D as CalendarNotWritableError, E as CalendarNotRunningError, O as EventNotFoundError, S as CALENDAR_BUNDLE_ID, T as CalendarNotFoundError, _ as STORE_FILENAME, a as loadConfig, b as locateStore, c as introspect, d as decodeRef, f as encodeRef, g as GROUP_CONTAINER, h as EXTRAS_FILENAME, i as registerTools, k as InvalidDateError, l as openStore, m as uuidOf, n as SERVER_VERSION, o as AppleCalendarClient, p as seriesRefOf, r as createServer, s as CalendarStore, t as SERVER_NAME, u as REF_VERSION, v as defaultContainerPath, w as CalendarBusyError, x as AppleCalendarError, y as defaultStorePath } from "./server-
|
|
1
|
+
import { A as BUILD_INFO, C as CALENDAR_SURFACE, D as CalendarNotWritableError, E as CalendarNotRunningError, O as EventNotFoundError, S as CALENDAR_BUNDLE_ID, T as CalendarNotFoundError, _ as STORE_FILENAME, a as loadConfig, b as locateStore, c as introspect, d as decodeRef, f as encodeRef, g as GROUP_CONTAINER, h as EXTRAS_FILENAME, i as registerTools, k as InvalidDateError, l as openStore, m as uuidOf, n as SERVER_VERSION, o as AppleCalendarClient, p as seriesRefOf, r as createServer, s as CalendarStore, t as SERVER_NAME, u as REF_VERSION, v as defaultContainerPath, w as CalendarBusyError, x as AppleCalendarError, y as defaultStorePath } from "./server-Zdj3jVBo.js";
|
|
2
2
|
export { AppleCalendarClient, AppleCalendarError, BUILD_INFO, CALENDAR_BUNDLE_ID, CALENDAR_SURFACE, CalendarBusyError, CalendarNotFoundError, CalendarNotRunningError, CalendarNotWritableError, CalendarStore, EXTRAS_FILENAME, EventNotFoundError, GROUP_CONTAINER, InvalidDateError, REF_VERSION, SERVER_NAME, SERVER_VERSION, STORE_FILENAME, createServer, decodeRef, defaultContainerPath, defaultStorePath, encodeRef, introspect, loadConfig, locateStore, openStore, registerTools, seriesRefOf, uuidOf };
|
|
@@ -3,7 +3,7 @@ import { readdirSync } from "node:fs";
|
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { z } from "zod";
|
|
6
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
6
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
7
7
|
//#region src/build-info.ts
|
|
8
8
|
const pkg = readPackageIdentity(new URL("../package.json", import.meta.url), {
|
|
9
9
|
name: "@mgcrea/mcp-apple-calendar",
|
|
@@ -12,8 +12,8 @@ const pkg = readPackageIdentity(new URL("../package.json", import.meta.url), {
|
|
|
12
12
|
const BUILD_INFO = {
|
|
13
13
|
name: pkg.name,
|
|
14
14
|
version: pkg.version,
|
|
15
|
-
gitCommit: "
|
|
16
|
-
gitCommitDate: "2026-10-
|
|
15
|
+
gitCommit: "735f35d",
|
|
16
|
+
gitCommitDate: "2026-10-29T10:51:42+01:00"
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/client/errors.ts
|
|
@@ -2614,7 +2614,7 @@ const buildDiagnostics = async (client, ctx) => {
|
|
|
2614
2614
|
const registerDiagnosticsTools = (server, client, ctx) => {
|
|
2615
2615
|
server.registerTool("apple_calendar_diagnostics", {
|
|
2616
2616
|
description: "Report which lanes are live, which macOS permissions are granted, and what each missing one is blocking. Start here when a tool fails or reports nothing — it names the exact System Settings pane to open.",
|
|
2617
|
-
inputSchema: {},
|
|
2617
|
+
inputSchema: z.object({}),
|
|
2618
2618
|
annotations: { readOnlyHint: true }
|
|
2619
2619
|
}, async () => wrap(() => buildDiagnostics(client, ctx)).then((r) => r ?? ok({})));
|
|
2620
2620
|
};
|
|
@@ -2639,7 +2639,7 @@ const durationArg = z.number().int().min(1).max(527040).optional().describe("Len
|
|
|
2639
2639
|
const registerActionTools = (server, client) => {
|
|
2640
2640
|
server.registerTool("apple_calendar_create_event", {
|
|
2641
2641
|
description: "Create an event. THIS IS A REAL EVENT ON A REAL CALENDAR: on an iCloud, CalDAV or Exchange calendar it syncs within seconds and there is no draft state and no undo. Check apple_calendar_list_calendars first — writing to one where `isShared` is true is visible to everyone else on that calendar, so prefer a personal one unless the user meant to share it. Read-only calendars are refused. This tool cannot add attendees, which would email a person. The result reports what Calendar actually stored, which is not always what was asked for.",
|
|
2642
|
-
inputSchema: {
|
|
2642
|
+
inputSchema: z.object({
|
|
2643
2643
|
summary: z.string().min(1).describe("The event's title."),
|
|
2644
2644
|
calendar: calendarArg,
|
|
2645
2645
|
start: startArg,
|
|
@@ -2649,11 +2649,11 @@ const registerActionTools = (server, client) => {
|
|
|
2649
2649
|
location: z.string().optional(),
|
|
2650
2650
|
description: z.string().optional().describe("The event's notes."),
|
|
2651
2651
|
url: z.string().optional()
|
|
2652
|
-
}
|
|
2652
|
+
})
|
|
2653
2653
|
}, async (args) => wrap(() => client.createEvent(args)));
|
|
2654
2654
|
server.registerTool("apple_calendar_update_event", {
|
|
2655
2655
|
description: "Change an existing event. On a shared calendar the change is visible to everyone else on it. Note that Apple Events has no transaction: if a change is refused part-way through, earlier fields may already have been written, so the result is the truth about what the event now looks like. Only whole events can be edited: a ref naming ONE occurrence of a repeating event is refused, because Calendar's scripting interface cannot detach a single occurrence and applying the change to the series would move every other one too. To change a single occurrence, delete it with scope \"occurrence\" and create a replacement.",
|
|
2656
|
-
inputSchema: {
|
|
2656
|
+
inputSchema: z.object({
|
|
2657
2657
|
ref: eventRefArg,
|
|
2658
2658
|
summary: z.string().min(1).optional(),
|
|
2659
2659
|
start: startArg.optional(),
|
|
@@ -2663,14 +2663,14 @@ const registerActionTools = (server, client) => {
|
|
|
2663
2663
|
location: z.string().optional(),
|
|
2664
2664
|
description: z.string().optional(),
|
|
2665
2665
|
url: z.string().optional()
|
|
2666
|
-
}
|
|
2666
|
+
})
|
|
2667
2667
|
}, async (args) => wrap(() => client.updateEvent(args)));
|
|
2668
2668
|
server.registerTool("apple_calendar_delete_events", {
|
|
2669
2669
|
description: "Delete whole events. Each result says whether the event ACTUALLY went — Calendar silently declines to delete a repeating event, reporting no error, so `deleted` is decided by re-reading the calendar rather than by the call succeeding. A ref naming ONE occurrence of a repeating event is refused: Calendar's scripting interface cannot remove a single occurrence, and deleting the series instead would take every other one with it. Delete a single occurrence in Calendar.app, or pass the `seriesRef` from get_event to remove the whole series. \"All future occurrences\" is not offered either — it needs two writes with no transaction between them.",
|
|
2670
|
-
inputSchema: {
|
|
2670
|
+
inputSchema: z.object({
|
|
2671
2671
|
refs: z.array(z.string().min(1)).min(1).max(100).describe("Event refs from a list or search result. Each must name a whole event, not one occurrence of a repeating one."),
|
|
2672
2672
|
confirm: confirmArg
|
|
2673
|
-
}
|
|
2673
|
+
})
|
|
2674
2674
|
}, async ({ refs }) => wrap(() => client.deleteEvents(refs)));
|
|
2675
2675
|
};
|
|
2676
2676
|
//#endregion
|
|
@@ -2689,7 +2689,7 @@ const registerActionTools = (server, client) => {
|
|
|
2689
2689
|
const registerAvailabilityTools = (server, client) => {
|
|
2690
2690
|
server.registerTool("apple_calendar_find_availability", {
|
|
2691
2691
|
description: "Find the times nothing is on the calendar, long enough to hold a meeting of a given length. This is the tool for \"when am I free\", \"find me 45 minutes next week\" or \"what does Thursday look like\" — reach for it instead of listing events and looking for gaps yourself, which is where an occurrence of a repeating meeting gets missed. Working hours default to 09:00-18:00 on weekdays, in THIS MACHINE'S timezone, and only time inside them is offered. Slots start on a 15-minute boundary and each one reports how long the whole gap is, which is usually longer than you asked for. Time already past today is never offered. It refuses rather than guesses: if the window holds too many events to read, if this store does not expand repeating events, or if the window runs past the range the expansion covers, you get `degraded: true` and a reason instead of free time that is not free. An empty `slots` list means BOOKED; `degraded` means UNKNOWN. Declined and cancelled events do not block time; all-day events do not either, but they are listed in `allDayEvents` so you can see the holiday you are about to book over.",
|
|
2692
|
-
inputSchema: {
|
|
2692
|
+
inputSchema: z.object({
|
|
2693
2693
|
durationMinutes: z.number().int().min(1).max(1440).describe("How long the meeting needs to be. A gap shorter than this is not returned."),
|
|
2694
2694
|
from: z.string().optional().describe("Start of the window. ISO-8601 \"2026-08-21\" or \"2026-08-21T09:00\", or \"today\", \"tomorrow\", \"next monday\", \"+2d\". Defaults to today. A start already in the past is pulled forward to now."),
|
|
2695
2695
|
to: toArg,
|
|
@@ -2703,7 +2703,7 @@ const registerAvailabilityTools = (server, client) => {
|
|
|
2703
2703
|
includeDeclined: includeDeclinedArg,
|
|
2704
2704
|
includeCancelled: includeCancelledArg,
|
|
2705
2705
|
limit: limitArg
|
|
2706
|
-
},
|
|
2706
|
+
}),
|
|
2707
2707
|
annotations: { readOnlyHint: true }
|
|
2708
2708
|
}, async (args) => wrap(async () => client.findAvailability({
|
|
2709
2709
|
...args,
|
|
@@ -2727,12 +2727,12 @@ const registerAvailabilityTools = (server, client) => {
|
|
|
2727
2727
|
const registerCalendarTools = (server, client) => {
|
|
2728
2728
|
server.registerTool("apple_calendar_list_calendars", {
|
|
2729
2729
|
description: "List every calendar with the account it belongs to, whether it is SHARED with other people, and whether it looks writable. Two cautions. `isShared` means anything you write there is visible to the others on it. And `isSubscribed` catches URL-subscribed calendars but not every read-only one — Birthdays and Siri Suggestions are also read-only — so a write can still be refused by Calendar itself.",
|
|
2730
|
-
inputSchema: {},
|
|
2730
|
+
inputSchema: z.object({}),
|
|
2731
2731
|
annotations: { readOnlyHint: true }
|
|
2732
2732
|
}, async () => wrap(async () => client.calendars()));
|
|
2733
2733
|
server.registerTool("apple_calendar_list_accounts", {
|
|
2734
2734
|
description: "List the accounts Calendar syncs, with how many calendars each holds. Use this to scope a search when the same calendar name exists in more than one account.",
|
|
2735
|
-
inputSchema: {},
|
|
2735
|
+
inputSchema: z.object({}),
|
|
2736
2736
|
annotations: { readOnlyHint: true }
|
|
2737
2737
|
}, async () => wrap(async () => client.accounts()));
|
|
2738
2738
|
};
|
|
@@ -2748,11 +2748,11 @@ const filterSchema = {
|
|
|
2748
2748
|
const registerEventTools = (server, client) => {
|
|
2749
2749
|
server.registerTool("apple_calendar_list_events", {
|
|
2750
2750
|
description: "List events in a date range, earliest first. Occurrences of repeating events are expanded, so a weekly standup appears once per week rather than once. The result carries a `coverage` block naming the window the expansion is known to cover; if your range runs past it, `truncated` is set and says what is missing rather than returning a short list silently. `hasMore` is the other reason a list can be partial: more events matched than `limit` allowed. Returns a `ref` per event for get_event.",
|
|
2751
|
-
inputSchema: {
|
|
2751
|
+
inputSchema: z.object({
|
|
2752
2752
|
from: fromArg,
|
|
2753
2753
|
to: toArg,
|
|
2754
2754
|
...filterSchema
|
|
2755
|
-
},
|
|
2755
|
+
}),
|
|
2756
2756
|
annotations: { readOnlyHint: true }
|
|
2757
2757
|
}, async (args) => wrap(async () => client.listEvents({
|
|
2758
2758
|
...args,
|
|
@@ -2760,13 +2760,13 @@ const registerEventTools = (server, client) => {
|
|
|
2760
2760
|
})));
|
|
2761
2761
|
server.registerTool("apple_calendar_search_events", {
|
|
2762
2762
|
description: "Search events by text, most recent first. Unbounded in time unless you give `from` or `to`. Matches each event ONCE at its series start — it does not expand occurrences, so use list_events with a range to see individual instances of a repeating event.",
|
|
2763
|
-
inputSchema: {
|
|
2763
|
+
inputSchema: z.object({
|
|
2764
2764
|
query: z.string().min(1).describe("Text to look for. Matched case-insensitively."),
|
|
2765
2765
|
scope: z.enum(["summary", "full"]).optional().describe("\"summary\" (default) searches titles; \"full\" adds notes and location."),
|
|
2766
2766
|
from: fromArg,
|
|
2767
2767
|
to: toArg,
|
|
2768
2768
|
...filterSchema
|
|
2769
|
-
},
|
|
2769
|
+
}),
|
|
2770
2770
|
annotations: { readOnlyHint: true }
|
|
2771
2771
|
}, async (args) => wrap(async () => client.searchEvents({
|
|
2772
2772
|
...args,
|
|
@@ -2774,7 +2774,7 @@ const registerEventTools = (server, client) => {
|
|
|
2774
2774
|
})));
|
|
2775
2775
|
server.registerTool("apple_calendar_get_event", {
|
|
2776
2776
|
description: "Full detail for one event: notes, location, URL, conference link, and whether it has attendees or repeats. A ref naming one occurrence reports that occurrence's times and carries a `seriesRef` pointing at the whole series.",
|
|
2777
|
-
inputSchema: { ref: eventRefArg },
|
|
2777
|
+
inputSchema: z.object({ ref: eventRefArg }),
|
|
2778
2778
|
annotations: { readOnlyHint: true }
|
|
2779
2779
|
}, async ({ ref }) => wrap(async () => client.getEvent(ref)));
|
|
2780
2780
|
};
|
|
@@ -2854,4 +2854,4 @@ const createServer = (opts) => {
|
|
|
2854
2854
|
//#endregion
|
|
2855
2855
|
export { BUILD_INFO as A, CALENDAR_SURFACE as C, CalendarNotWritableError as D, CalendarNotRunningError as E, EventNotFoundError as O, CALENDAR_BUNDLE_ID as S, CalendarNotFoundError as T, STORE_FILENAME as _, loadConfig as a, locateStore as b, introspect as c, decodeRef as d, encodeRef as f, GROUP_CONTAINER as g, EXTRAS_FILENAME as h, registerTools as i, InvalidDateError as k, openStore as l, uuidOf as m, SERVER_VERSION as n, AppleCalendarClient as o, seriesRefOf as p, createServer as r, CalendarStore as s, SERVER_NAME as t, REF_VERSION as u, defaultContainerPath as v, CalendarBusyError as w, AppleCalendarError as x, defaultStorePath as y };
|
|
2856
2856
|
|
|
2857
|
-
//# sourceMappingURL=server-
|
|
2857
|
+
//# sourceMappingURL=server-Zdj3jVBo.js.map
|