apple-notes-mcp 2.6.10 → 2.6.12
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 +17 -2
- package/build/index.js +38 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -71,9 +71,24 @@ The Codex plugin runs the published `apple-notes-mcp` server through `npx` and s
|
|
|
71
71
|
|
|
72
72
|
### Other Hosts (Hermes, Antigravity)
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Two more hosts can run the same `apple-notes` MCP server (`npx -y apple-notes-mcp`):
|
|
75
75
|
|
|
76
|
-
- **[Hermes Agent](https://hermes-agent.nousresearch.com/)** (NousResearch) — Hermes has no plugin/marketplace drop-in
|
|
76
|
+
- **[Hermes Agent](https://hermes-agent.nousresearch.com/)** (NousResearch) — Hermes has no plugin/marketplace drop-in, so there is nothing in this repo to install from. Register the server with the CLI:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
hermes mcp add apple-notes --command npx --args -y apple-notes-mcp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Or add it to `~/.hermes/config.yaml` by hand:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
mcp_servers:
|
|
86
|
+
apple-notes:
|
|
87
|
+
command: npx
|
|
88
|
+
args: ["-y", "apple-notes-mcp"]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Restart your Hermes session afterward so the tools load.
|
|
77
92
|
- **[Antigravity](https://antigravity.google/)** (Google) — add the server entry from [`.antigravity-plugin/mcp_config.json`](https://github.com/sweetrb/apple-notes-mcp/blob/main/.antigravity-plugin/mcp_config.json) to `~/.gemini/config/mcp_config.json` (or via Antigravity's MCP settings).
|
|
78
93
|
|
|
79
94
|
### Using Claude Desktop
|
package/build/index.js
CHANGED
|
@@ -40033,7 +40033,7 @@ var AppleNotesManager = class {
|
|
|
40033
40033
|
`;
|
|
40034
40034
|
}
|
|
40035
40035
|
/**
|
|
40036
|
-
* Parses bulk listing output into deduplicated
|
|
40036
|
+
* Parses bulk listing output into deduplicated (title, id) pairs.
|
|
40037
40037
|
*
|
|
40038
40038
|
* Duplicate CoreData references are deduped by id; the limit is applied
|
|
40039
40039
|
* after dedup so duplicates never count against it.
|
|
@@ -40041,17 +40041,31 @@ var AppleNotesManager = class {
|
|
|
40041
40041
|
parseBulkListOutput(output, safeLimit) {
|
|
40042
40042
|
if (!output.trim()) return [];
|
|
40043
40043
|
const seenIds = /* @__PURE__ */ new Set();
|
|
40044
|
-
const
|
|
40044
|
+
const refs = [];
|
|
40045
40045
|
for (const item of output.split(RECORD_SEP)) {
|
|
40046
40046
|
const [title, id] = item.split(FIELD_SEP);
|
|
40047
40047
|
if (!title?.trim()) continue;
|
|
40048
40048
|
const noteId = id?.trim() || generateFallbackId();
|
|
40049
40049
|
if (seenIds.has(noteId)) continue;
|
|
40050
40050
|
seenIds.add(noteId);
|
|
40051
|
-
|
|
40052
|
-
if (safeLimit !== void 0 &&
|
|
40051
|
+
refs.push({ title: title.trim(), id: noteId });
|
|
40052
|
+
if (safeLimit !== void 0 && refs.length >= safeLimit) break;
|
|
40053
40053
|
}
|
|
40054
|
-
return
|
|
40054
|
+
return refs;
|
|
40055
|
+
}
|
|
40056
|
+
/**
|
|
40057
|
+
* Lists all notes in an account/folder as (title, id) pairs, unfiltered
|
|
40058
|
+
* and unlimited. Used internally where the id is needed to avoid
|
|
40059
|
+
* re-resolving identity by (possibly duplicated) title — see exportNotesAsJson.
|
|
40060
|
+
*/
|
|
40061
|
+
listNoteRefs(account, folder) {
|
|
40062
|
+
const folderRef = folder ? buildFolderReference(folder) : void 0;
|
|
40063
|
+
const script = buildAccountScopedScript({ account }, this.buildBulkListCommand({ folderRef }));
|
|
40064
|
+
const result = executeAppleScript(script);
|
|
40065
|
+
if (!result.success) {
|
|
40066
|
+
throw new Error(`Failed to list notes: ${result.error ?? "unknown error"}`);
|
|
40067
|
+
}
|
|
40068
|
+
return this.parseBulkListOutput(result.output);
|
|
40055
40069
|
}
|
|
40056
40070
|
/**
|
|
40057
40071
|
* Lists all notes in an account, optionally filtered by folder, date, and limit.
|
|
@@ -40086,9 +40100,9 @@ var AppleNotesManager = class {
|
|
|
40086
40100
|
const header = sepIdx === -1 ? result2.output : result2.output.slice(0, sepIdx);
|
|
40087
40101
|
const totalCount = Number.parseInt(header.trim(), 10);
|
|
40088
40102
|
const records = sepIdx === -1 ? "" : result2.output.slice(sepIdx + 1);
|
|
40089
|
-
const
|
|
40090
|
-
if (!Number.isNaN(totalCount) && (
|
|
40091
|
-
return
|
|
40103
|
+
const refs = this.parseBulkListOutput(records, safeLimit);
|
|
40104
|
+
if (!Number.isNaN(totalCount) && (refs.length >= safeLimit || totalCount <= safeLimit)) {
|
|
40105
|
+
return refs.map((ref) => ref.title);
|
|
40092
40106
|
}
|
|
40093
40107
|
}
|
|
40094
40108
|
const script = buildAccountScopedScript(
|
|
@@ -40099,7 +40113,7 @@ var AppleNotesManager = class {
|
|
|
40099
40113
|
if (!result.success) {
|
|
40100
40114
|
throw new Error(`Failed to list notes: ${result.error ?? "unknown error"}`);
|
|
40101
40115
|
}
|
|
40102
|
-
return this.parseBulkListOutput(result.output, safeLimit);
|
|
40116
|
+
return this.parseBulkListOutput(result.output, safeLimit).map((ref) => ref.title);
|
|
40103
40117
|
}
|
|
40104
40118
|
/**
|
|
40105
40119
|
* Lists all shared (collaborative) notes across all accounts.
|
|
@@ -41416,13 +41430,14 @@ var AppleNotesManager = class {
|
|
|
41416
41430
|
name: folder.name,
|
|
41417
41431
|
notes: []
|
|
41418
41432
|
};
|
|
41419
|
-
const
|
|
41420
|
-
for (const
|
|
41421
|
-
const note = this.
|
|
41433
|
+
const noteRefs = this.listNoteRefs(account.name, folder.name);
|
|
41434
|
+
for (const ref of noteRefs) {
|
|
41435
|
+
const note = this.getNoteById(ref.id);
|
|
41422
41436
|
if (!note) continue;
|
|
41437
|
+
note.account = account.name;
|
|
41423
41438
|
let content = "";
|
|
41424
41439
|
if (!note.passwordProtected) {
|
|
41425
|
-
content = this.
|
|
41440
|
+
content = this.getNoteContentById(ref.id);
|
|
41426
41441
|
}
|
|
41427
41442
|
folderData.notes.push(this.exportNote(note, content));
|
|
41428
41443
|
exportData.summary.totalNotes++;
|
|
@@ -41871,6 +41886,14 @@ function describeSearchLimit(effectiveLimit, wasDefault, resultCount) {
|
|
|
41871
41886
|
return { info, truncationNote };
|
|
41872
41887
|
}
|
|
41873
41888
|
|
|
41889
|
+
// src/utils/searchScope.ts
|
|
41890
|
+
function describeSearchScope(searchContent, resultCount) {
|
|
41891
|
+
if (searchContent || resultCount > 0) {
|
|
41892
|
+
return "";
|
|
41893
|
+
}
|
|
41894
|
+
return "\n\n\u2139\uFE0F Only note titles were searched, so a term that appears in note bodies would not match. Retry with `searchContent: true` to search bodies instead.";
|
|
41895
|
+
}
|
|
41896
|
+
|
|
41874
41897
|
// src/tools/doctor.ts
|
|
41875
41898
|
import { spawnSync } from "child_process";
|
|
41876
41899
|
function runDoctor(manager) {
|
|
@@ -42191,8 +42214,9 @@ server.registerTool(
|
|
|
42191
42214
|
|
|
42192
42215
|
${syncWarnings.join(" ")}` : "";
|
|
42193
42216
|
if (notes.length === 0) {
|
|
42217
|
+
const scopeHint = describeSearchScope(searchContent, notes.length);
|
|
42194
42218
|
return successResponse(
|
|
42195
|
-
`No notes found matching "${query}" in ${searchType}${folderInfo}${dateInfo}${syncNote}`,
|
|
42219
|
+
`No notes found matching "${query}" in ${searchType}${folderInfo}${dateInfo}${scopeHint}${syncNote}`,
|
|
42196
42220
|
{ notes: [], count: 0 }
|
|
42197
42221
|
);
|
|
42198
42222
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apple-notes-mcp",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.12",
|
|
4
4
|
"description": "MCP server for Apple Notes - create, search, update, and manage notes via Claude and other AI assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -89,6 +89,6 @@
|
|
|
89
89
|
"format:check": "prettier --check src",
|
|
90
90
|
"typecheck": "tsc --noEmit",
|
|
91
91
|
"sync:skills": "node scripts/sync-skills.mjs",
|
|
92
|
-
"version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin .agents/plugins codex .
|
|
92
|
+
"version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin .agents/plugins codex .antigravity-plugin"
|
|
93
93
|
}
|
|
94
94
|
}
|