Local Model Context Protocol server that lets LLM-based MCP clients execute remote shell commands over SSH on Linux or Windows machines.
https://github.com/tufantunc/ssh-mcpStop copying and pasting commands between your AI chat and terminal. This MCP server bridges that gap, letting Claude, Cursor, and other MCP clients execute shell commands directly on your remote servers.
You're already asking AI to help write deployment scripts, troubleshoot server issues, and generate system administration commands. But then you're stuck manually copying those commands to your terminal, SSHing into servers, and running them yourself.
SSH MCP eliminates that friction entirely. Your AI assistant can now directly execute commands on your Linux or Windows servers, check logs, restart services, and manage your infrastructure through natural conversation.
Server Management Through Conversation
You: "Check if nginx is running on the production server and restart it if it's down"
AI: *connects via SSH, runs systemctl status nginx, sees it's failed, runs systemctl restart nginx*
Real-Time Troubleshooting
You: "The API is slow, check CPU and memory usage on web-01"
AI: *executes top, free -h, iostat and reports back with actual system metrics*
Deployment Verification
You: "Deploy the latest build and verify the health endpoints are responding"
AI: *pulls latest code, runs deployment script, curls health endpoints, reports status*
Add this to your Claude Desktop config and you're done:
{
"mcpServers": {
"ssh-mcp": {
"command": "npx",
"args": [
"ssh-mcp", "-y", "--",
"--host=your.server.com",
"--user=deploy",
"--key=/path/to/your/key"
]
}
}
}
Now Claude can SSH into your servers and execute any command you ask for. Password auth works too, but keys are cleaner for automation.
Infrastructure Monitoring: Ask your AI to check disk space, memory usage, or service status across multiple servers without opening a dozen SSH sessions.
Deployment Assistance: Have AI verify deployments by checking process status, log files, and endpoint responses after pushing new code.
Incident Response: During outages, describe symptoms in natural language and let AI investigate logs, check system resources, and suggest fixes.
Server Maintenance: Schedule AI to handle routine tasks like log rotation, backup verification, or service restarts through simple conversations.
Uses the official MCP SDK with proper TypeScript types and the battle-tested ssh2 library for connections. Supports both password and key-based authentication with standard SSH security practices.
The server runs locally and creates secure SSH connections to your remote machines. No data leaves your environment except through the encrypted SSH tunnel you control.
npm install -g ssh-mcp
Configure your MCP client with your server details, and start having conversations that directly manage your infrastructure. No API keys, no cloud services - just direct SSH access controlled by your existing authentication setup.
Your AI assistant just became your best DevOps teammate.