Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by YawLabs

ssh_upload

Destructive

Uploads a local file to a remote host over SFTP, specifying host, local path, and absolute remote path. Use it to transfer files to SSH-accessible servers.

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 a download, which writes an arbitrary local file). 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 the remote command-execution tools (single-host and multi-host), so a blacklist such as ^rm does NOT block this tool.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "host": "<host>",
      "localPath": "<localPath>",
      "remotePath": "<remotePath>"
    },
    "name": "ssh_upload"
  }
}

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

A4.5/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it discloses that an arbitrary agent-chosen local file will leave the machine, that a full connection pool causes up to a 30s wait (with the env var and default named), and that the command whitelist/blacklist does not gate this tool. Those are exactly the behavioral facts the destructiveHint and openWorldHint annotations cannot convey.

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 core action and the mirror-direction framing first, followed by pool and policy notes. Slightly dense with parentheticals and em-dash asides, but each sentence carries distinct information.

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?

Covers the safety profile, exfiltration semantics, pooling behavior, and policy gating well for a destructive operation. It omits whether an existing remote file is overwritten and what the tool returns, which matter for a destructiveHint=true tool with no output schema, but the core behavior is clear.

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, but the description adds real meaning for localPath by noting it is agent-chosen and that any file readable by the process is eligible. Other parameters (remotePath overwrite behavior, port, auth) are left to the schema.

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

Purpose5/5

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

States a specific verb and resource (upload a local file to a remote host via SFTP) and explicitly frames itself as the mirror direction of ssh_download, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines4/5

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

Gives clear context for when this applies (moving a local file outward) and explicitly contrasts it with the download direction, plus a notable when-not caveat about command policy not applying. It does not address the closest sibling, ssh_write_file, leaving the choice between file-upload and remote-content-write to inference.

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