Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by YawLabs

ssh_upload

Uploads a local file to a remote host over SFTP, letting an agent transfer specified files to an absolute remote path for deployment, sharing, or processing.

Instructions

Upload a local file to a remote host via SFTP. Reads an arbitrary local file at an agent-chosen localPath -- any file readable by this process leaves the machine toward the remote host (the mirror direction of ssh_download's local write). If the connection pool is full (SSH_MCP_MAX_POOL_SIZE, default 100), waits up to 30s for a free slot before starting. NOT gated by SSH_MCP_COMMAND_WHITELIST / SSH_MCP_COMMAND_BLACKLIST: command policy applies only to ssh_exec and ssh_multi_exec, so a blacklist such as ^rm does NOT block this tool.

Input Schema

NameRequiredDescriptionDefault
hostYesSSH hostname or IP address
portNoSSH port (default: 22)
passwordNoSSH password. STRONGLY prefer key-based auth (privateKeyPath or ssh-agent). Passwords pass through MCP protocol frames as plaintext and may be logged by the transport or host process.
usernameNoSSH username (default: current user)
localPathYesPath to the local file to upload
remotePathYesAbsolute path on the remote host. Must start with /.
privateKeyPathNoPath to SSH private key

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.17.0
    • changedInput schema / properties / remotePath / description
      Previous value: -"Absolute path on the remote host"New value: +"Absolute path on the remote host. Must start with /."
  2. Changed5 schema fields changedv0.9.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / password / description
      Previous value: -"SSH password (prefer keys)"New value: +"SSH password. STRONGLY prefer key-based auth (privateKeyPath or ssh-agent). Passwords pass through MCP protocol frames as plaintext and may be logged by the transport or host process."
    • addedInput schema / properties / port / maximum
      Added value: +65535
    • addedInput schema / properties / port / minimum
      Added value: +1
    • changedInput schema / properties / port / type
      Previous value: -"number"New value: +"integer"
  3. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does substantial work: it discloses that any process-readable file leaves the machine, the 30s pool-wait behavior under SSH_MCP_MAX_POOL_SIZE, and the important exemption from SSH_MCP_COMMAND_WHITELIST/BLACKLIST with a concrete `^rm` example. It does not say whether an existing remote file is overwritten or the call fails, nor what the tool returns, which is a meaningful gap for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action, then the security and concurrency constraints in descending priority, with no filler. The final policy-exemption sentence is long but earns its length by preventing a real mistaken assumption about blacklists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter mutation tool with no annotations and no output schema, the description covers the safety surface, concurrency behavior, and policy scope well. The remaining gap is overwrite/failure semantics and what a successful call reports, which an agent would want before re-uploading to an existing path.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description rises above it by scoping `localPath` as "agent-chosen" and emphasizing that any readable file is exfiltrated, which is security-relevant meaning the schema's neutral one-liner does not convey. It adds no new detail on `remotePath`, `port`, or auth parameters, but those are already fully documented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource ("Upload a local file to a remote host via SFTP") and explicitly positions it as the mirror direction of ssh_download. However, it never distinguishes itself from ssh_write_file, the closest sibling, so an agent must infer the boundary between uploading a local file and writing remote content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied through the ssh_download comparison and by naming ssh_exec/ssh_multi_exec as the tools governed by command policy. There is no explicit "use ssh_upload when X, use ssh_write_file when Y" guidance, leaving the most ambiguous sibling relationship unresolved.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.