apple-notes-mcp 2.12.0 → 2.14.0
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 +179 -4
- package/build/index.js +1763 -73
- package/docs/markdown-templates.md +83 -0
- package/package.json +1 -1
|
@@ -246,3 +246,86 @@ export:
|
|
|
246
246
|
|
|
247
247
|
Each warning carries `noteId` and, when known, `attachmentId`. At most 200
|
|
248
248
|
are listed; `warningsOmitted` counts the rest.
|
|
249
|
+
|
|
250
|
+
## Editing in a browser
|
|
251
|
+
|
|
252
|
+
`apple-notes-mcp templates edit` starts a small local web editor for
|
|
253
|
+
templates. It is a command-line tool, not an MCP tool, and it runs only while
|
|
254
|
+
you leave it running.
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npx apple-notes-mcp templates edit # start from standard-markdown
|
|
258
|
+
npx apple-notes-mcp templates edit obsidian # open a built-in or saved template
|
|
259
|
+
npx apple-notes-mcp templates edit --note "x-coredata://…/ICNote/p123"
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
It prints one address, such as
|
|
263
|
+
`http://127.0.0.1:52817/?token=3f9c…`. Open it in a browser. The page shows
|
|
264
|
+
the template JSON on the left and the rendered Markdown on the right. Each
|
|
265
|
+
edit is checked by the same validator as `validate-markdown-template`, and
|
|
266
|
+
problems are listed with their JSON paths. The preview uses the same renderer
|
|
267
|
+
as `export-notes-markdown`, against three built-in sample notes (headings and
|
|
268
|
+
lists, inline formatting and links, attachments and tags). Attachments render
|
|
269
|
+
as placeholders; the preview never copies files.
|
|
270
|
+
|
|
271
|
+
Real notes are not read unless you pass `--note` with one note id. That note
|
|
272
|
+
is read once, read-only, from the Notes database when the editor starts, so
|
|
273
|
+
it needs the same Full Disk Access as `export-notes-markdown`. It appears as
|
|
274
|
+
an extra preview choice.
|
|
275
|
+
|
|
276
|
+
**Save** writes the template to the library through the same path as
|
|
277
|
+
`save-markdown-template`: it validates first, is create-only, and replaces an
|
|
278
|
+
existing template only when you tick "Replace an existing template". The
|
|
279
|
+
editor never writes to Notes.
|
|
280
|
+
|
|
281
|
+
| Option | Meaning |
|
|
282
|
+
| --- | --- |
|
|
283
|
+
| `name` | Template to open first (default `standard-markdown`) |
|
|
284
|
+
| `--port N` | Port to listen on (default: any free port) |
|
|
285
|
+
| `--idle-minutes N` | Stop after N minutes with no requests (default 30; `0` turns it off) |
|
|
286
|
+
| `--note ID` | Also preview one real note, read-only |
|
|
287
|
+
| `--tailnet` | Listen on this Mac's Tailscale address instead of `127.0.0.1` (see below) |
|
|
288
|
+
|
|
289
|
+
Press Ctrl-C to stop the editor. It also stops by itself after the idle
|
|
290
|
+
period.
|
|
291
|
+
|
|
292
|
+
### What the editor exposes
|
|
293
|
+
|
|
294
|
+
- It listens on `127.0.0.1` only, unless you pass `--tailnet`.
|
|
295
|
+
- Every request must carry the random token from the printed address, either
|
|
296
|
+
as `?token=` or as an `Authorization: Bearer` header. A new token is made
|
|
297
|
+
each run, and the editor never logs it. Anyone who has the address can
|
|
298
|
+
read and save templates until the editor stops, so treat it like a
|
|
299
|
+
password.
|
|
300
|
+
- Requests whose `Host` header is not the editor's own address are refused,
|
|
301
|
+
which blocks DNS rebinding. Requests from another origin are refused, and
|
|
302
|
+
saves must come from the editor's own page with a JSON body, so another web
|
|
303
|
+
page cannot drive it.
|
|
304
|
+
- The page loads nothing from the network. Its script and style carry a
|
|
305
|
+
per-page nonce under a strict Content-Security-Policy, and responses send
|
|
306
|
+
`Referrer-Policy: no-referrer` so the token does not leak in a referrer.
|
|
307
|
+
|
|
308
|
+
### On your tailnet
|
|
309
|
+
|
|
310
|
+
`--tailnet` binds the editor to this Mac's [Tailscale](https://tailscale.com)
|
|
311
|
+
IPv4 address (the `100.64.0.0/10` address on its `utun` interface) so you
|
|
312
|
+
can edit from an iPad or another computer on your tailnet. It is off unless
|
|
313
|
+
you pass the flag, and it refuses to start when this Mac has no Tailscale
|
|
314
|
+
address.
|
|
315
|
+
|
|
316
|
+
The editor finds the address by reading the network interfaces. It does not
|
|
317
|
+
run the `tailscale` command, and it never changes Tailscale settings, Serve
|
|
318
|
+
or Funnel, ACLs, or the macOS firewall. Whether other devices can reach the
|
|
319
|
+
port is decided by your tailnet's access rules. The traffic is carried inside
|
|
320
|
+
Tailscale's encrypted tunnel, but the editor itself speaks plain HTTP.
|
|
321
|
+
|
|
322
|
+
With `--tailnet`, every device on your tailnet that is allowed to reach this
|
|
323
|
+
Mac can connect to the port, and any of them that has the printed address can
|
|
324
|
+
read and save templates. Share the address only with yourself, and stop the
|
|
325
|
+
editor when you are done.
|
|
326
|
+
|
|
327
|
+
**`--note` with `--tailnet` exposes the full note.** `--note <id>` previews one
|
|
328
|
+
real note, and the preview shows that note's whole body. With `--tailnet`,
|
|
329
|
+
anyone on your tailnet who has the printed address can read the entire note,
|
|
330
|
+
not only the templates. Do not combine the two unless you want that. The
|
|
331
|
+
editor prints this warning at startup, and `templates edit --help` repeats it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apple-notes-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "MCP server for Apple Notes - read, search, create, edit, organize, and export notes on macOS via Claude and other AI assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|