
atengk/mcp-server-ssh
Developer toolsThis page was translated automatically. Technical details may differ from the original. View the original
Production-grade Model Context Protocol (MCP) service based on native OpenSSH. Supports dual-mode execution, persistent PTY terminals, POSIX SFTP suite, and security guard.
Overview
Standards for deep connection and control of Linux/Unix system services. Provides secure, controllable, and zero-intrusive remote terminal execution and POSIX file system management infrastructure for large language models (LLMs) and AI agents (such as Claude Desktop, Cursor, Antigravity, Cline, etc.). 💡 : Detailed changes in each official version, fix records, and contributor acknowledgments are automatically maintained by the system. You can directly check the latest records on GitHub Releases. - :The target Linux host only requires native OpenSSH services and never installs any proprietary agents or HTTP daemon (ADR-0001). - (ADR-0002): - :Single-command independent channel, default wrapped as login shell (bash -l -c) to fully inherit user environment variables and PATH, accurately capturing exit codes, duration, and standard output/errors; Supports implicit pipe injection credentials (ADR-0011). - :Maintains resident session flow based on PTY pseudo-terminals, supports stream incremental echoing, regular prompt listening (expectPattern), and \x03 (Ctrl+C) interrupt control signals. - : Remotely hosts time-consuming scripts, large file pulls, or build tasks remotely using system decoupling technology, supports precise exit code determination and incremental log stream tracing, and does not terminate tasks when connected or disconnected (ADR-0010). - : - : Local precise replacement based on target anchor block validation to avoid full overwriting of large files (ADR-0009); - : Supports exclusion filtering and automatic inheritance .gitignore, zero native C++ compilation dependencies (ADR-0008); - : Secure single file read/write (built-in burst prevention threshold), metadata retrieval, directory recursion build/delete, and soft link anti-loop protection. - : Unified control of local forwarding, remote exposure, and , built-in idle timeout automatic circuit breaker and physical disconnection cascade recovery (ADR-0011). - (ADR-0017): - : Supports header bearer and query token, dual SHA-256 constant time comparison to prevent timing attacks; - : Default convergence binding 127.0.0.1, immediately terminates startup if externally exposed without a token configured; - : Supports IP, CIDR subnet, wildcard domain name and port constraints, blocking internal network lateral hopping penetration; - : Completely abolished wildcard *, precisely matching request sources to defend against cross-site attacks. - : Protocol-level first-class citizen issuance, accurately conveys system role positioning to large models when multiple services coexist, tool descriptions automatically modify compact prefixes (ADR-0015).
Overview (machine translated)
A Model Context Protocol (MCP) service based on the standard OpenSSH protocol for deep connection and control of Linux/Unix systems. Provides secure, controllable, and zero-intrusive remote terminal execution and POSIX file system management infrastructure for large language models (LLMs) and AI agents (such as Claude Desktop, Cursor, Antigravity, Cline, etc.).
💡 > Release Notes: Detailed changes for each official version, fix records, and contributor acknowledgements are automatically maintained by the system. You can directly check the latest records on GitHub Releases.
🌟 Core Features
- 🌐 Zero-intrusion standard protocol direct connection: The target Linux host only needs native OpenSSH services and never installs any proprietary agents or HTTP daemon (ADR-0001).
- ⚡ Dual-mode command execution engine (ADR-0002):
- Stateless execution (
ssh_exec): Single-command independent channel, default wrapped as login shell (bash -l -c) fully inherits user environment variables andPATH, accurately capturing exit codes, time, and standard output/errors; Supports pipeline implicit injection credentials with zero command line leak security Sudo privilege escalation (ADR-0011). - Interactive Session (
ssh_session_*): Maintains resident session flow based on PTY pseudo-terminals, supports stream incremental echo, regular prompt listening (expectPattern), and\x03(Ctrl+C) interrupt control signals. - ** ⏱️ User-mode offline decoupling backend operations (
ssh_job_*)**: Remotely manages time-consuming script and large file pull or build tasks remotely via system decoupling technology, supports precise exit code determination and incremental log stream tracking, and does not terminate tasks when disconnected (ADR-0010). - ** 📁 Advanced POSIX SFTP Management and Streaming Archiving**:
- Precise Text Difference Patch (
sftp_patch_file): Local precise replacement based on target anchor block validation, avoiding full overwriting of large files (ADR-0009); - Pure JS streaming Tar directory bidirectional synchronization (
sftp_*_dir): supports exclusion filtering and auto-inheritance.gitignore, zero C++ native compilation dependencies (ADR-0008); - Basic File Management: Secure single file read/write (built-in anti-burst threshold), metadata retrieval, directory recursion and deletion, and protection for soft links and rings.
- 🔌 Trinity Network Tunnel Management (
ssh_forward_port): Unified control of local forwarding, remote exposure, and pure JS RFC 1928 dynamic SOCKS5 proxy, built-in idle timeout automatic circuit breaker and physical disconnection cascade recovery (ADR-0011). - ** 🛡️ Network Security and Network Exposure Convergence** (ADR-0017):
This page was translated automatically. Technical details may differ from the original.
Install
npx -y @atengk/mcp-server-sshConfiguration
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": ["-y", "@atengk/mcp-server-ssh"],
"env": {
"MCP_SSH_HOST": "192.168.1.100",
"MCP_SSH_PORT": "22",
"MCP_SSH_USER": "root",
"MCP_SSH_PRIVATE_KEY_PATH": "/Users/yourname/.ssh/id_ed25519"
}
}
}
}