← Back to Leaderboard
Stufantunc

tufantunc/ssh-mcp

An MCP-to-SSH gateway with policy checks, approvals, and audit logs

View on GitHub ↗
Engineering Health (Methodology)
A+ · 94/100
Maintenance Activity
● Updated 2d ago
Latest Release
v2.30.0
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption19/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedMCPCLI
Total Stars
★ 923
24h Growth
+1
7d Growth
+14
Forks
146

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

tufantunc/ssh-mcp Star History (2025-05-11 - 2026-12-03) ALL-TIME STAR HISTORY (2025-05 – 2026-12) +922 in 571d · avg +2/day 975 488 0 2025-05-11: ★ 12025-06-21: ★ 162025-07-26: ★ 462025-08-30: ★ 722025-10-04: ★ 1022025-11-08: ★ 1292025-12-13: ★ 1592026-01-17: ★ 2132026-02-21: ★ 2852026-03-28: ★ 3432026-05-02: ★ 4212026-06-06: ★ 4732026-07-11: ★ 5232026-08-15: ★ 6082026-09-19: ★ 7322026-10-24: ★ 8162026-12-03: ★ 923 ★ 923 2025-05 2026-02 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

ssh-mcp is a TypeScript MCP-to-SSH gateway with a ssh-mcp CLI entry point. @modelcontextprotocol/sdk provides the MCP layer, ssh2 handles remote connections, and the manifest includes smol-toml, zod, @napi-rs/keyring, and OpenTelemetry libraries with an OTLP HTTP trace exporter.

For remote actions, the gateway classifies commands before execution, evaluates authorization using a role × host-group policy, applies the configured approval mode, and audits the decision whether or not the action runs. TOML profiles define the host, SSH identity, and policy context. Unknown keys, duplicate profile names, and unresolved role or group bindings are rejected, including on reload. That makes policy configuration part of the execution boundary rather than a convention left to the model.

Key Capabilities & Differentiators

The 16 MCP tools span allowlisted reads, general shell commands, separate sudo and destructive-action entry points, SFTP, process signaling, session management, and configuration reload. Interactive sessions preserve the working directory and environment but require POSIX shell semantics. Windows OpenSSH supports command execution, background sessions, and basic SFTP, but neither interactive sessions nor the documented streaming file tools are supported there.

Inline SFTP puts file contents in the model context and overwrites an existing destination on upload. The streaming tools move bytes directly between local disk and the remote host under an explicitly configured transferRoot; a streaming upload requires explicit opt-in to overwrite. Operators can also bound session counts, command output, daily command volume, and transfer sizes. These controls help limit operational impact; they do not make remote output trusted.

Trade-offs & Limitations

Compared with direct OpenSSH, ssh-mcp adds a model-facing interface that can authorize, approve, and audit actions before sending them to a host. The cost is another policy surface to configure and test. A fixed automation runbook is simpler when actions are known in advance and an agent does not need to choose among them. Self-hosting controls where the gateway runs, but inline file contents and command responses can still cross into the client’s model context.

Command classification and approval reduce blast radius; they do not solve prompt injection or replace remote account permissions. In particular, client-tool treats the dedicated tool call as approval, not as an independent human challenge. Check how the client mediates that call before using it. Keep production access on least-privilege accounts and validate policy and audit behavior on representative hosts before widening access.

Hardware & Deployment Guide

Install the CLI with npm install -g ssh-mcp on Node.js ^18.19.0 || >=20.6.0, then register it with a local MCP client over stdio or use the HTTP transport. The root Dockerfile uses node:22-slim; the displayed Compose SSH service is a digest-pinned integration-test fixture, not evidence of a production topology. Put config.toml in the platform-specific location. On Linux and macOS, the server enforces owner-only access to both the file and its directory. For HTTP readiness, verify configured at /health: a successful handshake alone does not mean remote tools are enabled.

Use non-root SSH accounts and do not enable auto approval on production profiles. The recent release sequence widened compatibility: v2.28.0 added client-tool approval, v2.29.0 added opt-in keyboard-interactive authentication handling and a configurable connection timeout, and v2.30.0 let profiles import host, port, user, key, connection timeout, and jump-host settings from a named SSH config alias.

Authorization: Command classification feeds a configurable role × host-group policy; strict TOML validation rejects unknown keys, duplicate profiles, and unresolved bindings.
Approvals: On client-tool profiles, the destructive tool call is itself the approval; review MCP client behavior before enabling that mode.
SSH profiles: Configure bastion routing, optional host-key pins, and agent, key, password, or keychain authentication.
Transfer boundary: Disk-to-host streaming requires defaults.transferRoot; streaming upload refuses to overwrite by default, unlike context-based upload.
Session limits: Profiles can cap session counts and idle time, impose command quotas, and select head or tail output truncation.
Readiness: MCP discovery can succeed with no config while operational tools reject calls; HTTP /health exposes configured.
Best For

Platform and operations teams that want Claude Code or another MCP client to inspect logs, run approved commands, or transfer files on managed hosts through least-privilege SSH profiles.

Skip If

Your automation is already a fixed runbook, you need stateful Windows shell sessions, or your security model requires eliminating agent-driven remote shell access rather than constraining it.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPCLI
npm install -g ssh-mcp

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
ssh-mcp ★923+14TypeScriptMITAn MCP-to-SSH gateway with policy checks, approvals, and audit logs
rea488.8k+7.6kTypeScriptMITA local CLI and MCP server for evidence-backed app and binary analysis
chrome-devtools-mcp60.4k+801TypeScriptApache-2.0Chrome DevTools via MCP and CLI for live browser debugging and performance analy
OpenSpec76.4k+495TypeScriptMITA CLI and agent-skill layer for keeping AI coding aligned with versioned specs

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/tufantunc/ssh-mcp.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

tufantunc/ssh-mcp Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about ssh-mcp

How does Claude Code connect, and when can it make SSH calls?

For a local Claude Code integration, register the ssh-mcp executable over stdio with claude mcp add --transport stdio ssh-mcp -- ssh-mcp. Put hosts, roles, and approval settings in the TOML configuration. MCP discovery works before configuration, but operational calls are refused; use reload-config or restart after creating the file.

Does it require a GPU, and what drives resource usage?

No GPU or VRAM is required for the server itself: it is a Node.js process that brokers MCP and SSH, not a model runtime. Size it around concurrent SSH connections, active sessions, buffered output, and streaming file traffic. No fixed CPU or memory requirement is established.

Can a company self-host it, and does the license address compliance?

The repository is MIT-licensed, which permits commercial use and self-hosting subject to retaining the required copyright and license notices when redistributing copies or substantial portions. That is separate from compliance: evaluate credential handling, audit retention and access, remote account privileges, and what SSH output reaches the MCP client.

When should I choose this over direct SSH or a fixed runbook?

Choose ssh-mcp when an MCP client needs to request host actions and you want profile-level authorization, approvals, and auditing at that boundary. Choose direct SSH for human-led administration, or a fixed runbook for routine automation that does not need agent-selected actions. In all cases, enforce the real privilege boundary on the remote host.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining tufantunc/ssh-mcp? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature tufantunc/ssh-mcp on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare