Ssh MCP Server logo

Ssh MCP Server

by @uarlouski

Manage remote SSH servers from MCP clients with command execution, SFTP transfers, port forwarding, and reusable command templates.

Install Ssh MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "uarlouski-ssh-mcp-server": {
      "command": "npx",
      "args": [
        "@uarlouski/ssh-mcp-server@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx @uarlouski/ssh-mcp-server@latest

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

@uarlouski/ssh-mcp-server exposes remote infrastructure through SSH and SFTP tools for MCP-compatible AI clients. It runs configured commands, transfers and manages files, creates port-forwarding tunnels, and applies reusable command templates with variable substitution. Access controls can restrict executable base commands, while SSH keys, connection pooling, timeouts, and JSONL audit logs support controlled operations. Reach for it when an assistant needs to inspect, troubleshoot, deploy to, or transfer files across named remote servers.

Use cases

  • Inspect logs and service status on remote hosts
  • Transfer configuration files and retrieve diagnostic output
  • Forward a local port to an internal remote service
  • Run approved deployment or operations templates
  • Check Docker containers or Kubernetes resources over SSH

Key features

  • Remote SSH command execution with validation and timeouts
  • SFTP upload, download, listing, and deletion
  • SSH port-forward lifecycle management
  • Parameterized command templates
  • SSH config import and key-based authentication
  • JSONL command audit logging

Tools13

What Ssh MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~239 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · @uarlouski/ssh-mcp-server@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars38Stargazers on the source repository.
Last commit5mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed13Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Ssh MCP Server works

What @uarlouski/ssh-mcp-server does

@uarlouski/ssh-mcp-server gives MCP clients an interface to configured SSH hosts. It can execute remote shell commands, work with remote files through SFTP, and create tunnels from local ports to services reachable through an SSH connection.

The package is suited to infrastructure tasks such as checking container or Kubernetes status, reviewing logs, inspecting disk usage, updating remote scripts, and restarting services. It can also expose predefined command workflows, allowing an assistant to supply values to approved templates rather than construct every command from scratch.

How it works

The server is launched as a standard command-line MCP process. A JSON configuration file defines named servers, permitted commands, optional port-forwarding services, command templates, command timeouts, and the connection limit. Each server entry identifies a host, SSH username, private-key path, and optionally a non-default SSH port.

SSH public-key authentication is used with Ed25519 or RSA private keys. Existing entries can also be imported from an SSH configuration file, with optional host patterns for selecting which entries to use. The default import path is ~/.ssh/config.

When command restrictions are configured, validation applies to command structures that include pipes, command chains, and substitutions. This is intended to prevent an allowed command from being combined with a disallowed operation. Leaving the allowed-command list empty disables that validation, so the configuration should be reviewed accordingly.

Setup and configuration

Node.js 18 or newer and SSH access to the target machines are required. The package can run without a local install through npx:

config.json
{
  "mcpServers": {
    "ssh": {
      "command": "npx",
      "args": [
        "@uarlouski/ssh-mcp-server@latest",
        "--configPath=/path/to/ssh-mcp-config.json"
      ]
    }
  }
}

It can alternatively be installed globally with npm and started using the ssh-mcp-server command. After adding the MCP entry, restart the client so it loads the server.

A minimal configuration contains servers and can include allowedCommands:

config.json
{
  "allowedCommands": ["ls", "cat", "grep", "docker", "kubectl"],
  "servers": {
    "staging": {
      "host": "example.com",
      "username": "deploy",
      "privateKeyPath": "~/.ssh/deploy_key"
    }
  }
}

Port-forwarding services specify a source server, local port, remote host, and remote port. Templates use placeholders such as {{namespace}}; defaults can be supplied with syntax such as {{lines:100}}. commandTimeout defaults to 30,000 milliseconds and maxConnections defaults to 10.

Tools and capabilities

The MCP tool set includes:

  • Execute remote commands and list configured SSH servers.
  • Upload, download, list, and delete remote files through SFTP.
  • Open, close, restart, and list SSH port forwards.
  • Start named port-forwarding services from configuration.
  • Run parameterized command templates and list available templates with their descriptions and variables.

Connections can be pooled for multiple SSH sessions. Executed commands are recorded in JSONL audit logs, providing an activity trail for review. Port forwarding can expose internal services such as databases or dashboards through a local port.

Limitations and notes

The server operates only against hosts and credentials available through its configuration or imported SSH configuration. Remote access still depends on valid SSH connectivity and private keys. Command safety depends on configuring allowedCommands; an omitted or empty list permits unrestricted command execution. The MCP client must support the standard MCP server connection model, and the client configuration must pass the path to the JSON configuration file.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Ssh MCP Server

@uarlouski/ssh-mcp-server is an MCP server that connects AI clients to configured remote SSH servers. Its main tools execute commands, transfer and manage files through SFTP, control port forwards, list hosts, and run parameterized command templates with configurable access restrictions.

Use `npx @uarlouski/ssh-mcp-server@latest` in the MCP client configuration, or install it globally with npm. Pass `--configPath=/path/to/ssh-mcp-config.json`, then restart the MCP client. Node.js 18 or newer and SSH access with configured private keys are required.

Yes, it works with Cursor because it supports MCP. Add the server as a command-based MCP entry, provide the configuration file path, and restart Cursor so it can load the available SSH, SFTP, forwarding, and template tools.

Set `allowedCommands` to a non-empty array of permitted base command names in the JSON configuration. The server validates pipes, chains, and substitutions as well as simple commands. Omitting the option or leaving it empty disables command validation.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSsh MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/uarlouski-ssh-mcp-server?style=directory)](https://allmcps.com/mcp/uarlouski-ssh-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/uarlouski-ssh-mcp-server"><img src="https://allmcps.com/api/badge/uarlouski-ssh-mcp-server?style=directory" alt="Ssh MCP Server on AllMCPs" /></a>