Skip to content

Add ssh.download MCP tool (SFTP to phone) - #85

Merged
ehoeve786 merged 1 commit into
mainfrom
feat/mcp-sftp-download
Nov 6, 2026
Merged

ehoeve786 merged 1 commit into
mainfrom
feat/mcp-sftp-download

Conversation

@ehoeve786

Copy link
Copy Markdown
Owner

Adds ssh.download: copy a remote file or folder tree over SFTP into Download/SecureRemote/<folder> on the phone, so MCP clients can pull logs (e.g. C3X rlogs) onto the device without a temporary server.

  • Read permission only; host key must already be trusted, like the other tools
  • Folder name validated ([A-Za-z0-9._-]{1,64}); remote names with /, NUL, ./.. skipped
  • Symlinks skipped (no loops); same-size files kept so reruns resume; .part + rename
  • max_bytes (default 4 GiB) and 5000-file cap checked before transferring
  • Timeout cancels the transfer and removes the partial file
  • Media scanner indexes saved files

Tests: SFTP tree download against the in-process SSHD server, plus argument/permission checks.


Generated by Claude Code

Copies a remote file, or a folder and everything under it, into
Download/SecureRemote/<folder> on the phone. Needs only the connection's
read permission. Symlinks are skipped, files already present at the same
size are kept so a rerun resumes, and count/size limits are checked before
anything is transferred. Saved files are indexed by the media scanner so
they show up in file pickers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiTeuLynZ1g6ie1LPaMmMU
@ehoeve786
ehoeve786 merged commit e3e5806 into main Nov 6, 2026
6 checks passed
@ehoeve786
ehoeve786 deleted the feat/mcp-sftp-download branch November 6, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant