@squirrelnotes.app/mcp 2.5.0 → 2.6.0-test.370

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 +20 -13
  2. package/dist/stdio-handler.js +19355 -3453
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -397,7 +397,15 @@ Claude generates content
397
397
 
398
398
  ### Claude Desktop configuration
399
399
 
400
- Add both servers to `claude_desktop_config.json`:
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`:
401
409
 
402
410
  ```json
403
411
  {
@@ -408,46 +416,45 @@ Add both servers to `claude_desktop_config.json`:
408
416
  "env": {
409
417
  "SQUIRREL_API_BASE_URL": "https://api.squirrelnotes.app",
410
418
  "SQUIRREL_API_KEY": "sqn_your_api_key",
411
- "SQUIRREL_PASSPHRASE": "your-passphrase",
412
- "SQUIRREL_UPLOAD_ROOT": "/tmp"
419
+ "SQUIRREL_PASSPHRASE": "your-passphrase"
413
420
  }
414
421
  },
415
422
  "filesystem": {
416
423
  "command": "npx",
417
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
424
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/SquirrelUploads"],
418
425
  "env": {}
419
426
  }
420
427
  }
421
428
  }
422
429
  ```
423
430
 
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.
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).
425
432
 
426
433
  ### Example workflows
427
434
 
428
435
  **Attach a Claude-generated CSV report to a note:**
429
436
  > "Create a monthly expense summary as a CSV and attach it to my Finances note."
430
437
 
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)
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)
433
440
 
434
441
  **Attach an xlsx file generated by a script:**
435
442
  > "Write a Python script to generate an xlsx report and attach it to my Analytics note."
436
443
 
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"`
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"`
439
446
 
440
447
  **Bulk-import Markdown files from disk:**
441
- > "Import all the markdown files from /tmp/obsidian-export/ as notes in my Archive collection."
448
+ > "Import all the markdown files from ~/SquirrelUploads/obsidian-export/ as notes in my Archive collection."
442
449
 
443
- 1. Claude calls `list_directory("/tmp/obsidian-export/")` (Filesystem MCP) to enumerate files
450
+ 1. Claude calls `list_directory("/Users/you/SquirrelUploads/obsidian-export/")` (Filesystem MCP) to enumerate files
444
451
  2. For each `.md` file: `read_file(path)` → `create_note` with the content (Squirrel MCP)
445
452
 
446
453
  **Export a note to disk:**
447
- > "Export my project roadmap note as a Markdown file to /tmp/roadmap.md."
454
+ > "Export my project roadmap note as a Markdown file to ~/SquirrelUploads/roadmap.md."
448
455
 
449
456
  1. Claude calls `get_note(id)` (Squirrel MCP) to read the note
450
- 2. Claude calls `write_file("/tmp/roadmap.md", content)` (Filesystem MCP)
457
+ 2. Claude calls `write_file("/Users/you/SquirrelUploads/roadmap.md", content)` (Filesystem MCP)
451
458
 
452
459
  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.
453
460