apple-notes-mcp 2.8.14 → 2.8.15
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/README.md +27 -3
- package/build/index.js +21 -6
- package/package.json +1 -1
- package/shortcuts/README.md +9 -1
package/README.md
CHANGED
|
@@ -71,6 +71,16 @@ workflows. Confirm **Add Shortcut** in each macOS window, then verify with
|
|
|
71
71
|
support silent Shortcut import, so merely connecting an MCP client never opens
|
|
72
72
|
setup windows or bypasses these confirmations.
|
|
73
73
|
|
|
74
|
+
After install **and after every upgrade**, open Shortcuts.app and run each
|
|
75
|
+
bridge — `Apple Notes MCP - Native Tags` and
|
|
76
|
+
`Apple Notes MCP - Background Operations v5` — once in the foreground, choosing
|
|
77
|
+
**Always Allow** when Shortcuts asks for permission. The server runs these
|
|
78
|
+
Shortcuts in the background, where Shortcuts cannot display a first-run consent
|
|
79
|
+
prompt: an unanswered one stalls every native write on that bridge until it
|
|
80
|
+
times out, while `doctor` still reports the bridge installed. Quitting or
|
|
81
|
+
relaunching Shortcuts.app or Notes.app does not clear it; the foreground run
|
|
82
|
+
does, once per bridge.
|
|
83
|
+
|
|
74
84
|
### Using the Codex Marketplace
|
|
75
85
|
|
|
76
86
|
The same plugin is available for Codex. Add the marketplace and install the plugin:
|
|
@@ -347,7 +357,10 @@ Access.
|
|
|
347
357
|
#### `native-tags-status`
|
|
348
358
|
|
|
349
359
|
Checks whether exactly one configured Native Tags Shortcut is installed. An
|
|
350
|
-
installed workflow may still need macOS permission on its first execution
|
|
360
|
+
installed workflow may still need macOS permission on its first execution, and
|
|
361
|
+
installation does not show whether that consent was given: run it once in the
|
|
362
|
+
foreground in Shortcuts.app and choose **Always Allow** after install or upgrade
|
|
363
|
+
(see [Troubleshooting](#native-writes-time-out-or-report-an-uncertain-outcome)).
|
|
351
364
|
|
|
352
365
|
---
|
|
353
366
|
|
|
@@ -1056,7 +1069,10 @@ Lists all notes shared with collaborators.
|
|
|
1056
1069
|
### Native background operations
|
|
1057
1070
|
|
|
1058
1071
|
Install the signed workflows once as described in
|
|
1059
|
-
[`shortcuts/README.md`](shortcuts/README.md)
|
|
1072
|
+
[`shortcuts/README.md`](shortcuts/README.md), then run each once in the
|
|
1073
|
+
foreground in Shortcuts.app and choose **Always Allow** — again after every
|
|
1074
|
+
upgrade — so no first-run consent prompt is left for a background run that
|
|
1075
|
+
cannot display it. Native writes never use UI
|
|
1060
1076
|
automation or write directly to the Notes database. Every operation requires an
|
|
1061
1077
|
exact note ID, a fresh `expectedContentHash`, and a distinctive existing
|
|
1062
1078
|
`scopeText` so the Shortcut and server can independently resolve the same note.
|
|
@@ -1081,7 +1097,9 @@ Markdown importer rather than converted to HTML first, so `#`/`##`/`###`
|
|
|
1081
1097
|
produce real Title/Heading/Subheading — Notes' HTML importer only
|
|
1082
1098
|
distinguishes two heading levels and renders `###` the same as `##`. A
|
|
1083
1099
|
transport failure names the Shortcut it was waiting on, so a missing or
|
|
1084
|
-
unapproved bridge is identified rather than guessed at
|
|
1100
|
+
unapproved bridge is identified rather than guessed at; a timeout also says it
|
|
1101
|
+
may be an unanswered first-run consent prompt and names the Shortcut to run once
|
|
1102
|
+
in the foreground.
|
|
1085
1103
|
|
|
1086
1104
|
#### `create-checklist-item`
|
|
1087
1105
|
|
|
@@ -1396,6 +1414,12 @@ In a JSON string literal the two characters `\\` denote **one** literal backslas
|
|
|
1396
1414
|
- Go to System Settings > Privacy & Security > Automation
|
|
1397
1415
|
- Ensure your terminal/Claude has permission to control Notes
|
|
1398
1416
|
|
|
1417
|
+
### Native writes time out or report an uncertain outcome
|
|
1418
|
+
- Symptom: `add-native-tags`, `set-note-pinned`, `append-native` or another native write fails with "Shortcuts timed out waiting for …", "Operation outcome uncertain" or "readback was not verified", while `doctor` and `get-capabilities` report the bridges installed
|
|
1419
|
+
- Common cause, especially right after install or upgrade: the bridge Shortcut is waiting on a first-run consent prompt. The server runs it in the background, where Shortcuts cannot display that prompt, so the run stalls until it times out
|
|
1420
|
+
- Fix: open Shortcuts.app, run the Shortcut the error names (`Apple Notes MCP - Native Tags` or `Apple Notes MCP - Background Operations v5`) once in the foreground and choose **Always Allow**. Each bridge needs this once; quitting or relaunching Shortcuts.app or Notes.app does not clear it
|
|
1421
|
+
- Read the exact note before retrying — the write may have landed
|
|
1422
|
+
|
|
1399
1423
|
### "Note not found"
|
|
1400
1424
|
- Note titles must match exactly (case-sensitive)
|
|
1401
1425
|
- Check if the note is in a different account
|
package/build/index.js
CHANGED
|
@@ -42736,6 +42736,14 @@ import { execFileSync as execFileSync6 } from "node:child_process";
|
|
|
42736
42736
|
import { mkdtempSync as mkdtempSync2, writeFileSync, rmSync as rmSync2 } from "node:fs";
|
|
42737
42737
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
42738
42738
|
import { join as join7 } from "node:path";
|
|
42739
|
+
|
|
42740
|
+
// src/services/shortcutConsent.ts
|
|
42741
|
+
function shortcutConsentHint(shortcut) {
|
|
42742
|
+
const target = shortcut ? `"${shortcut}"` : "the bridge Shortcut";
|
|
42743
|
+
return `This may be an unanswered first-run Shortcuts consent prompt, which a background run cannot display: run ${target} once in the foreground in Shortcuts.app and choose Always Allow.`;
|
|
42744
|
+
}
|
|
42745
|
+
|
|
42746
|
+
// src/services/nativeTags.ts
|
|
42739
42747
|
var NATIVE_TAGS_SHORTCUT = "Apple Notes MCP - Native Tags";
|
|
42740
42748
|
function normalizeNativeTags(tags) {
|
|
42741
42749
|
if (!tags.length || tags.length > 100) throw new Error("Provide between 1 and 100 tags");
|
|
@@ -42790,7 +42798,7 @@ function addNativeTags(request, deps) {
|
|
|
42790
42798
|
};
|
|
42791
42799
|
if (after.title !== before.title || allTags.some((tag) => !after.rich.nativeTags.includes(tag)) || textWithoutTags(before.rich.text) !== textWithoutTags(after.rich.text) || linkSignature(before.rich.links) !== linkSignature(after.rich.links) || before.rich.nativeObjectIds.some((id2) => !after.rich.nativeObjectIds.includes(id2)) || before.rich.hasChecklist !== after.rich.hasChecklist) {
|
|
42792
42800
|
throw new Error(
|
|
42793
|
-
"Shortcuts ran, but exact-ID tags/text/links readback was not verified. Read the note before any retry"
|
|
42801
|
+
transportWarning ? `Shortcuts did not complete cleanly, and exact-ID tags/text/links readback was not verified. Read the note before any retry. ${transportWarning}` : "Shortcuts ran, but exact-ID tags/text/links readback was not verified. Read the note before any retry"
|
|
42794
42802
|
);
|
|
42795
42803
|
}
|
|
42796
42804
|
return {
|
|
@@ -42833,9 +42841,12 @@ function runNativeTagsShortcut(input) {
|
|
|
42833
42841
|
maxBuffer: 1024 * 1024,
|
|
42834
42842
|
stdio: ["ignore", "pipe", "pipe"]
|
|
42835
42843
|
});
|
|
42836
|
-
} catch {
|
|
42837
|
-
throw
|
|
42838
|
-
|
|
42844
|
+
} catch (error2) {
|
|
42845
|
+
throw Object.assign(
|
|
42846
|
+
new Error(
|
|
42847
|
+
`Native tag operation did not complete cleanly. ${shortcutConsentHint(status.shortcut)} Do not retry automatically; read the exact note first`
|
|
42848
|
+
),
|
|
42849
|
+
{ shortcut: status.shortcut, code: error2?.code }
|
|
42839
42850
|
);
|
|
42840
42851
|
} finally {
|
|
42841
42852
|
rmSync2(directory, { recursive: true, force: true });
|
|
@@ -43119,7 +43130,7 @@ function mutateBackground(request, operation, data, verify, deps) {
|
|
|
43119
43130
|
transportUncertain = true;
|
|
43120
43131
|
const detail = error2;
|
|
43121
43132
|
const named = detail?.shortcut ? `the "${detail.shortcut}" Shortcut` : "the background Shortcut";
|
|
43122
|
-
transportMessage = detail?.code === "ETIMEDOUT" ? `Shortcuts timed out waiting for ${named}
|
|
43133
|
+
transportMessage = detail?.code === "ETIMEDOUT" ? `Shortcuts timed out waiting for ${named}. ${shortcutConsentHint(detail.shortcut)}` : `${named} failed: ${String(detail?.stderr || detail?.message || "no output").trim().slice(0, 400)}`;
|
|
43123
43134
|
}
|
|
43124
43135
|
const after = deps.read(request.id);
|
|
43125
43136
|
try {
|
|
@@ -43239,6 +43250,7 @@ function runDoctor(manager) {
|
|
|
43239
43250
|
status: fda ? "ok" : "warn",
|
|
43240
43251
|
detail: fda ? "granted \u2014 the Notes database is readable (checklist state, note metadata, note links, sync detail)" : `not granted \u2014 get-checklist-state, get-note-metadata, and the checklist annotations in get-note-markdown won't work; get-note-link fails on macOS 26+ (macOS 12-15 falls back to AppleScript); get-sync-status still answers but cannot see pending uploads. Everything else is pure AppleScript and is unaffected. In System Settings > Privacy & Security > Full Disk Access, grant access to the app that launches this server (Claude Desktop / Terminal / iTerm2), then fully quit and relaunch it and re-run doctor. Setup guide: ${FULL_DISK_ACCESS_GUIDE_URL}`
|
|
43241
43252
|
});
|
|
43253
|
+
const consentReminder = "After install or upgrade, run each bridge Shortcut once in the foreground in Shortcuts.app and choose Always Allow: a background run cannot display a first-run consent prompt, so an unanswered one stalls that bridge's native writes until they time out while this check stays ok";
|
|
43242
43254
|
try {
|
|
43243
43255
|
const bridgeStatuses = [NATIVE_TAGS_SHORTCUT, BACKGROUND_SHORTCUT].map(
|
|
43244
43256
|
(name) => nativeTagsStatus(name)
|
|
@@ -43247,7 +43259,7 @@ function runDoctor(manager) {
|
|
|
43247
43259
|
checks.push({
|
|
43248
43260
|
name: "Native write Shortcuts",
|
|
43249
43261
|
status: missing.length ? "warn" : "ok",
|
|
43250
|
-
detail: missing.length ? `missing: ${missing.map((status) => status.shortcut).join(", ")}. Run apple-notes-mcp setup and approve Add Shortcut in macOS` :
|
|
43262
|
+
detail: missing.length ? `missing: ${missing.map((status) => status.shortcut).join(", ")}. Run apple-notes-mcp setup and approve Add Shortcut in macOS. ${consentReminder}` : `both native-write bridges are installed. ${consentReminder}`
|
|
43251
43263
|
});
|
|
43252
43264
|
} catch (error2) {
|
|
43253
43265
|
checks.push({
|
|
@@ -44261,6 +44273,9 @@ function formatShortcutSetup(report) {
|
|
|
44261
44273
|
lines.push(
|
|
44262
44274
|
"After approving the macOS dialogs, run `apple-notes-mcp setup --check` or the MCP doctor tool."
|
|
44263
44275
|
);
|
|
44276
|
+
lines.push(
|
|
44277
|
+
"After install or upgrade, run each bridge once in the foreground in Shortcuts.app and choose Always Allow; a background run cannot display a first-run consent prompt and stalls until it times out."
|
|
44278
|
+
);
|
|
44264
44279
|
return lines.join("\n");
|
|
44265
44280
|
}
|
|
44266
44281
|
|
package/package.json
CHANGED
package/shortcuts/README.md
CHANGED
|
@@ -15,6 +15,13 @@ Open the signed file and confirm **Add Shortcut** once. macOS may also request
|
|
|
15
15
|
Notes access on first execution. The `shortcuts` CLI can run an installed
|
|
16
16
|
workflow but cannot silently import one.
|
|
17
17
|
|
|
18
|
+
After install and after every upgrade, run each bridge once in the foreground in
|
|
19
|
+
Shortcuts.app and choose **Always Allow** when it asks for permission. The
|
|
20
|
+
server runs bridges in the background, where Shortcuts cannot display a
|
|
21
|
+
first-run consent prompt, so an unanswered one stalls that bridge's native
|
|
22
|
+
writes until they time out. Quitting or relaunching Shortcuts.app or Notes.app
|
|
23
|
+
does not clear it; one foreground run per bridge does.
|
|
24
|
+
|
|
18
25
|
The bridge receives a private temporary JSON file with a title, a distinctive
|
|
19
26
|
existing scope phrase, and normalized tags. Both the server and workflow refuse
|
|
20
27
|
ambiguous note selection. Server readback, rather than CLI output, establishes
|
|
@@ -38,6 +45,7 @@ shortcuts sign --mode anyone \
|
|
|
38
45
|
--output "shortcuts/Apple Notes MCP - Background Operations v5.shortcut"
|
|
39
46
|
```
|
|
40
47
|
|
|
41
|
-
Open the signed file and confirm **Add Shortcut** once
|
|
48
|
+
Open the signed file and confirm **Add Shortcut** once, then run it once in the
|
|
49
|
+
foreground in Shortcuts.app and choose **Always Allow** (see above). Do not install obsolete
|
|
42
50
|
workflow versions with the same display name; the server resolves one exact
|
|
43
51
|
installed UUID and refuses duplicates.
|