@squirrelnotes.app/mcp 2.5.0-test.369 → 2.5.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.
Files changed (3) hide show
  1. package/README.md +13 -20
  2. package/dist/stdio-handler.js +4162 -20064
  3. package/package.json +2 -4
package/README.md CHANGED
@@ -397,15 +397,7 @@ Claude generates content
397
397
 
398
398
  ### Claude Desktop configuration
399
399
 
400
- First create the upload folder, private to you. It must exist before the Filesystem server starts (that server exits if its folder is missing):
401
-
402
- ```sh
403
- mkdir -m 700 ~/SquirrelUploads # or, if it already exists: chmod 700 ~/SquirrelUploads
404
- ```
405
-
406
- On Windows, just create `SquirrelUploads` in your user folder. Whenever the Squirrel MCP server starts with local file access and the default root, it also creates an empty `~/SquirrelUploads` (0700) if it is missing (Gareth, 2026-10-30: "Create at start"), so the folder appears in your home folder and exists from the second start even if this step is skipped.
407
-
408
- Then add both servers to `claude_desktop_config.json`:
400
+ Add both servers to `claude_desktop_config.json`:
409
401
 
410
402
  ```json
411
403
  {
@@ -416,45 +408,46 @@ Then add both servers to `claude_desktop_config.json`:
416
408
  "env": {
417
409
  "SQUIRREL_API_BASE_URL": "https://api.squirrelnotes.app",
418
410
  "SQUIRREL_API_KEY": "sqn_your_api_key",
419
- "SQUIRREL_PASSPHRASE": "your-passphrase"
411
+ "SQUIRREL_PASSPHRASE": "your-passphrase",
412
+ "SQUIRREL_UPLOAD_ROOT": "/tmp"
420
413
  }
421
414
  },
422
415
  "filesystem": {
423
416
  "command": "npx",
424
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/SquirrelUploads"],
417
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
425
418
  "env": {}
426
419
  }
427
420
  }
428
421
  }
429
422
  ```
430
423
 
431
- > **`SQUIRREL_UPLOAD_ROOT`** restricts which directories `upload_attachment_from_path` may read from. **Unset, it is `~/SquirrelUploads`** (in your home folder: `/Users/you/SquirrelUploads` on macOS, `/home/you/SquirrelUploads` on Linux, `C:\Users\you\SquirrelUploads` on Windows, written `C:\\Users\\you\\SquirrelUploads` or `C:/Users/you/SquirrelUploads` in JSON), never the temp folder; the example above leaves it unset and points the Filesystem server at that folder. The server creates the folder (mode 0700) when it starts and again on first use if it is missing, and that is the only thing this tool ever writes. Before each upload, on macOS and Linux, it checks the folder is still private: it is refused if it is a symlink, not a folder, owned by someone else, or has any group or other permission, or if any folder above it is owned by someone other than you or root, or writable by others without the sticky bit (as `/tmp` has). A refused folder gets its own message saying what is wrong and how to fix it (for example `run chmod 700 ~/SquirrelUploads`), which names only that folder; one line on stderr says the same, never which file. At start-up the same check runs once and only reports. Access control lists are not checked (macOS and the BSDs); on Linux a POSIX ACL shows in the group bits, which are checked. The read is then held to the folder's checked real path, so swapping a folder above it for a link cannot move it. On Windows only the symlink and folder checks run: the folder gets your profile folder's permissions, unchecked beyond that, and mode 0700 has no effect there. The Windows behaviour has never been run on a real Windows host. To use other folders, set it to a comma-separated list (e.g. `"/Users/you/SquirrelUploads,/Users/you/Downloads"`). Entries are full paths (`~` is not expanded in them). **On macOS and Linux a folder you set is refused** (Gareth, 2026-10-30: "Refuse it") if group or others can write it, sticky or not (so `/tmp` is refused), or it is owned by someone other than you or root; it is judged by `stat`, so a link you set by the folder it leads to. An upload under a refused entry gets `Error: upload folder entry N in SQUIRREL_UPLOAD_ROOT can be written by other users, so it is not used. Use ~/SquirrelUploads instead: remove the setting, or set it to a folder only you can write.` (or "is owned by someone other than you or root"), naming only its position; the server also says so once on stderr at start; entries that pass are still used. A folder you set gets only these checks, not the default folder's (a group-readable folder of yours is accepted; listing the default folder's full path, `/Users/you/SquirrelUploads`, there leaves it with only these). On Windows a folder you set is not checked. So pick folders only you can write, on every platform, and never `/tmp` or another shared folder. If you set `/tmp` for an earlier version, uploads are now refused: remove it and point your Filesystem server at `~/SquirrelUploads`. The path asked for may start with `~/`, which means your home folder, as the Filesystem server reads it; `~user/` is not expanded. This is a security guardrail: without it, a prompt-injection attack could trick Claude into uploading files from anywhere on disk (e.g. `~/.ssh/id_rsa`). Empty entries are ignored, and a setting with none left (or an empty one) means the default. The check is on where the file really is: a symlink (or a symlinked folder) inside an allowed root that leads outside every root is refused, whether or not its target exists, and the file read is the one checked. A link that stays inside a root, or leads into another listed root, is read. A file with more than one hard link is refused, since its other names may be outside every root: copy it into the root instead. Only a regular file of at most 10 MB is read. On Linux the opened file is confirmed by the kernel's own name for it, so a link swapped in during the check is refused. On every other platform the confirmation is by path: in a folder another user can write, a process that swaps a folder for a link at the right moments can still win. On every platform, someone who can put a link in the folder can also learn whether a folder of yours exists, from whether that link is read. Both need a folder someone else can write: a folder you set that others can write, or a default folder whose permissions the checks above miss (on Windows, they check none) (accepted risk R-204).
424
+ > **`SQUIRREL_UPLOAD_ROOT`** restricts which directories `upload_attachment_from_path` may read from. Defaults to `os.tmpdir()` — `/tmp` on macOS/Linux, `%TEMP%` equivalent on Windows. Set to a comma-separated list for multiple allowed roots (e.g. `"/tmp,/Users/you/Downloads"`). This is a security guardrail — without it, a prompt-injection attack could trick Claude into uploading files from anywhere on disk (e.g. `~/.ssh/id_rsa`). Note: symlinks inside an allowed root that point outside it are not followed during the check — use OS-level controls if that is a concern.
432
425
 
433
426
  ### Example workflows
434
427
 
435
428
  **Attach a Claude-generated CSV report to a note:**
436
429
  > "Create a monthly expense summary as a CSV and attach it to my Finances note."
437
430
 
438
- 1. Claude generates the CSV content → `write_file("/Users/you/SquirrelUploads/expenses.csv", content)` (Filesystem MCP)
439
- 2. Claude calls `upload_attachment_from_path` with `localPath="/Users/you/SquirrelUploads/expenses.csv"` (Squirrel MCP)
431
+ 1. Claude generates the CSV content → `write_file("/tmp/expenses.csv", content)` (Filesystem MCP)
432
+ 2. Claude calls `upload_attachment_from_path` with `localPath="/tmp/expenses.csv"` (Squirrel MCP)
440
433
 
441
434
  **Attach an xlsx file generated by a script:**
442
435
  > "Write a Python script to generate an xlsx report and attach it to my Analytics note."
443
436
 
444
- 1. Claude writes the script to `/Users/you/SquirrelUploads/generate_report.py` → executes it → `report.xlsx` is written to `/Users/you/SquirrelUploads/`
445
- 2. Claude calls `upload_attachment_from_path` with `localPath="/Users/you/SquirrelUploads/report.xlsx"`
437
+ 1. Claude writes the script to `/tmp/generate_report.py` → executes it → `report.xlsx` is written to `/tmp/`
438
+ 2. Claude calls `upload_attachment_from_path` with `localPath="/tmp/report.xlsx"`
446
439
 
447
440
  **Bulk-import Markdown files from disk:**
448
- > "Import all the markdown files from ~/SquirrelUploads/obsidian-export/ as notes in my Archive collection."
441
+ > "Import all the markdown files from /tmp/obsidian-export/ as notes in my Archive collection."
449
442
 
450
- 1. Claude calls `list_directory("/Users/you/SquirrelUploads/obsidian-export/")` (Filesystem MCP) to enumerate files
443
+ 1. Claude calls `list_directory("/tmp/obsidian-export/")` (Filesystem MCP) to enumerate files
451
444
  2. For each `.md` file: `read_file(path)` → `create_note` with the content (Squirrel MCP)
452
445
 
453
446
  **Export a note to disk:**
454
- > "Export my project roadmap note as a Markdown file to ~/SquirrelUploads/roadmap.md."
447
+ > "Export my project roadmap note as a Markdown file to /tmp/roadmap.md."
455
448
 
456
449
  1. Claude calls `get_note(id)` (Squirrel MCP) to read the note
457
- 2. Claude calls `write_file("/Users/you/SquirrelUploads/roadmap.md", content)` (Filesystem MCP)
450
+ 2. Claude calls `write_file("/tmp/roadmap.md", content)` (Filesystem MCP)
458
451
 
459
452
  The server needs an API key and your passphrase, both set as env vars in your client's config (see Setup). The API key is sent to the Squirrel Notes API in the `Authorization` header; the passphrase is never sent anywhere.
460
453