apple-notes-mcp 2.5.7 → 2.5.8
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 +8 -5
- package/build/index.js +42669 -1077
- package/package.json +3 -3
- package/build/index.test.js +0 -446
- package/build/services/__fixtures__/notesNormalizedHtml.js +0 -32
- package/build/services/appleNotesManager.js +0 -2634
- package/build/services/appleNotesManager.test.js +0 -2416
- package/build/services/attachmentSave.test.js +0 -85
- package/build/services/fileConfig.js +0 -51
- package/build/services/fileConfig.test.js +0 -48
- package/build/services/notesHtmlMarkdown.test.js +0 -55
- package/build/tools/doctor.js +0 -50
- package/build/tools/doctor.test.js +0 -42
- package/build/tools/resourcesAndPrompts.js +0 -70
- package/build/tools/resourcesAndPrompts.test.js +0 -63
- package/build/types.js +0 -13
- package/build/utils/applescript.js +0 -421
- package/build/utils/applescript.test.js +0 -342
- package/build/utils/attachmentFs.js +0 -97
- package/build/utils/attachmentFs.test.js +0 -69
- package/build/utils/checklistParser.js +0 -259
- package/build/utils/checklistParser.test.js +0 -230
- package/build/utils/contentWarnings.js +0 -44
- package/build/utils/contentWarnings.test.js +0 -52
- package/build/utils/hashtags.js +0 -56
- package/build/utils/hashtags.test.js +0 -45
- package/build/utils/jxa.js +0 -139
- package/build/utils/jxa.test.js +0 -134
- package/build/utils/noteMetadata.js +0 -135
- package/build/utils/noteMetadata.test.js +0 -106
- package/build/utils/protobuf.js +0 -151
- package/build/utils/protobuf.test.js +0 -138
- package/build/utils/syncDetection.js +0 -242
- package/build/utils/syncDetection.test.js +0 -228
package/README.md
CHANGED
|
@@ -899,10 +899,10 @@ npm install -g github:sweetrb/apple-notes-mcp
|
|
|
899
899
|
```bash
|
|
900
900
|
git clone https://github.com/sweetrb/apple-notes-mcp.git
|
|
901
901
|
cd apple-notes-mcp
|
|
902
|
-
npm install
|
|
903
|
-
npm run build
|
|
904
902
|
```
|
|
905
903
|
|
|
904
|
+
The repo ships a prebuilt, dependency-free `build/index.js`, so a bare clone runs with nothing but Node installed. `npm install` and `npm run build` are only needed when you change the source.
|
|
905
|
+
|
|
906
906
|
If installed from source, use this configuration:
|
|
907
907
|
```json
|
|
908
908
|
{
|
|
@@ -917,7 +917,7 @@ If installed from source, use this configuration:
|
|
|
917
917
|
|
|
918
918
|
#### Running from a clone in Claude Code (project-scope `.mcp.json`)
|
|
919
919
|
|
|
920
|
-
This repo ships a `.mcp.json` at its root so that, when you run `claude` from inside a clone, the server is registered automatically as a **project-scope** server — no manual config needed.
|
|
920
|
+
This repo ships a `.mcp.json` at its root so that, when you run `claude` from inside a clone, the server is registered automatically as a **project-scope** server — no manual config needed. Just launch Claude Code from the repo directory and approve the server when prompted (the bundled `build/index.js` is committed, so no build step is required).
|
|
921
921
|
|
|
922
922
|
The entrypoint is written as:
|
|
923
923
|
|
|
@@ -944,6 +944,9 @@ All configuration is optional — the server works out of the box. Override beha
|
|
|
944
944
|
| `APPLE_NOTES_MCP_MAX_BUFFER` | `67108864` (64 MB) | Max bytes captured from a single AppleScript invocation. Raise it if a very large export/list is truncated; lower it to cap memory. |
|
|
945
945
|
| `APPLE_NOTES_MCP_MAX_ATTACHMENT_BYTES` | `26214400` (25 MB) | Max size of an attachment that [`fetch-attachment`](#fetch-attachment) will base64-encode inline. Larger attachments are rejected with an error pointing at [`save-attachment`](#save-attachment) (which streams to disk and has no such limit). Raise it to fetch bigger attachments inline; lower it to cap memory. |
|
|
946
946
|
| `APPLE_NOTES_MCP_CONFIG_FILE` | `~/Library/Application Support/apple-notes-mcp/config.json` | Path to the JSON config file (see below). |
|
|
947
|
+
| `APPLE_NOTES_MCP_TIMEOUT_MS` | `30000` (30 s) | Per-call AppleScript timeout. Raise it if full-library operations (large searches, exports) time out on a big Notes library. Per-call `timeoutMs` options still win. |
|
|
948
|
+
| `APPLE_NOTES_MCP_MAX_RETRIES` | `2` | Total attempts for an AppleScript call that fails with a **transient** error (Notes.app busy / not responding / lost connection / timeout). `2` means one retry; set `1` to fail fast with no retries. Non-transient errors (e.g. "note not found") never retry. |
|
|
949
|
+
| `APPLE_NOTES_MCP_RETRY_DELAY_MS` | `1000` (1 s) | Base delay before the first retry; subsequent retries back off exponentially (1s, 2s, 4s, ...). |
|
|
947
950
|
| `DEBUG` / `VERBOSE` | unset | Set either to enable verbose diagnostic logging to stderr. |
|
|
948
951
|
|
|
949
952
|
### Configuration file (when the host strips `env`)
|
|
@@ -1095,7 +1098,7 @@ The `\\\\` in JSON becomes `\\` in the actual string, which represents a single
|
|
|
1095
1098
|
|
|
1096
1099
|
### `apple-notes` server fails to connect when run from a clone
|
|
1097
1100
|
- Launch `claude` from **inside the repo directory** so `CLAUDE_PROJECT_DIR` resolves to the repo root (the bare `.` fallback is unreliable — it points at the launching process's working directory)
|
|
1098
|
-
-
|
|
1101
|
+
- If you've been editing the source, rerun `npm run build` — the entrypoint is `${CLAUDE_PROJECT_DIR:-.}/build/index.js`, and the committed bundle only reflects your changes after a rebuild
|
|
1099
1102
|
- Run `claude mcp list` to check for a conflicting `apple-notes` entry at another scope (project-scope outranks user-scope, but local-scope outranks project-scope)
|
|
1100
1103
|
- Approve the pending project-scope server when Claude Code prompts you
|
|
1101
1104
|
|
|
@@ -1105,7 +1108,7 @@ The `\\\\` in JSON becomes `\\` in the actual string, which represents a single
|
|
|
1105
1108
|
|
|
1106
1109
|
```bash
|
|
1107
1110
|
npm install # Install dependencies
|
|
1108
|
-
npm run build #
|
|
1111
|
+
npm run build # Typecheck, then bundle src/index.ts into build/index.js (esbuild)
|
|
1109
1112
|
npm test # Run unit test suite (mocked AppleScript)
|
|
1110
1113
|
npm run test:integration # Run integration tests against real Notes.app
|
|
1111
1114
|
npm run test:all # Unit + integration
|