New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

ssh-mcp-pro

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssh-mcp-pro

Model Context Protocol (MCP) SSH client server for remote automation

Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

npm version license CI API Docs OpenSSF Scorecard

ssh-mcp-pro

ssh-mcp-pro is a secure Model Context Protocol (MCP) server for SSH automation. It lets MCP-capable clients open SSH sessions, inspect hosts, run guarded commands, manage files, transfer artifacts, create tunnels, and perform idempotent package or service work through policy-controlled tools.

Prerequisites

  • Node.js >=22.22.2 or >=24.15.0
  • pnpm >=11.0.9
  • SSH access to the target hosts
  • Docker, only for local integration tests and container image builds

Installation

Install globally with pnpm:

pnpm add --global ssh-mcp-pro
ssh-mcp-pro --version

Run without a global install:

npx ssh-mcp-pro

For pnpm-only environments, use:

pnpm dlx ssh-mcp-pro

Container images are published to GitHub Container Registry for release tags:

docker run --rm ghcr.io/oaslananka/ssh-mcp-pro:1.0.0 --version

Images are published for linux/amd64 and linux/arm64 with exact semver and Git tag aliases. Production deployments should prefer the digest-pinned reference recorded by the release workflow. See Docker Usage for the tag policy, digest-pinned examples, and registry verification steps.

Quickstart

Generic stdio MCP config:

{
  "name": "ssh-mcp-pro",
  "command": "ssh-mcp-pro",
  "type": "stdio"
}

VS Code settings style:

{
  "mcp.servers": {
    "ssh-mcp-pro": {
      "type": "stdio",
      "command": "ssh-mcp-pro",
      "args": []
    }
  }
}

Claude Desktop style:

{
  "mcpServers": {
    "ssh-mcp-pro": {
      "command": "ssh-mcp-pro",
      "args": []
    }
  }
}

After registration, start with discovery and a strict host-key policy:

List configured SSH hosts, open a session to bastion.example.com as deploy with hostKeyPolicy=strict, then run os_detect.

Configuration

All SSH_MCP_* environment variables parsed by src/config.ts are listed below. Comma-separated settings also accept newline-separated values.

VariableDefaultPurpose
SSH_MCP_MAX_SESSIONS20Maximum concurrent SSH sessions.
SSH_MCP_SESSION_TTL900000Session time-to-live in milliseconds.
SSH_MCP_COMMAND_TIMEOUT30000Default remote command timeout in milliseconds.
SSH_MCP_MAX_COMMAND_OUTPUT_BYTES1048576Maximum buffered stdout/stderr bytes per command result.
SSH_MCP_MAX_STREAM_CHUNKS4096Maximum retained streaming chunks.
SSH_MCP_MAX_FILE_SIZE10485760Maximum bytes returned by text-focused file reads.
SSH_MCP_MAX_FILE_WRITE_BYTES10485760Maximum accepted write payload before buffering.
SSH_MCP_MAX_TRANSFER_BYTES52428800Maximum upload or download transfer size.
SSH_MCP_DEBUGfalseEnables debug-oriented configuration behavior.
SSH_MCP_RATE_LIMITtrueEnables the global MCP request rate limiter.
SSH_MCP_RATE_LIMIT_MAX100Maximum requests per rate-limit window.
SSH_MCP_RATE_LIMIT_PER_SESSIONtrueEnables per-session MCP request rate limiting when tool arguments include sessionId.
SSH_MCP_RATE_LIMIT_PER_SESSION_MAX50Maximum requests per SSH session per rate-limit window.
SSH_MCP_RATE_LIMIT_PER_SESSION_WINDOW_MS60000Per-session rate-limit window in milliseconds.
SSH_MCP_RATE_LIMIT_WINDOW_MS60000Rate-limit window in milliseconds.
SSH_MCP_STRICT_HOST_KEYunsetLegacy boolean alias for strict vs insecure host-key checking.
SSH_MCP_HOST_KEY_POLICYstrictHost-key mode: strict, accept-new, or insecure.
SSH_MCP_KNOWN_HOSTS_PATH~/.ssh/known_hostsKnown hosts file used for strict host-key verification.
SSH_MCP_ALLOW_ROOT_LOGINfalseAllows SSH login as root and mirrors into policy.
SSH_MCP_ALLOWED_CIPHERSemptyOptional SSH cipher allowlist.
SSH_MCP_POLICY_FILEunsetJSON file containing partial policy overrides.
SSH_MCP_POLICY_MODEenforcePolicy decision mode: enforce or explain.
SSH_MCP_ALLOW_RAW_SUDOfalseAllows raw proc_sudo; prefer ensure_* tools.
SSH_MCP_ALLOW_DESTRUCTIVE_COMMANDSfalseAllows commands matching destructive command policy.
SSH_MCP_ALLOW_DESTRUCTIVE_FSfalseAllows destructive filesystem operations such as fs_rmrf.
SSH_MCP_ALLOWED_HOSTSemptyHost allowlist for policy and remote connector safety checks.
SSH_MCP_COMMAND_ALLOWemptyCommand allow patterns.
SSH_MCP_COMMAND_DENYemptyCommand deny patterns.
SSH_MCP_PATH_ALLOW_PREFIXES/tmp,/var/tmp,/home,/UsersRemote path prefixes allowed by filesystem policy.
SSH_MCP_PATH_DENY_PREFIXES/etc/sudoers,/etc/shadow,/etc/passwd,/boot,/dev,/procRemote path prefixes denied by filesystem policy.
SSH_MCP_LOCAL_PATH_ALLOW_PREFIXESOS temp directoryLocal paths allowed for transfer operations.
SSH_MCP_LOCAL_PATH_DENY_PREFIXESemptyLocal paths denied for transfer operations.
SSH_MCP_TUNNEL_ALLOW_BIND_HOSTS127.0.0.1,localhost,::1Local bind hosts allowed for tunnels.
SSH_MCP_TUNNEL_DENY_BIND_HOSTS0.0.0.0,::Local bind hosts denied for tunnels.
SSH_MCP_TUNNEL_ALLOW_REMOTE_HOSTSemptyOptional remote tunnel target host allowlist.
SSH_MCP_TUNNEL_DENY_REMOTE_HOSTSemptyOptional remote tunnel target host denylist.
SSH_MCP_TUNNEL_ALLOW_PORTSemptyOptional tunnel port allowlist.
SSH_MCP_TUNNEL_DENY_PORTSemptyOptional tunnel port denylist.
SSH_MCP_HTTP_HOST127.0.0.1Streamable HTTP bind host.
SSH_MCP_HTTP_PORT3000Streamable HTTP bind port.
SSH_MCP_HTTP_ALLOWED_ORIGINShttp://127.0.0.1,http://localhostBrowser origins allowed for HTTP clients.
SSH_MCP_HTTP_BEARER_TOKEN_FILEunsetBearer token file for HTTP transport. Required for non-loopback bearer deployments.
SSH_MCP_ENABLE_LEGACY_SSEfalseEnables legacy SSE compatibility.
SSH_MCP_HTTP_MAX_REQUEST_BODY_BYTES1048576Maximum HTTP request body size.
SSH_MCP_HTTP_MAX_SESSIONS20Maximum HTTP MCP sessions.
SSH_MCP_HTTP_SESSION_IDLE_TTL_MS900000HTTP MCP session idle timeout in milliseconds.
SSH_MCP_HTTP_PUBLIC_URLunsetStable public HTTPS MCP URL for protected resource metadata.
SSH_MCP_HTTP_TRUST_PROXYfalseTrust reverse proxy forwarded headers.
SSH_MCP_TOOL_PROFILEfullActive tool exposure profile.
SSH_MCP_CONNECTOR_PROFILEfullAlias for SSH_MCP_TOOL_PROFILE.
SSH_MCP_CONNECTOR_CREDENTIAL_PROVIDERnoneCredential provider: none, agent, or command.
SSH_MCP_CONNECTOR_CREDENTIAL_COMMANDunsetExternal credential command when provider is command.
SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND_ARGSemptyArguments passed to the external credential command.
SSH_MCP_CONNECTOR_CREDENTIAL_COMMAND_TIMEOUT_MS5000Credential command timeout in milliseconds.
SSH_MCP_CONNECTOR_DEFAULT_USERNAMEunsetDefault username for connector broker flows.
SSH_MCP_HTTP_AUTH_MODEbearerHTTP auth mode: bearer or oauth.
SSH_MCP_OAUTH_ISSUERunsetExpected OAuth issuer.
SSH_MCP_OAUTH_AUDIENCEunsetExpected OAuth audience.
SSH_MCP_OAUTH_JWKS_URLunsetOAuth JWKS URL.
SSH_MCP_OAUTH_RESOURCEunsetOAuth protected resource identifier.
SSH_MCP_OAUTH_REQUIRED_SCOPESssh-mcp-pro.readRequired OAuth scopes.

The parser also accepts non-SSH_MCP_* compatibility aliases PORT, KNOWN_HOSTS_PATH, and STRICT_HOST_KEY_CHECKING.

Tool Profiles

full exposes every registered tool, resource, and prompt. Every other profile uses an explicit per-profile allowset. chatgpt and claude currently expose the same baseline connector tools as remote-safe, with empty client-specific extension sets reserved for future additions.

ProfileExposed toolsExposed resourcesExposed prompts
fullAll SSH, process, filesystem, transfer, ensure, tunnel, connector, and system tools.All runtime resources.All prompts.
remote-safeconnector_status, ssh_hosts_list, ssh_policy_explain, ssh_host_inspect, ssh_mutation_plan.ssh-mcp-pro://capabilities/support-matrix.inspect-host-capabilities, plan-mutation.
chatgptBaseline remote connector tools plus an empty ChatGPT extension set.Same remote connector subset as remote-safe.Same remote connector subset as remote-safe.
claudeBaseline remote connector tools plus an empty Claude extension set.Same remote connector subset as remote-safe.Same remote connector subset as remote-safe.
remote-readonlySame remote connector subset as remote-safe.Same remote connector subset as remote-safe.Same remote connector subset as remote-safe.
remote-brokerSame remote connector subset as remote-safe.Same remote connector subset as remote-safe.Same remote connector subset as remote-safe.

Security Defaults

ssh-mcp-pro starts with strict SSH host-key verification, denies root login, denies raw sudo, blocks destructive commands and filesystem operations unless policy allows them, and refuses non-loopback HTTP startup unless authentication, origins, public HTTPS URL, strict host-key verification, a remote-safe tool profile, and host allowlists are configured. See SECURITY.md for vulnerability reporting and SECURITY_DECISIONS.md for the design rationale behind these defaults.

More Documentation

Keywords

mcp

FAQs

Package last updated on 05 Jun 2026

Related posts