ssh-mcp
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"ssh": {
"args": [
"/full/path/ssh-mcp/index.js"
],
"command": "node"
}
}
}
服务介绍
SSH MCP Server
Manage your Ubuntu/Linux servers from your Windows computer using natural language! This MCP (Model Context Protocol) server enables you to control your remote servers through conversation via Claude Desktop or Cursor IDE by establishing SSH connections.
TR:
Windows bilgisayarnzdan Ubuntu/Linux sunucularnz doal dil ile ynetin! Bu MCP (Model Context Protocol) server, Claude Desktop veya Cursor IDE zerinden SSH balants yaparak uzak sunucularnz konuarak kontrol etmenizi salar.
Neden Bu Proje?
Geleneksel SSH ynetimi yerine, AI asistannza "Ubuntu sunucuma balan ve disk kullanmn gster" diyerek ilerinizi halledebilirsiniz. MCP protokol sayesinde AI, SSH komutlarn sizin iin altrr ve sonular gerek zamanl olarak size sunar.
zellikler
- Gvenli SSH Balants - ifre tabanl kimlik dorulama
- Gerek Zamanl kt - Komut ktlarn anlk grn
- AI Entegrasyonu - Claude Desktop ve Cursor IDE destei
- Doal Dil Kontrol - Komutlar konuarak altrn
- Minimal Kurulum - Sadece 3 tool, sfr karmaklk
Gereksinimler
Node.js Kurulumu
Windows:
- nodejs.org adresinden LTS versiyonunu indirin
- ndirilen
.msidosyasn altrn - Kurulum tamamlandktan sonra terminal an ve
node --versionyazn
macOS:
# Homebrew ile
brew install node
# Veya resmi site'den indirin
Linux (Ubuntu/Debian):
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
Kurulum
Otomatik Kurulum (nerilen)
Sadece config dosyanza ekleyin:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y",
"git+https://github.com/mertcankaraoglu/ssh-mcp.git#main"
]
}
}
}
Gereksinimler:
- Node.js v18+ (ndir)
- Claude Desktop veya Cursor IDE
Manuel Kurulum
1. Projeyi ndirin
git clone https://github.com/mertcankaraoglu/ssh-mcp.git
cd ssh-mcp
2. Bamllklar Ykleyin
npm install
3. MCP'yi Balayn
Kullandnz uygulamaya gre aadaki admlar izleyin:
Claude Desktop iin
Windows:
%APPDATA%\Claude\claude_desktop_config.json dosyasn an ve ekleyin:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["C:\\Users\\KULLANICI_ADINIZ\\ssh-mcp\\index.js"]
}
}
}
macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.json dosyasn an:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["/tam/yol/ssh-mcp/index.js"]
}
}
}
Cursor IDE iin
Windows:
%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json dosyasn an:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["C:\\Users\\KULLANICI_ADINIZ\\ssh-mcp\\index.js"]
}
}
}
macOS/Linux:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["/tam/yol/ssh-mcp/index.js"]
}
}
}
4. Uygulamay Yeniden Balatn
Claude Desktop veya Cursor' kapatp tekrar an. MCP server otomatik olarak balayacaktr.
5. Kurulumu Test Edin
Claude Desktop'ta u komutu deneyin:
"SSH balants test et - 192.168.1.100 IP'li sunucuya balan"
Eer MCP server alyorsa, Claude size SSH balant parametrelerini soracaktr.
Kullanm
Mevcut Aralar
| Ara | Aklama |
|---|---|
ssh_connect |
SSH sunucusuna balant kur |
ssh_exec |
Uzak sunucuda komut altr |
ssh_disconnect |
SSH balantsn kapat |
rnek Konumalar
Balant Kurma:
Siz: "192.168.1.100 IP'li Ubuntu sunucuma balan. Kullanc ad: ubuntu, ifre: mypassword"
Claude: [ssh_connect aracn kullanarak balanr]
Komut altrma:
Siz: "Disk kullanmn gster"
Claude: [ssh_exec ile 'df -h' komutunu altrr]
Siz: "Son 10 sistem logunu gster"
Claude: [ssh_exec ile 'tail -n 10 /var/log/syslog' altrr]
Siz: "Docker container'larn listele"
Claude: [ssh_exec ile 'docker ps' altrr]
Balanty Kapatma:
Siz: "SSH balantsn kapat"
Claude: [ssh_disconnect aracn kullanr]
Teknik Detaylar
Kullanlan Teknolojiler
- @modelcontextprotocol/sdk - MCP protokol implementasyonu
- ssh2 - SSH2 client ktphanesi
Mimari
Claude/Cursor
(AI Client)
MCP Protocol
(stdio)
MCP SSH Server
(Bu Proje)
SSH2
Ubuntu Server
Gvenlik Notlar
- ifreler dz metin olarak config dosyasnda saklanmaz, sadece runtime'da kullanlr
- SSH balantlar standart SSH2 protokol ile ifrelenir
- retim ortamlar iin SSH key tabanl kimlik dorulama nerilir (gelecek srmlerde eklenecek)
Yol Haritas
- SSH key destei
- oklu sunucu ynetimi
- SFTP dosya transferi
- Port forwarding
- Session kaydetme/ykleme
Katkda Bulunma
Katklarnz bekliyoruz! Pull request gndermekten ekinmeyin.
- Fork edin
- Feature branch oluturun (
git checkout -b feature/amazing) - Commit edin (
git commit -m 'feat: Add amazing feature') - Push edin (
git push origin feature/amazing) - Pull Request an
Lisans
MIT License - Detaylar iin LICENSE dosyasna bakn.
Teekkrler
- Anthropic - Claude ve MCP protokol iin
- Model Context Protocol - Harika dokmantasyon iin
** Projeyi beendiyseniz yldz vermeyi unutmayn!**
ENG - English Documentation
Why This Project?
Instead of traditional SSH management, you can handle your tasks by simply telling your AI assistant "Connect to my Ubuntu server and show disk usage". Thanks to the MCP protocol, AI executes SSH commands for you and presents results in real-time.
Features
- Secure SSH Connection - Password-based authentication
- Real-Time Output - See command outputs instantly
- AI Integration - Claude Desktop and Cursor IDE support
- Natural Language Control - Execute commands by speaking
- Minimal Setup - Only 3 tools, zero complexity
Requirements
- Node.js v18 or higher
- Claude Desktop or Cursor IDE
- A Linux/Ubuntu server with SSH access
Installation
1. Clone the Project
git clone https://github.com/YOUR_USERNAME/ssh-mcp.git
cd ssh-mcp
2. Install Dependencies
npm install
3. Connect MCP
Follow the steps below according to your application:
For Claude Desktop
Windows:
Open %APPDATA%\Claude\claude_desktop_config.json and add:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["C:\\Users\\YOUR_USERNAME\\local-mcp-ssh\\index.js"]
}
}
}
macOS/Linux:
Open ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["/full/path/ssh-mcp/index.js"]
}
}
}
For Cursor IDE
Windows:
Open %APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["C:\\Users\\YOUR_USERNAME\\local-mcp-ssh\\index.js"]
}
}
}
macOS/Linux:
~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json:
{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["/full/path/ssh-mcp/index.js"]
}
}
}
4. Restart the Application
Close and reopen Claude Desktop or Cursor. The MCP server will start automatically.
Usage
Available Tools
| Tool | Description |
|---|---|
ssh_connect |
Establish SSH connection to server |
ssh_exec |
Execute command on remote server |
ssh_disconnect |
Close SSH connection |
Example Conversations
Connecting:
You: "Connect to my Ubuntu server at 192.168.1.100. Username: ubuntu, password: mypassword"
Claude: [Connects using ssh_connect tool]
Running Commands:
You: "Show disk usage"
Claude: [Executes 'df -h' command via ssh_exec]
You: "Show last 10 system logs"
Claude: [Executes 'tail -n 10 /var/log/syslog' via ssh_exec]
You: "List Docker containers"
Claude: [Executes 'docker ps' via ssh_exec]
Disconnecting:
You: "Close SSH connection"
Claude: [Uses ssh_disconnect tool]
Technical Details
Technologies Used
- @modelcontextprotocol/sdk - MCP protocol implementation
- ssh2 - SSH2 client library
Architecture
Claude/Cursor
(AI Client)
MCP Protocol
(stdio)
MCP SSH Server
(This Project)
SSH2
Ubuntu Server
Security Notes
- Passwords are not stored in config files as plain text, only used at runtime
- SSH connections are encrypted with standard SSH2 protocol
- SSH key-based authentication is recommended for production environments (will be added in future versions)
Roadmap
- SSH key support
- Multi-server management
- SFTP file transfer
- Port forwarding
- Session save/load
Contributing
We welcome your contributions! Feel free to send pull requests.
- Fork it
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'feat: Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
License
MIT License - See LICENSE file for details.
Acknowledgments
- Anthropic - For Claude and MCP protocol
- Model Context Protocol - For excellent documentation
** Don't forget to star the project if you like it!**