SSH MCP Server
Provides SSH-based remote administration capabilities for Linux servers, including command execution, system monitoring, and server management through conversational interface
Enables remote server management through SSH connections, allowing execution of system commands, monitoring of server resources, and administration tasks on Ubuntu/Linux servers using natural language
Click on "Install 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 Serverconnect to my Ubuntu server at 192.168.1.100 and show me disk usage"
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 π
Control your remote servers using natural language through Claude Desktop or Cursor IDE! This MCP (Model Context Protocol) server lets you talk to your AI assistantβ"Connect to my server and show disk usage"βand it runs the SSH commands for you. No need to open a terminal or remember commands.
Perfect for Linux VMs, Google Cloud, AWS EC2, DigitalOcean, and any server you can reach via SSH.
π What is MCP?
MCP (Model Context Protocol) lets AI apps like Claude and Cursor use external tools. This server adds SSH as a toolβso your AI can connect to servers and run commands when you ask.
π€ Installation for AI Agents
If you're an AI agent or someone setting this up via AI: Use these instructions to install the SSH MCP server.
If you're a user asking your AI to install this: Copy and paste this to your AI:
"Install the SSH MCP server from https://github.com/mertcankaraoglu/ssh-mcp β add it to my MCP config and tell me when it's done. Follow the README instructions."
Prerequisites: Node.js v18+ must be installed. (Download)
Config file: Add the block below to the MCP config file:
Claude Desktop:
%APPDATA%\Claude\claude_desktop_config.json(Windows) or~/Library/Application Support/Claude/claude_desktop_config.json(macOS)Cursor IDE:
~/.cursor/mcp.jsonor%USERPROFILE%\.cursor\mcp.json(Windows)
Add this JSON inside
mcpServers:
"ssh": {
"command": "npx",
"args": ["-y", "git+https://github.com/mertcankaraoglu/ssh-mcp.git#main"]
}Restart the application. The user can then ask you to connect to their server (with password or SSH key).
π― Why Use This?
Instead of opening PuTTY or typing ssh user@server in a terminal, you simply tell your AI:
"Connect to my Ubuntu server at 192.168.1.100 and run df -h"
Your AI handles the connection and shows you the results. Great for developers, DevOps, or anyone who manages remote servers and wants a simpler workflow.
β¨ Features
Feature | Description |
π Password or SSH key | Use a password, or an SSH key file (no password needed for GCP, AWS, etc.) |
β‘ Real-time output | See command results as they run |
π€ AI integration | Works with Claude Desktop and Cursor IDE |
π¨ Natural language | "Show disk usage", "List Docker containers", "Restart nginx" |
π¦ Minimal setup | Just add a few lines to your configβno complex installation |
π What You Need
Node.js v18 or newer β Download here (choose LTS)
Claude Desktop or Cursor IDE
A remote server with SSH access (IP address or hostname, username, and either password or SSH key)
Installing Node.js (if you don't have it)
Windows:
Go to nodejs.org and download the LTS version
Run the installer
Open a new terminal and type
node --versionto confirm
macOS:
brew install nodeLinux (Ubuntu/Debian):
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejsπ Quick Install (Recommended)
For you or your AI agent: Add the following to your MCP config file, then restart your app.
Where is the config file?
App | Windows | macOS / Linux |
Claude Desktop |
|
|
Cursor IDE |
|
|
Tip: In Windows, press Win+R, type %APPDATA%\Claude and press Enter to open the Claude folder.
What to add
Open the config file (create it if it doesn't exist) and add:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": ["-y", "git+https://github.com/mertcankaraoglu/ssh-mcp.git#main"]
}
}
}If you already have other MCP servers, add the "ssh" block inside the existing "mcpServers" object.
After adding
Save the file
Restart Claude Desktop or Cursor
You're done! Ask your AI to connect to a server.
π‘ How to Use
Step 1: Connect
Tell your AI how to connect. You need either a password or an SSH key.
With password:
Connect to 192.168.1.100, username ubuntu, password mypasswordWith SSH key (e.g. Google Cloud, AWS):
Connect to 34.123.45.67 using SSH key at ~/.ssh/google_compute_engine, username myuserStep 2: Run commands
Once connected, ask naturally:
You say | AI runs |
"Show disk usage" |
|
"List Docker containers" |
|
"Last 10 log lines" |
|
"What's the uptime?" |
|
Step 3: Disconnect
Close SSH connectionπ Example conversation
Here's a full example of how a typical session might go:
You | AI |
"Connect to my server at 192.168.1.100, username ubuntu, password mypass123" | "Connected successfully. What would you like me to run?" |
"Show disk usage" | |
"List running Docker containers" | |
"Close the SSH connection" | "Connection closed." |
π Authentication Options
You must provide either a password or an SSH key. Password is not required when using a key.
Option 1: Password
Provide: host, username, password
Option 2: SSH key (recommended for cloud VMs)
By file path (e.g. ~/.ssh/id_rsa):
host, username, privateKeyPath: "~/.ssh/id_rsa"By key content (PEM string):
host, username, privateKey: "-----BEGIN OPENSSH PRIVATE KEY-----\n..."Encrypted key: Add passphrase when your key is protected.
By platform
Platform | Typical setup |
π’ Google Cloud VM |
|
π AWS EC2 |
|
π΅ DigitalOcean |
|
π₯οΈ Self-hosted / VPS | Password or |
π οΈ Available Tools
Tool | What it does |
| Connects to the SSH server (host, username, password or key) |
| Runs a command on the connected server |
| Closes the connection |
π Manual Installation
If you prefer to clone the repo and run it locally:
git clone https://github.com/mertcankaraoglu/ssh-mcp.git
cd ssh-mcp
npm installThen in your MCP config, use the local path:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["C:\\full\\path\\to\\ssh-mcp\\index.js"]
}
}
}Replace the path with your actual path. On Windows use double backslashes \\.
π§ How It Works
βββββββββββββββββββ
β Claude / Cursor β β You talk here
ββββββββββ¬βββββββββ
β MCP Protocol
ββββββββββΌβββββββββ
β SSH MCP Server β β This project
ββββββββββ¬βββββββββ
β SSH
ββββββββββΌβββββββββ
β Your Server β β Commands run here
βββββββββββββββββββπ‘οΈ Security
Passwords and keys are not stored in config filesβthey're only used when you connect
All connections use standard SSH encryption
Prefer SSH key auth for production (GCP, AWS, etc.)
Never commit private keys to git
πΊοΈ Roadmap
SSH key support
Multi-server management
SFTP file transfer
Port forwarding
Session save/load
β Troubleshooting
Problem | What to try |
"Config file not found" | Create the file if it doesn't exist. For Cursor: |
"Node not found" | Install Node.js v18+ from nodejs.org. Restart your app after installing. |
"Connection failed" | Check host, username, and password/key. For cloud VMs, ensure your SSH key path is correct (e.g. |
"MCP server not loading" | Restart Claude Desktop or Cursor completely after editing the config. |
π€ Contributing
Contributions are welcome!
Fork the repo
Create a branch (
git checkout -b feature/amazing)Commit (
git commit -m 'feat: Add amazing feature')Push (
git push origin feature/amazing)Open a Pull Request
π License
MIT β see LICENSE for details.
π Thanks
Anthropic β Claude & MCP
Model Context Protocol β Documentation
ssh2 β Node.js SSH client
TΓΌrkΓ§e | β If this helps you, consider starring the repo!
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mertcankaraoglu/ssh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server