apple-notes-mcp 2.5.7 → 2.5.9
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 +9 -5
- package/build/index.js +42755 -1080
- 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
|
|
|
@@ -943,7 +943,11 @@ All configuration is optional — the server works out of the box. Override beha
|
|
|
943
943
|
|----------|---------|-------------|
|
|
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
|
+
| `APPLE_NOTES_MCP_MAX_INLINE_IMAGE_BYTES` | `262144` (256 KB) | Per-image cap on the base64 payload kept inline in a [`get-note-content`](#get-note-content) response. Inline images over the cap are replaced with placeholders (with a warning appended) so an image-heavy note cannot exceed the MCP client's message limit and drop the connection; export the real files with [`save-attachment`](#save-attachment) or [`fetch-attachment`](#fetch-attachment). Raise it to keep bigger images inline. |
|
|
946
947
|
| `APPLE_NOTES_MCP_CONFIG_FILE` | `~/Library/Application Support/apple-notes-mcp/config.json` | Path to the JSON config file (see below). |
|
|
948
|
+
| `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. |
|
|
949
|
+
| `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. |
|
|
950
|
+
| `APPLE_NOTES_MCP_RETRY_DELAY_MS` | `1000` (1 s) | Base delay before the first retry; subsequent retries back off exponentially (1s, 2s, 4s, ...). |
|
|
947
951
|
| `DEBUG` / `VERBOSE` | unset | Set either to enable verbose diagnostic logging to stderr. |
|
|
948
952
|
|
|
949
953
|
### Configuration file (when the host strips `env`)
|
|
@@ -1095,7 +1099,7 @@ The `\\\\` in JSON becomes `\\` in the actual string, which represents a single
|
|
|
1095
1099
|
|
|
1096
1100
|
### `apple-notes` server fails to connect when run from a clone
|
|
1097
1101
|
- 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
|
-
-
|
|
1102
|
+
- 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
1103
|
- 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
1104
|
- Approve the pending project-scope server when Claude Code prompts you
|
|
1101
1105
|
|
|
@@ -1105,7 +1109,7 @@ The `\\\\` in JSON becomes `\\` in the actual string, which represents a single
|
|
|
1105
1109
|
|
|
1106
1110
|
```bash
|
|
1107
1111
|
npm install # Install dependencies
|
|
1108
|
-
npm run build #
|
|
1112
|
+
npm run build # Typecheck, then bundle src/index.ts into build/index.js (esbuild)
|
|
1109
1113
|
npm test # Run unit test suite (mocked AppleScript)
|
|
1110
1114
|
npm run test:integration # Run integration tests against real Notes.app
|
|
1111
1115
|
npm run test:all # Unit + integration
|