SSH MCP Server
Supports connecting to DigitalOcean-hosted virtual machines via SSH, with sample configuration provided in the documentation.
Enables execution of shell commands on remote Linux systems via SSH, supporting both password and key-based authentication methods.
Allows execution of shell commands on remote systems with security features like read-only mode and protection against destructive actions.
Supports connecting to and executing commands on Ubuntu servers, with example configurations provided for Ubuntu instances hosted on cloud platforms.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SSH MCP Server check disk usage on the Todo server"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SSH MCP Server
SSH MCP Server is a local Model Context Protocol (MCP) server that exposes SSH control for Linux and Windows systems, enabling LLMs and other MCP clients to execute shell commands securely via SSH.
Features
MCP-compliant server exposing SSH capabilities
Execute shell commands on remote Linux and Windows systems
Secure authentication via password or SSH key
Read-only mode with built-in security checks
Built with TypeScript and the official MCP SDK
Available Tools
Tool | Description |
| Lists machines available to connect via SSH |
| Opens a new SSH session and tracks it by |
| Lists all active SSH sessions |
| Runs a shell command (unrestricted) |
| Safer command execution; blocks destructive actions |
| Closes an active SSH session |
Related MCP server: SSH MCP Server
Quick Start
1. Clone the repository
$ git clone https://github.com/vilasone455/ssh-mcp-server.git2. Create machine config
Create a machines.json file with the following structure:
[
{
"machine_id": "todo-server-01",
"label": "Todo server",
"os": "ubuntu",
"source": "digitalocean",
"ssh": {
"host": "192.168.1.11",
"port": 22,
"username": "user",
"password": "your_password_here"
}
},
{
"machine_id": "build-agent-01",
"label": "CI Build Agent (Key Auth)",
"os": "ubuntu",
"source": "aws",
"ssh": {
"host": "192.168.1.12",
"port": 22,
"username": "ubuntu",
"keyPath": "/home/ubuntu/.ssh/id_rsa"
}
}
]Client Setup (Claude Desktop Example)
To integrate this MCP server into Claude Desktop, add both the server command and the required environment variable:
{
"mcpServers": {
"ssh-mcp": {
"command": "node",
"args": [
"/path/to/ssh-mcp-server/dist/index.js"
],
"env": {
"MACHINES_PATH": "/path/to/your/machines.json"
}
}
}
}Now you can interact with your server using natural language, e.g., "Run uptime on Todo VM."
Disclaimer
Use at your own risk. This server grants shell-level access via MCP. Review commands carefully and run in a secure environment.
Contributing
Star the repo, open issues, and submit pull requests! Feedback is welcome.
Available Tools
6 toolsclose_connectionA
Terminate an SSH session and remove it from global state.
Inputs: connection_id (required).
create_connectionA
Open an SSH session to the given machine and track it in global state so subsequent tool calls can reuse it.
Inputs: machine_id (required), title (required).
execute_commandA
Run a shell command in an existing SSH session and return stdout/stderr/exitCode.
Inputs: connection_id (required), command (required).
get_available_connectionsA
List every SSH-capable machine this server knows about (but is NOT yet connected).
Inputs: no named parameters.
get_connectionsA
Return every STILL-OPEN SSH session in global state.
Inputs: no named parameters.
secure_execute_commandA
Run a read‑only shell command (i.e., one that does not mutate state) in an existing SSH session and return stdout/stderr/exitCode.
Inputs: connection_id (required), command (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have distinct purposes, but 'execute_command' and 'secure_execute_command' could cause confusion as they differ only by a safety constraint, not by target resource or action. The other tools (connection management and listing) are clearly separated.
All tool names follow a consistent verb_noun pattern with snake_case, such as 'create_connection', 'execute_command', and 'get_connections'. This predictability makes the set easy to navigate and understand.
With 6 tools, the server is well-scoped for SSH operations, covering connection lifecycle (create, close, list), command execution (with safety variants), and machine discovery. Each tool earns its place without bloat or thinness.
The toolset covers core SSH workflows: establishing and managing connections, executing commands (with a read-only safety option), and discovering available machines. A minor gap is the lack of file transfer tools (e.g., upload/download), but agents can work around this using command execution.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.7MIT
- AlicenseAqualityAmaintenanceA Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH. It supports password and key-based authentication, command timeouts, and sudo elevation for administrative tasks.1517,673 npm874MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server for secure local system operations, enabling shell command execution and file management via a standardized interface.141Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA local MCP server that enables LLMs to execute shell commands on remote hosts over SSH with multiple authentication methods.35 npm3MIT