MCP SSH Server

by MCP-Mirror

391 downloads
Not rated
GitHub

About

MCP SSH Server is a secure SSH server implementation for the Model Context Protocol (MCP). It enables remote command execution and file operations over SSH, supporting both password and key-based authentication. It is intended for developers who need to manage remote servers via…

Details

Author
MCP-Mirror
Downloads
391
Categories
Developer Tools

- Secure SSH connection management
- Password and key-based authentication
- Remote command execution
- File upload and download operations
- Directory listing and permission management

Install the npm package mcp-ssh, add it to your Claude desktop configuration, then interact via HTTP POST/GET endpoints on localhost:8889. Use /connect with credentials, /exec for commands, /upload//download for files, /ls for directory listing, and /status for connection state.

MCP SSH Server

A powerful SSH server implementation for Model Context Protocol (MCP). This server enables secure remote command execution and file operations through SSH protocol, supporting both password and key-based authentication.

Features

- ✨ Secure SSH connection management
- 🔑 Password and key-based authentication
- 💻 Remote command execution
- 📁 File operations (upload/download)
- 📊 Progress tracking for file transfers
- 🔐 Permission management
- 📂 Directory operations
- 🚀 Bulk file transfers
- 📝 Detailed logging

Installation

1. Install the package:

npm install mcp-ssh

2. Add to your Claude desktop config (claude_desktop_config.json):

{
"mcpServers": {
"ssh": {
"command": "node",
"args": ["%APPDATA%/npm/node_modules/mcp-ssh/dist/server.js"],
"env": {
"SSH_PORT": "8889",
"SSH_LOG_LEVEL": "info"
}
}
}
}

Usage

Password Authentication

$body = @{
    id = "test"
    host = "example.com"
    port = 22
    username = "user"
    password = "pass123"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/connect" -Method Post -Body $body -ContentType "application/json"

Key Authentication

$body = @{
    id = "test"
    host = "example.com"
    port = 22
    username = "user"
    privateKey = Get-Content ~/.ssh/id_rsa | Out-String
    passphrase = "optional-key-passphrase"  # if your key is protected
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/connect" -Method Post -Body $body -ContentType "application/json"

Execute Commands

$execBody = @{
    id = "test"
    command = "ls -la"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/exec" -Method Post -Body $execBody -ContentType "application/json"

File Operations

```powershell
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.