@laylzj777/my-apple-apple-eventkit 1.1.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/CHANGELOG.md +575 -0
- package/LICENSE +21 -0
- package/README.md +304 -0
- package/README.zh-CN.md +270 -0
- package/bin/event +0 -0
- package/bin/event-disclaim +0 -0
- package/dist/bin/apple-calendar.d.ts +6 -0
- package/dist/bin/apple-calendar.js +8 -0
- package/dist/bin/apple-calendar.js.map +1 -0
- package/dist/bin/apple-reminders.d.ts +7 -0
- package/dist/bin/apple-reminders.js +9 -0
- package/dist/bin/apple-reminders.js.map +1 -0
- package/dist/bootstrap.d.ts +11 -0
- package/dist/bootstrap.js +44 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/server/handlers.d.ts +12 -0
- package/dist/server/handlers.js +58 -0
- package/dist/server/handlers.js.map +1 -0
- package/dist/server/mode.d.ts +19 -0
- package/dist/server/mode.js +47 -0
- package/dist/server/mode.js.map +1 -0
- package/dist/server/promptAbstractions.d.ts +61 -0
- package/dist/server/promptAbstractions.js +140 -0
- package/dist/server/promptAbstractions.js.map +1 -0
- package/dist/server/prompts.d.ts +13 -0
- package/dist/server/prompts.js +461 -0
- package/dist/server/prompts.js.map +1 -0
- package/dist/server/server.d.ts +61 -0
- package/dist/server/server.js +112 -0
- package/dist/server/server.js.map +1 -0
- package/dist/tools/definitions.d.ts +9 -0
- package/dist/tools/definitions.js +272 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers/calendarHandlers.d.ts +11 -0
- package/dist/tools/handlers/calendarHandlers.js +151 -0
- package/dist/tools/handlers/calendarHandlers.js.map +1 -0
- package/dist/tools/handlers/formatters.d.ts +24 -0
- package/dist/tools/handlers/formatters.js +105 -0
- package/dist/tools/handlers/formatters.js.map +1 -0
- package/dist/tools/handlers/index.d.ts +8 -0
- package/dist/tools/handlers/index.js +9 -0
- package/dist/tools/handlers/index.js.map +1 -0
- package/dist/tools/handlers/listHandlers.d.ts +10 -0
- package/dist/tools/handlers/listHandlers.js +47 -0
- package/dist/tools/handlers/listHandlers.js.map +1 -0
- package/dist/tools/handlers/reminderHandlers.d.ts +10 -0
- package/dist/tools/handlers/reminderHandlers.js +219 -0
- package/dist/tools/handlers/reminderHandlers.js.map +1 -0
- package/dist/tools/handlers/shared.d.ts +28 -0
- package/dist/tools/handlers/shared.js +57 -0
- package/dist/tools/handlers/shared.js.map +1 -0
- package/dist/tools/handlers/subtaskHandlers.d.ts +12 -0
- package/dist/tools/handlers/subtaskHandlers.js +113 -0
- package/dist/tools/handlers/subtaskHandlers.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.js +74 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/index.d.ts +263 -0
- package/dist/types/index.js +42 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/prompts.d.ts +88 -0
- package/dist/types/prompts.js +6 -0
- package/dist/types/prompts.js.map +1 -0
- package/dist/types/repository.d.ts +197 -0
- package/dist/types/repository.js +14 -0
- package/dist/types/repository.js.map +1 -0
- package/dist/utils/binaryValidator.d.ts +52 -0
- package/dist/utils/binaryValidator.js +185 -0
- package/dist/utils/binaryValidator.js.map +1 -0
- package/dist/utils/calendarRepository.d.ts +49 -0
- package/dist/utils/calendarRepository.js +226 -0
- package/dist/utils/calendarRepository.js.map +1 -0
- package/dist/utils/constants.d.ts +79 -0
- package/dist/utils/constants.js +80 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/dateFiltering.d.ts +41 -0
- package/dist/utils/dateFiltering.js +129 -0
- package/dist/utils/dateFiltering.js.map +1 -0
- package/dist/utils/dateUtils.d.ts +27 -0
- package/dist/utils/dateUtils.js +71 -0
- package/dist/utils/dateUtils.js.map +1 -0
- package/dist/utils/errorHandling.d.ts +27 -0
- package/dist/utils/errorHandling.js +88 -0
- package/dist/utils/errorHandling.js.map +1 -0
- package/dist/utils/eventCli.d.ts +40 -0
- package/dist/utils/eventCli.js +294 -0
- package/dist/utils/eventCli.js.map +1 -0
- package/dist/utils/helpers.d.ts +35 -0
- package/dist/utils/helpers.js +61 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/looseDateParser.d.ts +19 -0
- package/dist/utils/looseDateParser.js +149 -0
- package/dist/utils/looseDateParser.js.map +1 -0
- package/dist/utils/projectUtils.d.ts +13 -0
- package/dist/utils/projectUtils.js +92 -0
- package/dist/utils/projectUtils.js.map +1 -0
- package/dist/utils/reminderDateParser.d.ts +8 -0
- package/dist/utils/reminderDateParser.js +89 -0
- package/dist/utils/reminderDateParser.js.map +1 -0
- package/dist/utils/reminderRepository.d.ts +33 -0
- package/dist/utils/reminderRepository.js +262 -0
- package/dist/utils/reminderRepository.js.map +1 -0
- package/dist/utils/subtaskUtils.d.ts +103 -0
- package/dist/utils/subtaskUtils.js +253 -0
- package/dist/utils/subtaskUtils.js.map +1 -0
- package/dist/utils/tagUtils.d.ts +58 -0
- package/dist/utils/tagUtils.js +177 -0
- package/dist/utils/tagUtils.js.map +1 -0
- package/dist/utils/timeHelpers.d.ts +40 -0
- package/dist/utils/timeHelpers.js +136 -0
- package/dist/utils/timeHelpers.js.map +1 -0
- package/dist/validation/schemas.d.ts +385 -0
- package/dist/validation/schemas.js +579 -0
- package/dist/validation/schemas.js.map +1 -0
- package/package.json +96 -0
- package/scripts/build-event.mjs +513 -0
- package/scripts/disclaim.c +69 -0
- package/scripts/event-Info.plist +29 -0
- package/scripts/event.entitlements +10 -0
- package/scripts/postinstall.mjs +91 -0
package/README.md
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# @laylzj777/my-apple-apple-eventkit
|
|
2
|
+
|
|
3
|
+
> **Fork note**: This repository is a fork of [FradSer/mcp-server-apple-events](https://github.com/FradSer/mcp-server-apple-events) v1.5.0 (MIT, LICENSE preserved as-is). Changes on top of upstream:
|
|
4
|
+
> 1. **Package/bin rename**: `@laylzj777/my-apple-apple-eventkit`, dual bins `apple-calendar-mcp` / `apple-reminders-mcp`.
|
|
5
|
+
> 2. **Lenient date normalization** (`src/utils/looseDateParser.ts`): English natural language ("15 March 2025 at 2:00 PM") and Chinese dates ("2026年7月11日 下午2点") are normalized to a strict format before Zod validation — fixing non-ISO inputs being silently zeroed and events ending up "title only, no time".
|
|
6
|
+
> 3. **TCC attribution re-signing**: the `event` CLI's bundle id is set to `io.github.lay777.calendar-event-cli`, with neutral permission-prompt copy.
|
|
7
|
+
> 4. **Pre-built distribution**: the npm package ships a universal (arm64+x86_64) `bin/event` and `bin/event-disclaim`, so end users install with zero Xcode dependency (upstream 1.5.0 mechanism; run `pnpm run build` before publishing).
|
|
8
|
+
> 5. **Calendar/Reminders dual submodules** (`src/server/mode.ts`): one package, two bins — `apple-calendar-mcp` exposes only `calendar_*` tools, `apple-reminders-mcp` exposes only `reminders_*` tools and workflow prompts; cross-domain calls return a redirect error. `dist/index.js` keeps the upstream single-server behavior (`--mode calendar|reminders|all`).
|
|
9
|
+
>
|
|
10
|
+
> Publishing flow: see [PUBLISHING.md](PUBLISHING.md). Tracking upstream: `git remote add upstream https://github.com/FradSer/mcp-server-apple-events.git && git fetch upstream && git merge upstream/main`.
|
|
11
|
+
>
|
|
12
|
+
> The original upstream README follows.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Apple Events MCP Server  
|
|
17
|
+
|
|
18
|
+
[](https://x.com/FradSer)
|
|
19
|
+
|
|
20
|
+
English | [简体中文](README.zh-CN.md)
|
|
21
|
+
|
|
22
|
+
A Model Context Protocol (MCP) server providing native integration with Apple Reminders and Calendar on macOS via the EventKit framework. Exposes reminders, lists, subtasks, and calendar events through a standardized interface with full CRUD operations.
|
|
23
|
+
|
|
24
|
+
The EventKit backend is the standalone [`event`](https://github.com/FradSer/event) Swift CLI, vendored as a git submodule and built into `bin/event` during `pnpm install` — no separate `brew install` required. See [docs/migration-to-event-cli.md](docs/migration-to-event-cli.md) for the v1.5.0 backend swap and the list of write fields not yet exposed by `event`.
|
|
25
|
+
|
|
26
|
+
## Table of Contents
|
|
27
|
+
|
|
28
|
+
- [Features](#features)
|
|
29
|
+
- [Prerequisites](#prerequisites)
|
|
30
|
+
- [Quick Start](#quick-start)
|
|
31
|
+
- [Configuration](#configuration)
|
|
32
|
+
- [macOS Permissions](#macos-permissions)
|
|
33
|
+
- [Usage Examples](#usage-examples)
|
|
34
|
+
- [Available MCP Tools](#available-mcp-tools)
|
|
35
|
+
- [Structured Prompt Library](#structured-prompt-library)
|
|
36
|
+
- [Development](#development)
|
|
37
|
+
- [License](#license)
|
|
38
|
+
- [Contributing](#contributing)
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- Full CRUD for reminders, subtasks, reminder lists, and calendar events
|
|
43
|
+
- Priority (high/medium/low/none), tags, and checklist subtasks with progress tracking
|
|
44
|
+
- Multi-criteria filtering: completion, due-date range, priority, tags, full-text search, recurring, location-based
|
|
45
|
+
- Flexible date formats (`YYYY-MM-DD`, `YYYY-MM-DD HH:mm:ss`, ISO 8601) with timezone awareness
|
|
46
|
+
- Native macOS integration via EventKit — values configured in Reminders.app / Calendar.app round-trip through read responses
|
|
47
|
+
- Automatic macOS permission discovery and prompting
|
|
48
|
+
- Full Unicode support with comprehensive input validation
|
|
49
|
+
|
|
50
|
+
## Prerequisites
|
|
51
|
+
|
|
52
|
+
- **Node.js 20 or later**
|
|
53
|
+
- **macOS** (required for EventKit)
|
|
54
|
+
- **Xcode Command Line Tools** (only when building from source)
|
|
55
|
+
- **pnpm** (recommended)
|
|
56
|
+
|
|
57
|
+
The published npm package ships a pre-built, universal, code-signed `bin/event` binary, so `npx` users need neither Xcode nor a Swift toolchain. Building from a git clone requires the items above.
|
|
58
|
+
|
|
59
|
+
## Quick Start
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx mcp-server-apple-events
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Configuration
|
|
66
|
+
|
|
67
|
+
Add the server to your MCP client. The `npx` form works for every client below; for a local build, replace `command`/`args` with `node` pointing at `dist/index.js`.
|
|
68
|
+
|
|
69
|
+
### Cursor
|
|
70
|
+
|
|
71
|
+
Settings → MCP → Add new global MCP server:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"apple-reminders": {
|
|
77
|
+
"command": "npx",
|
|
78
|
+
"args": ["-y", "mcp-server-apple-events"]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### ChatWise
|
|
85
|
+
|
|
86
|
+
Settings → Tools → "+", then:
|
|
87
|
+
|
|
88
|
+
- Type: `stdio`
|
|
89
|
+
- ID: `apple-reminders`
|
|
90
|
+
- Command: `mcp-server-apple-events`
|
|
91
|
+
- Args: (empty)
|
|
92
|
+
|
|
93
|
+
### Claude Desktop
|
|
94
|
+
|
|
95
|
+
Edit `claude_desktop_config.json` (open it via Settings → Developer Option → Edit Config, or directly at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS / `%APPDATA%\Claude\claude_desktop_config.json` on Windows):
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"apple-reminders": {
|
|
101
|
+
"command": "npx",
|
|
102
|
+
"args": ["-y", "mcp-server-apple-events"]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
For a local build:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"mcpServers": {
|
|
113
|
+
"apple-reminders": {
|
|
114
|
+
"command": "node",
|
|
115
|
+
"args": ["/absolute/path/to/mcp-server-apple-events/dist/index.js"]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
See the [official MCP docs](https://modelcontextprotocol.io/docs/develop/connect-local-servers) for connecting local servers. Restart Claude Desktop completely (quit, not just close) for changes to take effect.
|
|
122
|
+
|
|
123
|
+
## macOS Permissions
|
|
124
|
+
|
|
125
|
+
The vendored `event` CLI embeds its own Info.plist (bundle id `io.github.lay777.calendar-event-cli`) declaring all Reminders and Calendar privacy strings, and by default is spawned through the bundled `bin/event-disclaim` shim, which disclaims TCC responsibility at spawn time. macOS therefore attributes the permission request to **`event`** itself, not the app that launched the MCP server — so the first EventKit call prompts for the embedded name, the grant appears under `System Settings > Privacy & Security > Reminders / Calendars`, and one grant covers every MCP client on the machine (Claude Desktop, Codex Desktop, Cursor, terminal clients, …). See [issue #93](https://github.com/FradSer/mcp-server-apple-events/issues/93) for background.
|
|
126
|
+
|
|
127
|
+
### Attribution mode (`EVENT_TCC_ATTRIBUTION`)
|
|
128
|
+
|
|
129
|
+
Set this env var in your MCP client config to choose how the permission prompt is attributed:
|
|
130
|
+
|
|
131
|
+
- `self` (default): route through the disclaim shim so the prompt shows `event`'s embedded name, independent of which app launched the server. One system grant is shared across every host.
|
|
132
|
+
- `host`: bypass the shim and spawn `event` directly, so macOS attributes the prompt to the **host application** that launched the server — the dialog dynamically shows that app's own name. Each host app then gets its own grant, and the host must declare the relevant EventKit usage strings (`NSRemindersFullAccessUsageDescription` / `NSCalendarsFullAccessUsageDescription`) in its Info.plist, otherwise macOS silently denies access instead of prompting.
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"mcpServers": {
|
|
137
|
+
"apple-reminders": {
|
|
138
|
+
"command": "npx",
|
|
139
|
+
"args": ["-y", "-p", "@laylzj777/my-apple-apple-eventkit", "apple-reminders-mcp"],
|
|
140
|
+
"env": { "EVENT_TCC_ATTRIBUTION": "host" }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
When `event` detects a `notDetermined` status it calls `requestFullAccessToReminders` / `requestFullAccessToEvents`, which surfaces the system prompt. If the OS ever loses track of permissions, rerun `./check-permissions.sh` to re-open the dialogs.
|
|
147
|
+
|
|
148
|
+
### Calendar read errors
|
|
149
|
+
|
|
150
|
+
If you see `Failed to read calendar events`, set Calendar to **Full Calendar Access** under `System Settings > Privacy & Security > Calendars`, or rerun `./check-permissions.sh` (it checks both Reminders and Calendars).
|
|
151
|
+
|
|
152
|
+
### Recovering a stuck TCC state (no prompt ever appears)
|
|
153
|
+
|
|
154
|
+
If the permission dialog never appears and `event` is missing from `System Settings → Privacy & Security → Reminders / Calendars`, your machine is in a stale/misattributed TCC state. The server-side disclaim fix prevents this on a clean machine but cannot clear already-corrupted entries. Recovery:
|
|
155
|
+
|
|
156
|
+
1. Reset Calendar and Reminders TCC entries globally (per-app reset frequently does **not** work — the bare form clears all entries, which is what clears the bad state):
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
tccutil reset Calendar
|
|
160
|
+
tccutil reset Reminders
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
> This clears Calendar/Reminders access for **every** app; other apps re-prompt next time.
|
|
164
|
+
|
|
165
|
+
2. Re-trigger the permission from inside a Claude conversation (Claude Desktop or Claude Code) by asking, e.g., *"Use AppleScript to check my Calendar and Reminders."* Grant access and the server should work normally. See [issue #83](https://github.com/FradSer/mcp-server-apple-events/issues/83).
|
|
166
|
+
|
|
167
|
+
### macOS 26 (Tahoe) `could not build module 'Foundation'`
|
|
168
|
+
|
|
169
|
+
If `pnpm build` fails with `could not build module 'Foundation'` (or `SDK is not supported by the compiler`), your Swift toolchain is older than the macOS 26 SDK requires — it needs **Swift 6.3 or newer**, but the Command Line Tools shipped with early macOS 26 point releases include Swift 6.2.x. `pnpm build:event` detects this and prints the same remediation; see [issue #85](https://github.com/FradSer/mcp-server-apple-events/issues/85). Fix by installing Xcode 26.x from the App Store, or updating Command Line Tools to a Swift 6.3+ version:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
softwareupdate --list
|
|
173
|
+
sudo softwareupdate -i "Command Line Tools for Xcode-<latest>"
|
|
174
|
+
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer # if full Xcode is installed
|
|
175
|
+
xcrun swiftc --version # should report Apple Swift version 6.3 or newer
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Usage Examples
|
|
179
|
+
|
|
180
|
+
Once configured, ask Claude to interact with your Apple Reminders and Calendar. Example prompts:
|
|
181
|
+
|
|
182
|
+
```text
|
|
183
|
+
Create a reminder to "Buy groceries" for tomorrow at 5 PM with tags shopping and errands.
|
|
184
|
+
Add a high-priority reminder to "Finish quarterly report" due Friday in my "Work" list.
|
|
185
|
+
Create "Grocery shopping" with subtasks: milk, eggs, bread, butter.
|
|
186
|
+
Show me all high-priority reminders due today tagged "urgent".
|
|
187
|
+
Show subtasks for my "Grocery shopping" reminder and mark "milk" as complete.
|
|
188
|
+
Update "Buy groceries" — change the title to "Buy organic groceries" and set priority to high.
|
|
189
|
+
Show reminders from my "Work" list, and list all my reminder lists.
|
|
190
|
+
Create a calendar event "Team standup" tomorrow from 9:00 to 9:30 in "Work".
|
|
191
|
+
Show my calendar events for the next week.
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The server processes natural-language requests, interacts with Apple's native Reminders and Calendar apps, and returns formatted results.
|
|
195
|
+
|
|
196
|
+
> Alarms, recurrence rules, and location triggers are read-only via this server — configure them in Reminders.app / Calendar.app. They still appear in read results with visual indicators.
|
|
197
|
+
|
|
198
|
+
## Available MCP Tools
|
|
199
|
+
|
|
200
|
+
Service-scoped tools mirror Apple Reminders and Calendar domains. All take an `action` field plus action-specific parameters (the MCP client introspects the full Zod schema; only actions are listed here). Date fields accept `YYYY-MM-DD`, `YYYY-MM-DD HH:mm:ss` (local time), or ISO 8601 with timezone.
|
|
201
|
+
|
|
202
|
+
| Tool | Actions | Notes |
|
|
203
|
+
| --- | --- | --- |
|
|
204
|
+
| `reminders_tasks` | `read`, `create`, `update`, `delete` | Priority, tags, subtasks. `startDate` is set via `update`, not `create`. Cross-list moves unsupported. |
|
|
205
|
+
| `reminders_subtasks` | `read`, `create`, `update`, `delete`, `toggle`, `reorder` | Stored in the notes field (human-readable in Reminders.app). |
|
|
206
|
+
| `reminders_lists` | `read`, `create`, `update`, `delete` | Rename via `name` → `newName`. |
|
|
207
|
+
| `calendar_events` | `read`, `create`, `update`, `delete` | All-day inferred from date format. Cross-calendar moves unsupported. `span` scopes recurring deletes. |
|
|
208
|
+
| `calendar_calendars` | `read` | Calendars holding ≥1 event in the (optional) `startDate`/`endDate` window. |
|
|
209
|
+
|
|
210
|
+
Example calls:
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"action": "create",
|
|
215
|
+
"title": "Buy groceries",
|
|
216
|
+
"dueDate": "2024-03-25 18:00:00",
|
|
217
|
+
"targetList": "Shopping",
|
|
218
|
+
"note": "Don't forget milk and eggs",
|
|
219
|
+
"priority": 1,
|
|
220
|
+
"tags": ["shopping", "errands"],
|
|
221
|
+
"subtasks": ["Milk", "Eggs", "Bread"]
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{ "action": "read", "filterList": "Work", "dueWithin": "today", "filterPriority": "high", "filterTags": ["urgent"] }
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
```json
|
|
230
|
+
{ "action": "update", "id": "reminder-123", "completed": false, "addTags": ["followup"] }
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{ "action": "toggle", "reminderId": "reminder-123", "subtaskId": "a1b2c3d4" }
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
```json
|
|
238
|
+
{ "action": "create", "name": "Project Alpha" }
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{ "action": "create", "title": "Team standup", "startDate": "2026-05-04 09:00:00", "endDate": "2026-05-04 09:30:00", "targetCalendar": "Work" }
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Read response shape
|
|
246
|
+
|
|
247
|
+
Read responses carry visual indicators: 🔄 recurring, 📍 location-based, 🏷️ has tags, 📋 has subtasks. Example:
|
|
248
|
+
|
|
249
|
+
```text
|
|
250
|
+
- [ ] Buy groceries 🏷️📋
|
|
251
|
+
- List: Shopping
|
|
252
|
+
- ID: reminder-123
|
|
253
|
+
- Priority: high
|
|
254
|
+
- Tags: #shopping #errands
|
|
255
|
+
- Subtasks (1/3):
|
|
256
|
+
- [x] Milk
|
|
257
|
+
- [ ] Eggs
|
|
258
|
+
- [ ] Bread
|
|
259
|
+
- Due: 2024-03-25 18:00:00
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
The `url` field is stored in the native `url` property (visible via the "i" icon in Reminders.app) and also appended to the notes in a structured `URLs:` block for parsing and multi-URL support. URLs accept any valid URI scheme (`http`, `https`, `mailto`, `tel`, `obsidian`, `shortcuts`, …); `file`, `javascript`, `data`, and similar dangerous schemes are rejected, and http(s) hostnames are checked against an SSRF blocklist.
|
|
263
|
+
|
|
264
|
+
> **Read-only fields**: alarms, recurrence rules, location triggers, structured locations, calendar `url`/`availability`/`isAllDay`, and cross-calendar moves are not writable via this server — they round-trip from values configured in Reminders.app / Calendar.app. See [docs/migration-to-event-cli.md](docs/migration-to-event-cli.md) for the full dropped-field table and workarounds.
|
|
265
|
+
|
|
266
|
+
## Structured Prompt Library
|
|
267
|
+
|
|
268
|
+
The server ships a prompt registry exposed via the MCP `ListPrompts` / `GetPrompt` endpoints. Each template shares a mission, context inputs, numbered process, constraints, output format, and quality bar so downstream assistants get predictable scaffolding.
|
|
269
|
+
|
|
270
|
+
- **daily-task-organizer** — optional `today_focus`; produces a same-day execution blueprint, balances priority work with recovery, auto-creates calendar time blocks for due-today reminders.
|
|
271
|
+
- **smart-reminder-creator** — optional `task_idea`; generates an optimally scheduled reminder structure.
|
|
272
|
+
- **reminder-review-assistant** — optional `review_focus` (e.g. `overdue` or a list name); audits and optimizes existing reminders.
|
|
273
|
+
- **weekly-planning-workflow** — optional `user_ideas`; guides a Monday-through-Sunday reset with time blocks tied to existing lists.
|
|
274
|
+
|
|
275
|
+
Prompts are constrained to native Apple Reminders capabilities and ask for missing context before irreversible actions. Run `pnpm test -- src/server/prompts.test.ts` after amending prompt copy.
|
|
276
|
+
|
|
277
|
+
## Development
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
pnpm install # postinstall builds bin/event from vendor/event on macOS
|
|
281
|
+
pnpm build # TypeScript + vendored event CLI
|
|
282
|
+
pnpm test # Jest suite: repositories, schemas, build script, prompt templates
|
|
283
|
+
pnpm exec biome check # lint + format
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
The CLI entry point walks up to ten directories to find `package.json`, so the server can start from nested paths (e.g. `dist/` or editor task runners) without losing `bin/event`. Keep the manifest reachable within that depth if you customize the folder layout.
|
|
287
|
+
|
|
288
|
+
### Scripts
|
|
289
|
+
|
|
290
|
+
- `pnpm build` — TypeScript + vendored `event` CLI (required before running from source)
|
|
291
|
+
- `pnpm build:ts` — TypeScript only
|
|
292
|
+
- `pnpm build:event` — vendored `event` CLI only (`swift build -c release` → `bin/event`)
|
|
293
|
+
- `pnpm build:release` — build plus notarization (release packaging)
|
|
294
|
+
- `pnpm test` / `pnpm test:ci` — Jest suite / with coverage
|
|
295
|
+
- `pnpm lint` — Biome format/fix + TypeScript type check
|
|
296
|
+
- `pnpm check` — lint + tests with coverage
|
|
297
|
+
|
|
298
|
+
## License
|
|
299
|
+
|
|
300
|
+
MIT
|
|
301
|
+
|
|
302
|
+
## Contributing
|
|
303
|
+
|
|
304
|
+
Contributions welcome! Please read the contributing guidelines first.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Apple Events MCP Server  
|
|
2
|
+
|
|
3
|
+
[](https://x.com/FradSer)
|
|
4
|
+
|
|
5
|
+
[English](README.md) | **简体中文**
|
|
6
|
+
|
|
7
|
+
一个为 macOS 提供原生 Apple Reminders 与 Calendar 集成的 Model Context Protocol (MCP) 服务器,基于 EventKit 框架。通过标准化接口暴露提醒事项、列表、子任务与日历事件,支持完整 CRUD 操作。
|
|
8
|
+
|
|
9
|
+
EventKit 后端为独立的 [`event`](https://github.com/FradSer/event) Swift CLI,以 git submodule 形式 vendor,在 `pnpm install` 时构建为 `bin/event`,无需另行 `brew install`。v1.5.0 后端切换及 `event` 尚未暴露的写入字段列表见 [docs/migration-to-event-cli.md](docs/migration-to-event-cli.md)。
|
|
10
|
+
|
|
11
|
+
## 目录
|
|
12
|
+
|
|
13
|
+
- [功能特性](#功能特性)
|
|
14
|
+
- [系统要求](#系统要求)
|
|
15
|
+
- [快速开始](#快速开始)
|
|
16
|
+
- [配置说明](#配置说明)
|
|
17
|
+
- [macOS 权限](#macos-权限)
|
|
18
|
+
- [使用示例](#使用示例)
|
|
19
|
+
- [可用的 MCP 工具](#可用的-mcp-工具)
|
|
20
|
+
- [结构化提示库](#结构化提示库)
|
|
21
|
+
- [开发](#开发)
|
|
22
|
+
- [License](#license)
|
|
23
|
+
- [Contributing](#contributing)
|
|
24
|
+
|
|
25
|
+
## 功能特性
|
|
26
|
+
|
|
27
|
+
- 提醒事项、子任务、提醒列表与日历事件的完整 CRUD
|
|
28
|
+
- 优先级(高/中/低/无)、标签与带进度跟踪的清单子任务
|
|
29
|
+
- 多条件过滤:完成状态、到期范围、优先级、标签、全文搜索、重复、基于位置
|
|
30
|
+
- 灵活日期格式(`YYYY-MM-DD`、`YYYY-MM-DD HH:mm:ss`、ISO 8601),具备时区感知
|
|
31
|
+
- 基于 EventKit 的原生 macOS 集成——在 Reminders.app / Calendar.app 中配置的值会原样往返于读取响应
|
|
32
|
+
- 自动 macOS 权限发现与请求
|
|
33
|
+
- 完整 Unicode 支持与全面的输入校验
|
|
34
|
+
|
|
35
|
+
## 系统要求
|
|
36
|
+
|
|
37
|
+
- **Node.js 20 或更高版本**
|
|
38
|
+
- **macOS**(EventKit 所需)
|
|
39
|
+
- **Xcode Command Line Tools**(仅从源码构建时需要)
|
|
40
|
+
- **pnpm**(推荐)
|
|
41
|
+
|
|
42
|
+
npm 发布包自带预构建的通用签名 `bin/event` 二进制,使用 `npx` 的用户无需安装 Xcode 或 Swift 工具链。从 git 克隆构建时则需要上述依赖。
|
|
43
|
+
|
|
44
|
+
## 快速开始
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx mcp-server-apple-events
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 配置说明
|
|
51
|
+
|
|
52
|
+
将服务器添加到你的 MCP 客户端。下面的 `npx` 形式适用于所有客户端;本地构建时,将 `command`/`args` 改为指向 `dist/index.js` 的 `node`。
|
|
53
|
+
|
|
54
|
+
### Cursor
|
|
55
|
+
|
|
56
|
+
Settings → MCP → Add new global MCP server:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"apple-reminders": {
|
|
62
|
+
"command": "npx",
|
|
63
|
+
"args": ["-y", "mcp-server-apple-events"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### ChatWise
|
|
70
|
+
|
|
71
|
+
Settings → Tools → "+",然后:
|
|
72
|
+
|
|
73
|
+
- 类型:`stdio`
|
|
74
|
+
- ID:`apple-reminders`
|
|
75
|
+
- 命令:`mcp-server-apple-events`
|
|
76
|
+
- 参数:(留空)
|
|
77
|
+
|
|
78
|
+
### Claude Desktop
|
|
79
|
+
|
|
80
|
+
编辑 `claude_desktop_config.json`(通过 Settings → Developer Option → Edit Config 打开,或直接编辑 macOS 下的 `~/Library/Application Support/Claude/claude_desktop_config.json` / Windows 下的 `%APPDATA%\Claude\claude_desktop_config.json`):
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"mcpServers": {
|
|
85
|
+
"apple-reminders": {
|
|
86
|
+
"command": "npx",
|
|
87
|
+
"args": ["-y", "mcp-server-apple-events"]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
本地构建:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"mcpServers": {
|
|
98
|
+
"apple-reminders": {
|
|
99
|
+
"command": "node",
|
|
100
|
+
"args": ["/absolute/path/to/mcp-server-apple-events/dist/index.js"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
连接本地 MCP 服务器的更多信息见[官方 MCP 文档](https://modelcontextprotocol.io/docs/develop/connect-local-servers)。完全退出 Claude Desktop(不仅是关闭窗口)后重启以使更改生效。
|
|
107
|
+
|
|
108
|
+
## macOS 权限
|
|
109
|
+
|
|
110
|
+
vendored 的 `event` CLI 内嵌自己的 Info.plist(bundle id `me.frad.event`),声明了全部 Reminders 与 Calendar 隐私键,并通过随附的 `bin/event-disclaim` shim 启动,在 spawn 时主动放弃(disclaim)TCC 责任归属。macOS 因此把权限请求归到 **`event`** 自己,而不是启动 MCP 服务的宿主应用——首次调用 EventKit 时弹出的对话框显示的是 "event",授权记录以 `event` 的名义出现在 `系统设置 > 隐私与安全性 > 提醒事项 / 日历` 中,授权一次即覆盖本机所有 MCP 客户端(Claude Desktop、Codex Desktop、Cursor、终端客户端等)。背景见 [issue #93](https://github.com/FradSer/mcp-server-apple-events/issues/93)。
|
|
111
|
+
|
|
112
|
+
当 `event` 检测到 `notDetermined` 状态时,会调用 `requestFullAccessToReminders` / `requestFullAccessToEvents` 触发系统对话框。如果系统遗失权限记录,运行 `./check-permissions.sh` 重新触发请求。
|
|
113
|
+
|
|
114
|
+
### 日历读取报错
|
|
115
|
+
|
|
116
|
+
如果看到 `Failed to read calendar events`,在 `系统设置 > 隐私与安全性 > 日历` 中将权限切换为 **Full Calendar Access**,或重新运行 `./check-permissions.sh`(脚本同时检查 Reminders 与 Calendars 权限)。
|
|
117
|
+
|
|
118
|
+
### 恢复卡死的 TCC 状态(权限弹窗始终不出现)
|
|
119
|
+
|
|
120
|
+
如果权限对话框始终不弹出,且 `系统设置 → 隐私与安全性 → 提醒事项 / 日历` 里找不到 `event`,说明你的机器已处于 stale/misattributed 的 TCC 状态。服务端 disclaim 修复只能防止干净机器进入此状态,无法清除已损坏的条目。恢复方法:
|
|
121
|
+
|
|
122
|
+
1. 全局重置 Calendar 与 Reminders 的 TCC 条目(按 app 重置常常**无效**——裸用形式会清除所有条目,才能真正清掉坏状态):
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
tccutil reset Calendar
|
|
126
|
+
tccutil reset Reminders
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
> 这会清除**所有**应用的 Calendar/Reminders 权限;其他应用下次需要访问时会重新弹窗。
|
|
130
|
+
|
|
131
|
+
2. 在 Claude 对话中(Claude Desktop 或 Claude Code)重新触发权限,例如输入「使用 AppleScript 查看我的 Calendar 和 Reminders」。授权后服务即可正常使用。见 [issue #83](https://github.com/FradSer/mcp-server-apple-events/issues/83)。
|
|
132
|
+
|
|
133
|
+
### macOS 26 (Tahoe) 上 `could not build module 'Foundation'`
|
|
134
|
+
|
|
135
|
+
如果 `pnpm build` 失败并提示 `could not build module 'Foundation'`(或 `SDK is not supported by the compiler`),说明你的 Swift 工具链版本低于 macOS 26 SDK 的要求——需要 **Swift 6.3 或更高**,而 macOS 26 早期版本附带的 Command Line Tools 包含的是 Swift 6.2.x。`pnpm build:event` 会检测此不匹配并打印相同解决方案,详见 [issue #85](https://github.com/FradSer/mcp-server-apple-events/issues/85)。修复方式:从 App Store 安装 Xcode 26.x,或将 Command Line Tools 更新到附带 Swift 6.3+ 的版本:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
softwareupdate --list
|
|
139
|
+
sudo softwareupdate -i "Command Line Tools for Xcode-<latest>"
|
|
140
|
+
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer # 若已安装完整版 Xcode
|
|
141
|
+
xcrun swiftc --version # 应显示 Apple Swift version 6.3 或更高
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## 使用示例
|
|
145
|
+
|
|
146
|
+
配置完成后,让 Claude 与你的 Apple Reminders 和 Calendar 交互。示例提示:
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
创建一个明天下午 5 点的"买杂货"提醒,带标签 shopping 和 errands。
|
|
150
|
+
在"工作"列表中创建一个周五到期的高优先级"完成季度报告"提醒。
|
|
151
|
+
创建"Grocery shopping",包含子任务:milk, eggs, bread, butter。
|
|
152
|
+
显示今天到期、带 "urgent" 标签的所有高优先级提醒。
|
|
153
|
+
显示我的 "Grocery shopping" 提醒的子任务,并将 "milk" 标记为已完成。
|
|
154
|
+
更新"买杂货"——把标题改为"买有机杂货",优先级设为高。
|
|
155
|
+
显示"工作"列表中的提醒,并列出我所有的提醒列表。
|
|
156
|
+
在"工作"日历创建明天 9:00–9:30 的 "Team standup" 事件。
|
|
157
|
+
显示我下周的日历事件。
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
服务器处理自然语言请求,与 Apple 原生提醒事项和日历应用交互,并返回格式化结果。
|
|
161
|
+
|
|
162
|
+
> alarms、重复规则与位置触发器在本服务器中是只读的——请在 Reminders.app / Calendar.app 中配置。它们仍会出现在读取结果中并带有视觉指示器。
|
|
163
|
+
|
|
164
|
+
## 可用的 MCP 工具
|
|
165
|
+
|
|
166
|
+
按服务域暴露的工具对应 Apple Reminders 与 Calendar 的不同资源。所有工具都接受一个 `action` 字段以及按操作区分的参数(MCP 客户端会自动内省完整 Zod schema,此处仅列出操作)。日期字段接受 `YYYY-MM-DD`、`YYYY-MM-DD HH:mm:ss`(本地时间)或带时区的 ISO 8601。
|
|
167
|
+
|
|
168
|
+
| 工具 | 操作 | 说明 |
|
|
169
|
+
| --- | --- | --- |
|
|
170
|
+
| `reminders_tasks` | `read`、`create`、`update`、`delete` | 优先级、标签、子任务。`startDate` 通过 `update` 设置,`create` 不可用。不支持跨列表搬移。 |
|
|
171
|
+
| `reminders_subtasks` | `read`、`create`、`update`、`delete`、`toggle`、`reorder` | 存储在备注字段中(Reminders.app 中人类可读)。 |
|
|
172
|
+
| `reminders_lists` | `read`、`create`、`update`、`delete` | 通过 `name` → `newName` 重命名。 |
|
|
173
|
+
| `calendar_events` | `read`、`create`、`update`、`delete` | All-day 由日期格式推断。不支持跨日历搬移。`span` 限定循环事件删除范围。 |
|
|
174
|
+
| `calendar_calendars` | `read` | 在(可选)`startDate`/`endDate` 窗口内至少包含一个事件的日历。 |
|
|
175
|
+
|
|
176
|
+
调用示例:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"action": "create",
|
|
181
|
+
"title": "买杂货",
|
|
182
|
+
"dueDate": "2024-03-25 18:00:00",
|
|
183
|
+
"targetList": "购物",
|
|
184
|
+
"note": "别忘了牛奶和鸡蛋",
|
|
185
|
+
"priority": 1,
|
|
186
|
+
"tags": ["shopping", "errands"],
|
|
187
|
+
"subtasks": ["牛奶", "鸡蛋", "面包"]
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
```json
|
|
192
|
+
{ "action": "read", "filterList": "工作", "dueWithin": "today", "filterPriority": "high", "filterTags": ["urgent"] }
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
```json
|
|
196
|
+
{ "action": "update", "id": "reminder-123", "completed": false, "addTags": ["followup"] }
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{ "action": "toggle", "reminderId": "reminder-123", "subtaskId": "a1b2c3d4" }
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
```json
|
|
204
|
+
{ "action": "create", "name": "项目 Alpha" }
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
```json
|
|
208
|
+
{ "action": "create", "title": "Team standup", "startDate": "2026-05-04 09:00:00", "endDate": "2026-05-04 09:30:00", "targetCalendar": "工作" }
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### 读取响应结构
|
|
212
|
+
|
|
213
|
+
读取响应带有视觉指示器:🔄 重复、📍 基于位置、🏷️ 有标签、📋 有子任务。示例:
|
|
214
|
+
|
|
215
|
+
```text
|
|
216
|
+
- [ ] 买杂货 🏷️📋
|
|
217
|
+
- 列表: 购物
|
|
218
|
+
- ID: reminder-123
|
|
219
|
+
- 优先级: 高
|
|
220
|
+
- 标签: #shopping #errands
|
|
221
|
+
- 子任务 (1/3):
|
|
222
|
+
- [x] 牛奶
|
|
223
|
+
- [ ] 鸡蛋
|
|
224
|
+
- [ ] 面包
|
|
225
|
+
- 到期: 2024-03-25 18:00:00
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
`url` 字段存储在原生 `url` 属性中(可通过 Reminders.app 详情视图的 "i" 图标查看),同时以结构化 `URLs:` 块追加到备注中,便于解析与多 URL 支持。URL 接受任意合法 URI scheme(`http`、`https`、`mailto`、`tel`、`obsidian`、`shortcuts` 等);`file`、`javascript`、`data` 等危险 scheme 会被拒绝,http(s) 主机名会经过 SSRF 黑名单校验。
|
|
229
|
+
|
|
230
|
+
> **只读字段**:alarms、重复规则、位置触发器、structured location、calendar 的 `url`/`availability`/`isAllDay` 以及跨日历搬移无法通过本服务器写入——它们原样来自 Reminders.app / Calendar.app 中配置的值。完整移除字段表与替代方案见 [docs/migration-to-event-cli.md](docs/migration-to-event-cli.md)。
|
|
231
|
+
|
|
232
|
+
## 结构化提示库
|
|
233
|
+
|
|
234
|
+
服务器提供提示注册表,可通过 MCP 的 `ListPrompts` / `GetPrompt` 端点访问。每个模板都共享使命、上下文输入、编号流程、约束、输出格式和质量标准,让下游助手获得可预测的框架。
|
|
235
|
+
|
|
236
|
+
- **daily-task-organizer** —— 可选 `today_focus`;生成当日执行蓝图,在优先级工作与恢复时间之间保持平衡,并为今日到期的提醒自动创建日历时间块。
|
|
237
|
+
- **smart-reminder-creator** —— 可选 `task_idea`;生成优化调度的提醒结构。
|
|
238
|
+
- **reminder-review-assistant** —— 可选 `review_focus`(如 `overdue` 或某个清单名);审计与优化现有提醒。
|
|
239
|
+
- **weekly-planning-workflow** —— 可选 `user_ideas`;指导周一至周日的重置,时间区块与现有列表关联。
|
|
240
|
+
|
|
241
|
+
提示严格限制在 Apple Reminders 原生能力范围内,并在不可逆操作前询问缺失上下文。修改提示文案后运行 `pnpm test -- src/server/prompts.test.ts`。
|
|
242
|
+
|
|
243
|
+
## 开发
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
pnpm install # 在 macOS 上 postinstall 会从 vendor/event 构建 bin/event
|
|
247
|
+
pnpm build # TypeScript + vendored event CLI
|
|
248
|
+
pnpm test # Jest 套件:仓库层、Zod 校验、构建脚本、提示模板
|
|
249
|
+
pnpm exec biome check # lint + 格式化
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
CLI 入口会向上最多十层目录查找 `package.json`,因此可从嵌套路径(如 `dist/` 或编辑器任务运行器)启动而不丢失 `bin/event`。若自定义目录结构,请确保清单文件仍在该查找深度之内。
|
|
253
|
+
|
|
254
|
+
### 脚本
|
|
255
|
+
|
|
256
|
+
- `pnpm build` —— TypeScript + vendored `event` CLI(从源码启动前必需)
|
|
257
|
+
- `pnpm build:ts` —— 仅 TypeScript
|
|
258
|
+
- `pnpm build:event` —— 仅 vendored `event` CLI(`swift build -c release` → `bin/event`)
|
|
259
|
+
- `pnpm build:release` —— 构建并 notarize(发布打包)
|
|
260
|
+
- `pnpm test` / `pnpm test:ci` —— Jest 套件 / 带覆盖率
|
|
261
|
+
- `pnpm lint` —— Biome 格式化/修复 + TypeScript 类型检查
|
|
262
|
+
- `pnpm check` —— lint + 带覆盖率的测试
|
|
263
|
+
|
|
264
|
+
## License
|
|
265
|
+
|
|
266
|
+
MIT
|
|
267
|
+
|
|
268
|
+
## Contributing
|
|
269
|
+
|
|
270
|
+
Contributions welcome! Please read the contributing guidelines first.
|
package/bin/event
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-calendar.js","sourceRoot":"","sources":["../../src/bin/apple-calendar.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,SAAS,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-reminders.js","sourceRoot":"","sources":["../../src/bin/apple-reminders.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,SAAS,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bootstrap.ts(fork 增量)
|
|
3
|
+
* 共享启动逻辑:读 package.json → 解析子模块模式 → 起 MCP server。
|
|
4
|
+
* 三个入口共用:index.ts(缺省 all)、bin/apple-calendar.ts、bin/apple-reminders.ts。
|
|
5
|
+
*/
|
|
6
|
+
import { type ServerMode } from './server/mode.js';
|
|
7
|
+
/**
|
|
8
|
+
* 启动 server。`fixedMode` 是 bin shim 钉死的模式;显式 `--mode` 参数优先于它
|
|
9
|
+
* (便于调试时用同一个 bin 切模式)。
|
|
10
|
+
*/
|
|
11
|
+
export declare function runServer(fixedMode?: ServerMode): void;
|