MCP server exposing SSH control for Linux and Windows servers via Model Context Protocol. Securely execute remote shell commands with password or SSH key authentication.
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.
exec
: Execute a shell command on the remote server
command
(required): Shell command to execute on the remote SSH server--timeout
(in milliseconds)git clone https://github.com/tufantunc/ssh-mcp.git
cd ssh-mcp
npm install
You can configure Claude Desktop to use this MCP Server.
Required Parameters:
host
: Hostname or IP of the Linux or Windows serveruser
: SSH usernameOptional Parameters:
port
: SSH port (default: 22)password
: SSH password (or use key
for key-based auth)key
: Path to private SSH keytimeout
: Command execution timeout in milliseconds (default: 60000ms = 1 minute){
"mcpServers": {
"ssh-mcp": {
"command": "npx",
"args": [
"ssh-mcp",
"-y",
"--",
"--host=1.2.3.4",
"--port=22",
"--user=root",
"--password=pass",
"--key=path/to/key",
"--timeout=30000"
]
}
}
}
You can use the MCP Inspector for visual debugging of this MCP Server.
npm run inspect
SSH MCP Server is provided under the MIT License. Use at your own risk. This project is not affiliated with or endorsed by any SSH or MCP provider.
We welcome contributions! Please see our Contributing Guidelines for more information.
This project follows a Code of Conduct to ensure a welcoming environment for everyone.
If you find SSH MCP Server helpful, consider starring the repository or contributing! Pull requests and feedback are welcome.