Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by icdmkg2

ssh_connect

Connect to a remote SSH host using password, key, or agent authentication; returns a connection ID that other tools use for subsequent SSH operations.

Instructions

Connect to a remote SSH host. Returns a connectionId used by all other tools.

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>",
      "username": "<username>",
      "auth": "<auth>"
    },
    "name": "ssh_connect"
  }
}

Input Schema

NameRequiredDescriptionDefault
authYesAuthentication method: password, key, or agent
hostYesRemote hostname or IP address
portNoSSH port (default 22)
timeoutNoConnection timeout in ms (default 10000)
passwordNoPassword (required when auth="password")
usernameYesSSH username
passphraseNoPassphrase for the private key
profileNameNoLoad connection params from a saved profile (individual fields override profile values)
privateKeyPathNoAbsolute path to PEM private key file (required when auth="key")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the key return value and its dependency relationship, which is genuinely useful, but says nothing about connection lifecycle (does it need ssh_disconnect?), idle timeout or keepalive, behavior on repeated connects to the same host, or how authentication failures surface.

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?

Two short sentences, zero filler, with the purpose front-loaded and the return-value dependency immediately following. Nothing here could be cut without losing signal.

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 stateful, 9-parameter connection tool with no annotations and no output schema, the description covers purpose and return value but omits lifecycle and error behavior. An agent knows what it gets back but not what obligations follow.

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%, including enum values and conditional requirements like password-for-password-auth and privateKeyPath-for-key-auth, so the schema does the heavy lifting. The description adds no parameter meaning beyond that, which is acceptable at full coverage but earns only the baseline.

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?

"Connect to a remote SSH host" names a specific verb and resource, and the second sentence identifies the tool's role as the entry point that produces the connectionId consumed everywhere else. That implicitly separates it from ssh_disconnect and ssh_exec, though it never names a sibling explicitly.

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 phrase "used by all other tools" implies this must be called first, which is real ordering guidance, but there is no explicit when-to-use versus alternatives and no mention of reusing an existing connection via ssh_list_connections or loading a saved profile via profileName. Usage is inferable rather than stated.

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