remote-ssh-mcp
Enables persistent SSH sessions and SFTP file transfers with native GUI credential prompts for secure remote server management. It supports background command execution, session pooling, and automatic connection reuse across multiple commands.
README
remote-ssh-mcp
MCP server for persistent SSH sessions with native GUI credential prompts.
Features
- 🔗 Persistent Sessions - Connections survive across multiple commands
- 🔐 GUI Credential Prompts - Native dialogs on Linux/macOS/Windows
- 📁 File Transfer - Upload/download via SFTP
- ⏱️ Background Commands - Run long tasks without blocking
- 🔄 Session Reuse - Automatic connection pooling per host
- 🛡️ Secure - Per-process secrets, localhost-only helper
Installation
npm install -g remote-ssh-mcp
Quick Start
Add to your MCP client config:
{
"mcpServers": {
"ssh": {
"command": "remote-ssh-mcp"
}
}
}
That's it! Connect to servers and credentials will be prompted via native GUI.
Configuration
Environment Variables (Optional)
Skip GUI prompts by setting credentials:
{
"mcpServers": {
"ssh": {
"command": "remote-ssh-mcp",
"env": {
"SSH_USER": "deploy",
"SSH_PASSWORD": "secret"
}
}
}
}
Host Config File (Optional)
Create ~/.ssh/mcp-hosts.json:
{
"defaults": { "username": "admin" },
"hosts": {
"prod.example.com": {
"username": "deploy",
"keyPath": "~/.ssh/deploy_key"
}
}
}
Tools
| Tool | Description |
|---|---|
ssh_connect |
Connect to SSH server, returns session_id |
ssh_exec |
Execute command (with optional background mode) |
ssh_read_buffer |
Read terminal output history |
ssh_disconnect |
Close a session |
list_sessions |
List active sessions |
scp_upload |
Upload file via SFTP |
scp_download |
Download file via SFTP |
Example Usage
1. ssh_connect(host="server.com", auth_mode="password")
→ { session_id: "abc-123", status: "connected" }
2. ssh_exec(session_id="abc-123", command="cd /app && git pull")
→ { stdout: "Already up to date.", exit_code: 0 }
3. ssh_exec(session_id="abc-123", command="npm run build", background=true)
→ { status: "running", pid: "12345" }
4. ssh_read_buffer(session_id="abc-123", lines=50)
→ { lines: ["Building...", "Done!"], total_buffered: 150 }
GUI Requirements
For credential prompts:
- Linux:
zenity(apt install zenity) - macOS: Built-in (osascript)
- Windows: Built-in (PowerShell)
Without GUI, use environment variables or config file.
Security
- Credentials prompted via native OS dialogs
- Never logged or written to disk
- Per-process authentication tokens
- Localhost-only credential helper
- Sessions auto-expire after 15 min inactivity
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.