Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by icdmkg2

ssh_forward_local

Opens a local port forward so connections to localhost:localPort travel through an SSH tunnel to remoteHost:remotePort, enabling access to remote services.

Instructions

Open a local port forward: connections to localhost:localPort are forwarded through the SSH tunnel to remoteHost:remotePort.

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>",
      "localPort": "<localPort>",
      "remoteHost": "<remoteHost>",
      "remotePort": "<remotePort>"
    },
    "name": "ssh_forward_local"
  }
}

Input Schema

NameRequiredDescriptionDefault
localHostNoLocal address to bind (default "127.0.0.1")
localPortYesLocal port to listen on
remoteHostYesDestination host as seen from the SSH server
remotePortYesDestination port on the remote host
connectionIdYesConnection ID from ssh_connect

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

There are no annotations, so the description carries the full behavioral burden. It clearly states that this opens a local listener and forwards connections through the SSH tunnel, which is the essential side effect, but it does not cover prerequisites such as an active connection, local port availability, persistence, cleanup, or failure behavior.

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

Conciseness5/5

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

The definition is a single front-loaded sentence with no filler, and it states the core forwarding direction immediately. Every phrase contributes to understanding the port mapping.

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 five-parameter network operation with no annotations and no output schema, the description is minimally adequate: it explains the forwarding behavior but omits lifecycle, prerequisite, and result details. The fully described schema helps, but an agent still lacks guidance on operational side effects and cleanup.

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 schema already documents all five parameters. The description reinforces the relationship between localPort, remoteHost, and remotePort, but it adds little parameter-level detail beyond what the schema already provides.

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?

The description uses a specific verb and resource, "Open a local port forward," and explains the exact connection mapping from localhost:localPort to remoteHost:remotePort. The word "local" distinguishes this from the sibling ssh_forward_remote operation without needing to open its schema.

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 when this tool applies by explaining local port forwarding, but it gives no explicit guidance about when to choose it over ssh_forward_remote or when not to use it. The use case is understandable, but the alternative-selection guidance is left implicit.

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