@l22-io/orchard-mcp 0.3.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 l22.io GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,178 @@
1
+ # orchard-mcp
2
+
3
+ ![Orchard MCP](docs/banner.jpg)
4
+
5
+ MCP server for Apple Calendar, Mail, Reminders, and Files on macOS using native frameworks.
6
+
7
+ Gives any MCP-compatible client (Warp, Claude Desktop, Claude Code, Cursor) structured
8
+ access to your local Apple Calendar, Apple Mail, Apple Reminders, and filesystem through
9
+ native macOS frameworks. No cloud dependencies, no OAuth setup -- all data stays local.
10
+
11
+ ## How it works
12
+
13
+ orchard-mcp reads from the local macOS data stores (EventKit for Calendar/Reminders,
14
+ AppleScript for Mail) which are already populated by accounts configured in
15
+ **System Settings > Internet Accounts**. The OS handles all authentication with Google,
16
+ Microsoft, iCloud, etc. natively. orchard-mcp never communicates with any remote service
17
+ and requires no OAuth client IDs, redirect URIs, or token management.
18
+
19
+ **Privacy note:** orchard-mcp itself sends no data anywhere. However, the MCP client
20
+ (e.g. Claude, Cursor) that invokes tools will receive the returned data (calendar events,
21
+ emails, reminders, file contents) and send it to its LLM provider as part of the
22
+ conversation context. Be mindful of what you ask the LLM to access.
23
+
24
+ The only permissions needed are macOS TCC grants (e.g. "Allow access to Calendars"),
25
+ triggered automatically on first run.
26
+
27
+ ## Status
28
+
29
+ - Phase 1 (Calendar + System) -- complete
30
+ - Phase 2 (Reminders read + write) -- complete
31
+ - Phase 3 (Mail read + create_draft) -- complete
32
+ - Phase 4a (Setup Wizard) -- complete
33
+ - Phase 4b (Distribution) -- complete
34
+
35
+ See `docs/PRD.md` for the full roadmap.
36
+
37
+ ## Requirements
38
+
39
+ - macOS 14+ (Sonoma or later)
40
+ - Node.js 18+
41
+
42
+ ## Install
43
+
44
+ ```bash
45
+ npm install -g @l22-io/orchard-mcp
46
+ orchard-mcp setup
47
+ ```
48
+
49
+ No Swift or Xcode required -- the npm package ships a prebuilt universal binary (arm64 + x86_64).
50
+
51
+ The setup wizard verifies prerequisites, triggers macOS permission prompts, and generates
52
+ MCP client configuration.
53
+
54
+ ### From source (development)
55
+
56
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for building from source.
57
+
58
+ ## MCP Client Configuration
59
+
60
+ ### Warp
61
+
62
+ Add as an MCP server in Warp settings with:
63
+ ```json
64
+ {"command": "npx", "args": ["@l22-io/orchard-mcp"]}
65
+ ```
66
+
67
+ ### Claude Desktop
68
+
69
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
70
+ ```json
71
+ {
72
+ "mcpServers": {
73
+ "orchard": {
74
+ "command": "npx",
75
+ "args": ["@l22-io/orchard-mcp"]
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### Claude Code
82
+
83
+ ```bash
84
+ claude mcp add --scope user orchard -- npx @l22-io/orchard-mcp
85
+ ```
86
+
87
+ ### Cursor
88
+
89
+ Add to your MCP settings:
90
+ ```json
91
+ {"command": "npx", "args": ["@l22-io/orchard-mcp"]}
92
+ ```
93
+
94
+ ## Available Tools
95
+
96
+ ### Calendar
97
+
98
+ - `calendar.list_calendars` -- List all calendars with account, type, color
99
+ - `calendar.list_events` -- Events in a date range (recurring events expanded)
100
+ - `calendar.today` -- Today's events across all calendars
101
+ - `calendar.search` -- Search events by title/notes/location
102
+
103
+ ### Mail
104
+
105
+ - `mail.list_accounts` -- List all mail accounts with mailboxes and unread counts
106
+ - `mail.unread_summary` -- Unread count per account with recent message headers
107
+ - `mail.search` -- Search messages by subject/sender across accounts
108
+ - `mail.read_message` -- Get full message content by message ID
109
+ - `mail.flagged` -- List flagged messages across all accounts
110
+ - `mail.create_draft` -- Create a draft email (opens compose window for review)
111
+ - `mail.save_attachment` -- Save an email attachment to disk by message ID and index
112
+
113
+ ### Reminders
114
+
115
+ - `reminders.list_lists` -- List all reminder lists with account, color, item count
116
+ - `reminders.list_reminders` -- Reminders from a list with filters (incomplete, completed, overdue, dueToday)
117
+ - `reminders.today` -- Incomplete reminders due today + overdue across all lists
118
+ - `reminders.create_list` -- Create a new reminder list
119
+ - `reminders.create_reminder` -- Create a reminder with optional due date, priority, notes
120
+ - `reminders.complete_reminder` -- Mark a reminder as completed
121
+ - `reminders.delete_reminder` -- Delete a reminder
122
+ - `reminders.delete_list` -- Delete a reminder list
123
+
124
+ ### Files
125
+
126
+ - `files.list` -- List directory contents with metadata
127
+ - `files.info` -- Get detailed file metadata including Spotlight attributes
128
+ - `files.search` -- Search files using macOS Spotlight
129
+ - `files.read` -- Read/extract text from files (plain text, PDF, images via OCR, .docx/.rtf/.pages)
130
+ - `files.move` -- Move or rename files and folders (supports batch operations)
131
+ - `files.copy` -- Copy a file or folder
132
+ - `files.create_folder` -- Create a new directory
133
+ - `files.trash` -- Move a file or folder to Trash (reversible)
134
+
135
+ ### System
136
+
137
+ - `system.doctor` -- Check permissions, list accessible accounts
138
+
139
+ ## Architecture
140
+
141
+ Two-layer design:
142
+
143
+ 1. **TypeScript MCP server** (`src/`) -- handles MCP protocol via stdio, Zod schemas, tool routing
144
+ 2. **Swift CLI** (`swift/`) -- native binary (`apple-bridge`) using EventKit for Calendar/Reminders, AppleScript for Mail
145
+
146
+ The TypeScript layer calls the Swift binary via `child_process.execFile` and parses
147
+ JSON responses. All subcommands return a `{"status": "ok"|"error", "data": ..., "error": ...}` envelope.
148
+
149
+ ### Swift CLI subcommands
150
+
151
+ ```
152
+ apple-bridge calendars List all calendars
153
+ apple-bridge events Events in a date range (--start, --end, --calendar)
154
+ apple-bridge search Search events by text (--start, --end)
155
+ apple-bridge reminder-lists List all reminder lists
156
+ apple-bridge reminders Reminders with filters (--list, --filter, --limit)
157
+ apple-bridge reminders-today Due today + overdue reminders
158
+ apple-bridge reminder-create-list Create a new reminder list (--name)
159
+ apple-bridge reminder-create Create a reminder (--list, --title, --due, --priority, --notes)
160
+ apple-bridge reminder-complete Mark a reminder as completed (--id)
161
+ apple-bridge reminder-delete Delete a reminder (--id)
162
+ apple-bridge reminder-delete-list Delete a reminder list (--id, --force)
163
+ apple-bridge mail-accounts List mail accounts and mailboxes
164
+ apple-bridge mail-unread Unread summary per account (--limit)
165
+ apple-bridge mail-search Search messages (--query, --account, --mailbox, --limit)
166
+ apple-bridge mail-message Full message content (--id)
167
+ apple-bridge mail-flagged Flagged messages (--limit)
168
+ apple-bridge mail-create-draft Create a draft email (--to, --subject, --body, --cc, --bcc, --account)
169
+ apple-bridge doctor Check permissions and accessible resources
170
+ ```
171
+
172
+ ## Environment Variables
173
+
174
+ - `APPLE_BRIDGE_BIN` -- Override path to the Swift binary
175
+
176
+ ## License
177
+
178
+ MIT
@@ -0,0 +1,15 @@
1
+ export interface BridgeResponse {
2
+ status: "ok" | "error";
3
+ data?: unknown;
4
+ error?: string;
5
+ }
6
+ /**
7
+ * Execute an apple-bridge subcommand and return parsed JSON.
8
+ * Tries direct execution first; falls back to .app bundle mode
9
+ * (via `open`) when direct execution returns a permission error.
10
+ */
11
+ export declare function callBridge(args: string[]): Promise<BridgeResponse>;
12
+ /**
13
+ * Convenience: call bridge, check status, return data or throw.
14
+ */
15
+ export declare function bridgeData(args: string[]): Promise<unknown>;
@@ -0,0 +1,122 @@
1
+ import { execFile, spawn } from "node:child_process";
2
+ import { promisify } from "node:util";
3
+ import { resolve, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { readFile, unlink, access } from "node:fs/promises";
6
+ import { randomUUID } from "node:crypto";
7
+ import { tmpdir } from "node:os";
8
+ const execFileAsync = promisify(execFile);
9
+ // Reason: Resolve the Swift binary path relative to this file's location.
10
+ // In development: swift/.build/release/apple-bridge
11
+ // In npm package: swift/.build/release/apple-bridge (shipped alongside)
12
+ const __dirname = dirname(fileURLToPath(import.meta.url));
13
+ function getBridgePath() {
14
+ // Reason: Allow override via env var for custom installations.
15
+ if (process.env.APPLE_BRIDGE_BIN) {
16
+ return process.env.APPLE_BRIDGE_BIN;
17
+ }
18
+ // Default: use the binary inside the .app bundle (one level up from build/)
19
+ return resolve(__dirname, "..", "swift", ".build", "AppleBridge.app", "Contents", "MacOS", "apple-bridge");
20
+ }
21
+ function getAppBundlePath() {
22
+ if (process.env.APPLE_BRIDGE_APP) {
23
+ return process.env.APPLE_BRIDGE_APP;
24
+ }
25
+ return resolve(__dirname, "..", "swift", ".build", "AppleBridge.app");
26
+ }
27
+ /**
28
+ * Execute an apple-bridge subcommand and return parsed JSON.
29
+ * Tries direct execution first; falls back to .app bundle mode
30
+ * (via `open`) when direct execution returns a permission error.
31
+ */
32
+ export async function callBridge(args) {
33
+ const bin = getBridgePath();
34
+ try {
35
+ const { stdout, stderr } = await execFileAsync(bin, args, {
36
+ timeout: 30_000,
37
+ maxBuffer: 10 * 1024 * 1024,
38
+ });
39
+ if (stderr) {
40
+ // Reason: stderr is used for Swift warnings/diagnostics, log but don't fail.
41
+ console.error(`[apple-bridge stderr] ${stderr.trim()}`);
42
+ }
43
+ const parsed = JSON.parse(stdout);
44
+ // If the command returned a permission error, retry via .app bundle
45
+ if (parsed.status === "error" &&
46
+ typeof parsed.error === "string" &&
47
+ parsed.error.includes("access denied")) {
48
+ return callBridgeViaApp(args);
49
+ }
50
+ return parsed;
51
+ }
52
+ catch (err) {
53
+ const msg = err instanceof Error ? err.message : "Unknown error calling apple-bridge";
54
+ return { status: "error", error: msg };
55
+ }
56
+ }
57
+ /**
58
+ * Launch apple-bridge via .app bundle using `open`, with output written to
59
+ * a temp file. Required on macOS Sequoia where CLI tools cannot obtain
60
+ * TCC permissions (e.g. Reminders) without an .app bundle context.
61
+ */
62
+ async function callBridgeViaApp(args) {
63
+ const appPath = getAppBundlePath();
64
+ const outputFile = resolve(tmpdir(), `apple-bridge-${randomUUID()}.json`);
65
+ try {
66
+ // Verify .app bundle exists
67
+ await access(appPath);
68
+ }
69
+ catch {
70
+ return {
71
+ status: "error",
72
+ error: `AppleBridge.app not found at ${appPath}. Build with: swift build -c release then create the .app bundle.`,
73
+ };
74
+ }
75
+ return new Promise((resolvePromise) => {
76
+ const child = spawn("open", [
77
+ "-W", "-n", "-a", appPath,
78
+ "--args", ...args, "--output", outputFile,
79
+ ]);
80
+ const timeout = setTimeout(() => {
81
+ child.kill();
82
+ resolvePromise({
83
+ status: "error",
84
+ error: "apple-bridge .app bundle timed out after 30s",
85
+ });
86
+ }, 30_000);
87
+ child.on("close", async () => {
88
+ clearTimeout(timeout);
89
+ try {
90
+ const data = await readFile(outputFile, "utf-8");
91
+ await unlink(outputFile).catch(() => { });
92
+ const parsed = JSON.parse(data);
93
+ resolvePromise(parsed);
94
+ }
95
+ catch (err) {
96
+ await unlink(outputFile).catch(() => { });
97
+ const msg = err instanceof Error
98
+ ? err.message
99
+ : "Failed to read .app bundle output";
100
+ resolvePromise({ status: "error", error: msg });
101
+ }
102
+ });
103
+ child.on("error", (err) => {
104
+ clearTimeout(timeout);
105
+ resolvePromise({
106
+ status: "error",
107
+ error: `Failed to launch .app bundle: ${err.message}`,
108
+ });
109
+ });
110
+ });
111
+ }
112
+ /**
113
+ * Convenience: call bridge, check status, return data or throw.
114
+ */
115
+ export async function bridgeData(args) {
116
+ const result = await callBridge(args);
117
+ if (result.status === "error") {
118
+ throw new Error(result.error ?? "apple-bridge returned an error");
119
+ }
120
+ return result.data;
121
+ }
122
+ //# sourceMappingURL=bridge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,0EAA0E;AAC1E,oDAAoD;AACpD,wEAAwE;AACxE,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,SAAS,aAAa;IACpB,+DAA+D;IAC/D,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QACjC,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACtC,CAAC;IACD,4EAA4E;IAC5E,OAAO,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAA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,CAAC,IAAI,CAAmB,CAAC;gBAClD,cAAc,CAAC,MAAM,CAAC,CAAC;YACzB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;gBACzC,MAAM,GAAG,GACP,GAAG,YAAY,KAAK;oBAClB,CAAC,CAAC,GAAG,CAAC,OAAO;oBACb,CAAC,CAAC,mCAAmC,CAAC;gBAC1C,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAClD,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACxB,YAAY,CAAC,OAAO,CAAC,CAAC;YACtB,cAAc,CAAC;gBACb,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,iCAAiC,GAAG,CAAC,OAAO,EAAE;aACtD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAc;IAC7C,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,gCAAgC,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/build/index.js ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ // Handle `orchard-mcp setup` subcommand before starting MCP server.
3
+ if (process.argv[2] === "setup") {
4
+ const { runSetup } = await import("./setup.js");
5
+ await runSetup(process.argv.includes("--non-interactive"));
6
+ process.exit(0);
7
+ }
8
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
9
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
10
+ import { registerCalendarTools } from "./tools/calendar.js";
11
+ import { registerMailTools } from "./tools/mail.js";
12
+ import { registerReminderTools } from "./tools/reminders.js";
13
+ import { registerSystemTools } from "./tools/system.js";
14
+ import { registerFileTools } from "./tools/files.js";
15
+ const server = new McpServer({
16
+ name: "orchard-mcp",
17
+ version: "0.3.0",
18
+ });
19
+ registerCalendarTools(server);
20
+ registerMailTools(server);
21
+ registerReminderTools(server);
22
+ registerSystemTools(server);
23
+ registerFileTools(server);
24
+ const transport = new StdioServerTransport();
25
+ await server.connect(transport);
26
+ // Reason: stderr only -- stdout is reserved for JSON-RPC in stdio transport.
27
+ console.error("[orchard-mcp] Server started via stdio transport.");
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,oEAAoE;AACpE,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;IAChC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;IAChD,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,E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