Skip to main content
Glama

ezssh-mcp

npm version License: MIT

Easy SSH MCP Server - Execute commands and transfer files via SSH with AI assistance.

Features

  • 🖥️ Cross-platform: Linux, macOS, Windows

  • 🔑 SSH Agent support: System SSH Agent, 1Password, Windows OpenSSH

  • 📋 Auto-discovery: Reads hosts from ~/.ssh/config

  • Concurrent execution: Run commands on multiple hosts simultaneously

  • 📁 File transfer: Upload/download via SFTP

  • 🔗 MCP Resources: SSH hosts exposed as resources for AI access

  • 🤖 Multi-AI compatible: Works with Claude, ChatGPT, Gemini and other MCP-compatible clients

Related MCP server: SSH MCP Server

Installation

npm install -g ezssh-mcp

From Source

git clone https://github.com/laomeifun/ezssh-mcp.git
cd ezssh-mcp
npm install
npm run build

Quick Start

1. Run as MCP Server

ezssh-mcp
# or
npx ezssh-mcp

2. Configure with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "ssh": {
      "command": "npx",
      "args": ["-y", "ezssh-mcp"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "ssh": {
      "command": "ezssh-mcp"
    }
  }
}

Tools

Tool

Description

ssh_list_hosts

List available SSH hosts from config

ssh_execute

Execute commands on one or more hosts

ssh_transfer

Upload/download files via SFTP

ssh_execute

Execute commands on multiple hosts concurrently:

{
  "hosts": ["web1", "web2", "web3"],
  "command": "uptime"
}

Direct connection (without SSH config):

{
  "hosts": ["192.168.1.100"],
  "command": "uptime",
  "username": "root",
  "password": "your-password",
  "port": 22
}

ssh_transfer

Upload files:

{
  "direction": "upload",
  "hosts": ["web1", "web2"],
  "localPath": "./dist/app.zip",
  "remotePath": "/opt/app/app.zip"
}

Download files (with {host} placeholder for multiple hosts):

{
  "direction": "download",
  "hosts": ["web1", "web2"],
  "localPath": "./logs/{host}.log",
  "remotePath": "/var/log/app.log"
}

Resources

SSH hosts are exposed as MCP resources with URI format ssh://<host-name>.

Environment Variables

Variable

Description

Default

SSH_CONFIG_PATH

SSH config file path

~/.ssh/config

SSH_KNOWN_HOSTS_PATH

known_hosts file path

~/.ssh/known_hosts

SSH_AUTH_SOCK

SSH Agent socket path

System default

SSH_TIMEOUT

Connection timeout (ms)

30000

SSH_STRICT_HOST_KEY

Strict host key checking

false

SSH_MAX_CONCURRENCY

Max concurrent connections

10

Development

# Install dependencies
npm install

# Development mode (watch)
npm run dev

# Build
npm run build

# Type check
npm run typecheck

# Run tests
npm test

License

MIT

Available Tools

3 tools
ssh_executeA

Execute a command on one or more SSH hosts. Runs concurrently on multiple hosts and returns results from each.

ParametersJSON Schema
NameRequiredDescriptionDefault
portNoSSH port for direct connection (default: 22)
hostsYesList of host names (from ssh_list_hosts) or IP addresses/hostnames to execute on
commandYesThe shell command to execute
timeoutNoConnection timeout in milliseconds (default: 30000)
passwordNoSSH password for direct connection (use with caution)
usernameNoSSH username for direct connection (overrides config)
privateKeyPathNoPath to SSH private key file for direct connection

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of disclosing behavior. It mentions concurrency and that results are returned, but fails to warn that arbitrary commands may be destructive, lacks details on error handling, and does not describe the response structure. This is a significant gap for a command-execution tool.

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 description is two short sentences that immediately state the action and key behavioral trait (concurrency). Every word earns its place with no redundancy or fluff.

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

Completeness2/5

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

There is no output schema, and the description does not explain the result format, error behavior, or authentication prerequisites. For a tool that executes arbitrary commands across multiple hosts, this is under-specified and leaves an agent uncertain about what to expect.

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 parameters adequately. The description itself adds no additional parameter semantics, but it does not need to since the schema covers everything. Baseline 3 is appropriate.

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 ('Execute') and resource ('SSH hosts'), and further clarifies scope by mentioning concurrent execution and per-host results. This clearly distinguishes it from siblings (ssh_list_hosts for listing, ssh_transfer for transferring files).

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?

The description clearly implies the tool is for running shell commands on hosts, which is distinct from listing hosts or transferring files. However, it does not explicitly state when not to use it or name alternative tools, so it stops short of full guidance.

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

ssh_list_hostsA

List all available SSH hosts from ~/.ssh/config. Returns host names, addresses, users, and connection details.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses that the tool reads a local config file and returns host details, making its behavior clear. It does not mention edge cases like missing config, but for a simple listing tool this is adequate.

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 description is two sentences with no wasted words. It front-loads the primary action and then details the return value, achieving high conciseness.

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

Completeness5/5

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

For a simple, no-parameter listing tool with no output schema, the description adequately explains the return value (host names, addresses, users, connection details). It provides enough context for an agent to invoke the tool and interpret the result.

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?

The tool has zero parameters, so the input schema fully covers parameter semantics. The description adds no parameter-specific details, which is appropriate given the baseline of 4 for zero-parameter tools.

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 clearly states it lists all available SSH hosts from ~/.ssh/config, with a specific verb and resource. It naturally distinguishes itself from sibling tools like ssh_execute and ssh_transfer by focusing on read-only host discovery.

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?

The description provides clear context on what the tool does and what it returns, implying it is for discovering hosts before executing commands or transferring files. It lacks explicit when-not-to-use guidance, but the purpose is unambiguous.

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

ssh_transferB

Transfer files between local machine and remote SSH hosts. Supports upload to multiple hosts or download from multiple hosts.

ParametersJSON Schema
NameRequiredDescriptionDefault
portNoSSH port for direct connection (default: 22)
hostsYesList of host names or IP addresses to transfer files to/from
passwordNoSSH password for direct connection (use with caution)
usernameNoSSH username for direct connection (overrides config)
directionYesTransfer direction: upload or download
localPathYesLocal file path. For multi-host downloads, use {host} placeholder (e.g., ./logs/{host}.log) or files will be auto-suffixed with hostname
remotePathYesRemote file path on the SSH host
privateKeyPathNoPath to SSH private key file for direct connection

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It only mentions multi-host support and does not disclose file overwrite behavior, authentication requirements, error handling for unreachable hosts, or result format. This is insufficient for a mutation-heavy operation.

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 description is two sentences, front-loaded with the primary action, and contains no filler. Every word earns its place.

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

Completeness2/5

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

For a multi-host file transfer tool with no output schema and no annotations, the description should clarify success/failure return behavior, per-host handling, and side effects. It only states basic functionality, leaving significant gaps for an agent.

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 all 8 parameters are already documented. The description adds no meaningful parameter detail beyond restating upload/download capability, leaving the baseline of 3 appropriate.

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 clearly states the tool's function: 'Transfer files between local machine and remote SSH hosts.' This uses a specific verb and resource, and the mention of multi-host upload/download distinguishes it from sibling tools like ssh_list_hosts and ssh_execute.

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 usage for file transfers but does not explicitly provide when-to-use guidance or exclusions relative to ssh_list_hosts and ssh_execute. The multi-host support hints at use cases but does not say 'use this instead of X.'

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.1.1
    • First observedssh_execute
    • First observedssh_list_hosts
    • First observedssh_transfer

TDQS

A3.8/5.0
Disambiguation5/5

Each tool targets a distinct SSH operation: listing hosts, executing commands, and transferring files. There is no overlap in their purposes, making selection unambiguous.

Naming Consistency4/5

All tools share the 'ssh_' prefix, but while 'ssh_list_hosts' and 'ssh_transfer' follow a verb_noun pattern, 'ssh_execute' lacks an explicit object. Still, the names are predictable and readable.

Tool Count4/5

Three tools is on the lean side, but they cover the most common SSH operations well. The count is reasonable for a focused SSH toolkit.

Completeness4/5

The set covers listing, executing, and transferring, which form a solid core. Missing host management is a minor gap since hosts are typically configured in files.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables remote file operations and command execution across multiple machines via SSH. Supports reading files, listing directories, and running commands on any host configured in your SSH config.
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables secure SSH connections to multiple remote servers with support for command execution, file transfers (SFTP), directory listing, and both password and key-based authentication.
    7
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables executing commands on remote SSH hosts, with full support for bastion/jump hosts and ~/.ssh/config, plus Slurm job management and rsync.
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables SSH command execution, file uploads/downloads, and multi-server management with zero-config inline credentials, supporting async jobs and AI-readable output.
    20
    2
    AGPL 3.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/laomeifun/ezssh-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server