Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by icdmkg2

ssh_forward_remote

Open a remote port forward so an SSH server listens on a chosen remote port and forwards incoming connections to a local host and port on the MCP host.

Instructions

Open a remote port forward: the SSH server listens on remotePort and forwards connections back to localHost:localPort on the MCP host.

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": {
      "connectionId": "<connectionId>",
      "remotePort": "<remotePort>",
      "localHost": "<localHost>",
      "localPort": "<localPort>"
    },
    "name": "ssh_forward_remote"
  }
}

Input Schema

NameRequiredDescriptionDefault
localHostYesLocal host to forward traffic to
localPortYesLocal port to forward traffic to
remotePortYesPort the SSH server should listen on
connectionIdYesConnection ID from ssh_connect
remoteBindAddrNoAddress the SSH server binds (default "127.0.0.1")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses the forwarding direction and what the server does, but says nothing about tunnel lifetime (does it persist until ssh_close_tunnel?), failure modes when the remote port is already taken, or what the call returns.

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?

One front-loaded sentence that explains the mechanism with no filler. It is efficient, though it stops at explanation and leaves operational details unaddressed.

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

Completeness3/5

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

For a tunneling tool with no output schema, the description should at least hint at the returned tunnel identifier needed later by ssh_close_tunnel, and it should note that remoteBindAddr governs external exposure. Without those, the definition is adequate but leaves meaningful gaps.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description does reinforce the relationship between remotePort (server-side listener) and localHost:localPort (destination), which is the confusing part, but it omits remoteBindAddr and its security-relevant default of 127.0.0.1.

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?

States a specific verb and resource ('Open a remote port forward') and explains the direction of traffic flow, which is the essential distinction for an -R style tunnel. It does not name ssh_forward_local as its counterpart, so sibling differentiation is implicit rather than explicit.

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?

The description implies the scenario (you want the SSH server to accept connections and pass them to the local host) but gives no explicit when-to-use versus ssh_forward_local, and no statement that an active connection from ssh_connect is a prerequisite beyond what the connectionId parameter text provides.

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