RemoteShell MCP
RemoteShell MCP lets you manage SSH server profiles and perform remote operations on them.
Manage server profiles: List, save (create/update), and remove saved SSH connections with credentials (password or private key).
Execute commands: Run non-interactive shell commands remotely and get stdout, stderr, and exit code.
Transfer files: Upload local files to a remote server via SFTP, and download remote files to your local machine.
Persist configuration: Server profiles are stored in
~/.config/remoteshell/hosts.json, and can be managed manually or via the tools.
Click on "Deploy 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., "@RemoteShell MCP list my saved servers"
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.
๐ RemoteShell MCP
A Model Context Protocol (MCP) server that enables LLMs to securely manage and execute commands on remote SSH servers.
โจ Features
๐ Secure credential management - Save SSH server profiles once, no need to retype credentials
๐ป Remote command execution - Execute non-interactive shell commands remotely
๐ File operations - Upload/download files via SFTP
๐ค LLM-powered - Built with FastMCP and Paramiko
Related MCP server: ssh-client-mcp-server
๐ Installation
RemoteShell is a stdio MCP server distributed on PyPI. Run it directly with uvx โ no install step required. Then register the server with your AI coding agent:
Claude Code
claude mcp add remoteshell --scope user -- uvx remoteshell-mcpCodex
codex mcp add remoteshell -- uvx remoteshell-mcpOther agents โ click yours to expand ๐
cursor mcp add remoteshell -- uvx remoteshell-mcpEdit ~/.gemini/config/mcp_config.json (global) or .agents/mcp_config.json (project):
{
"mcpServers": {
"remoteshell": {
"command": "uvx",
"args": ["remoteshell-mcp"]
}
}
}Or open the MCP Servers view in the Antigravity TUI and run the /mcp command.
opencode mcp addChoose local, then enter uvx remoteshell-mcp.
Edit ~/.hermes/config.yaml:
mcp_servers:
remoteshell:
command: "uvx"
args: ["remoteshell-mcp"]Run /reload-mcp in the Hermes TUI to pick up the new server.
Edit ~/.openclaw/openclaw.json:
{
"mcp": {
"servers": {
"remoteshell": {
"command": "uvx",
"args": ["remoteshell-mcp"]
}
}
}
}Or run openclaw configure to add it via the interactive wizard.
Add this to your MCP client configuration:
{
"mcpServers": {
"remoteshell": {
"command": "uvx",
"args": ["remoteshell-mcp"]
}
}
}๐ Usage
Getting started is easy! You can either:
๐ค Let the LLM configure for you - Simply tell the LLM your host, username, password, etc., and ask it to set up the server configuration
โ๏ธ Manual configuration - Directly edit the configuration file at
~/.config/remoteshell/hosts.json
๐พ Configuration & Storage
RemoteShell securely stores your server configurations in:
~/.config/remoteshell/hosts.json๐ง Configuration Management
LLM-managed: The LLM automatically manages this file using
save_serverandremove_servertoolsManual editing: You can also directly edit the JSON file for advanced configurations
๐ Example Configuration
{
"version": 1,
"servers": {
"production-server": {
"host": "1.2.3.4",
"user": "root",
"port": 22,
"auth_type": "password",
"password": "your_secure_password",
"last_connected": null
},
"staging-server": {
"host": "staging.example.com",
"user": "ubuntu",
"port": 22,
"auth_type": "private_key",
"private_key": "~/.ssh/id_rsa",
"last_connected": "2025-01-01T00:00:00+00:00"
}
}
}๐ Security Note
On POSIX systems, protect your configuration file:
chmod 600 ~/.config/remoteshell/hosts.json๐ ๏ธ Available Tools
RemoteShell provides the following MCP tools for remote server management:
๐ list_servers()
Purpose: Display all saved server profiles with their connection status and last activity.
When to use:
User asks to "connect to server" or "show machines"
No specific
connection_idis providedNeed to see available servers
Example: "Show me which servers I have configured" โ Returns list of all saved servers with online status
๐พ save_server(connection_id, host, user, auth_type, credential, port)
Purpose: Create or update a server profile with authentication credentials.
Parameters:
connection_id: Unique identifier for the server (e.g., "production", "staging")host: Server hostname or IP addressuser: SSH usernameauth_type:"password"or"private_key"credential:For
password: Plain text password stringFor
private_key: File path (e.g.,~/.ssh/id_rsa) or PEM key content
port: SSH port (optional; defaults to 22 and keeps the existing saved port if omitted)
When to use:
Adding a new server configuration
Updating credentials after authentication failure
Changing server connection details
๐๏ธ remove_server(connection_id)
Purpose: Permanently delete a server profile from storage.
When to use:
User explicitly requests to remove or forget a server
Server is no longer accessible or needed
โ ๏ธ Warning: This action cannot be undone
โก execute_command(connection_id, command)
Purpose: Execute non-interactive shell commands remotely and return results.
Returns: stdout, stderr, and exit_code
When to use:
Running system commands, scripts, or utilities
Checking server status, disk usage, process lists
File operations, package management, etc.
When NOT to use:
Interactive programs (vim, htop, top)
Commands requiring manual input (
[Y/n]prompts) - unless using flags like-y
Example: execute_command(connection_id="production", command="df -h")
๐ค upload_file(connection_id, local_path, remote_path)
Purpose: Upload files from your local machine to a remote server via SFTP.
Parameters:
local_path: Path to the file on your local machineremote_path: Destination path on the remote server
Notes:
If
remote_pathis a directory, the original filename is preservedIf
local_pathis omitted, server selects a default and returns it in response
๐ฅ download_file(connection_id, remote_path, local_path)
Purpose: Download files from a remote server to your local machine via SFTP.
Parameters:
remote_path: Path to the file on the remote serverlocal_path: Destination path on your local machine
Notes:
If
local_pathis omitted, defaults to:~/.config/remoteshell/downloads/<connection_id>/<basename>
๐งช Development
Local Development Setup
For local development, use this MCP configuration:
{
"mcpServers": {
"remoteshell": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/remoteShell-mcp", "run", "remoteshell-mcp"]
}
}
}Running Tests
uv run pytestAvailable Tools
6 toolsdownload_fileA
Download a remote file to a local path (on the machine running this MCP server) via SFTP.
When to use: Fetch logs, reports, or backups from the remote. When NOT to use: Avoid very large downloads (>100MB) unless you verified size first.
Example: download_file(connection_id="srv1", remote_path="/var/log/syslog", local_path="./logs/")
Inputs: remote_path (required), connection_id (required), local_path. Returns: object
execute_commandA
Execute a non-interactive shell command on a remote server and return stdout/stderr/exit_code.
When to use: Status checks (df, ls), file ops (cp, mv), and scripts that do not require live interaction. When NOT to use: Do not run interactive tools (vim, htop, top) or commands that require manual prompts.
Example: execute_command(connection_id="srv1", command="df -h")
Inputs: command (required), connection_id (required). Returns: object
list_serversA
List all servers saved locally by this MCP server (persistent inventory).
When to use: When the user asks to connect to a server, manage machines, or did not specify a connection_id. When NOT to use: Not needed if you already know the correct connection_id.
Example: "Show me which servers I have."
Inputs: no named parameters. Returns: object
remove_serverA
Permanently delete a saved server profile from the local host store.
When to use: Only when the user explicitly asks to forget/remove a server. When NOT to use: Do not remove servers just because a connection failed.
Example: remove_server(connection_id="srv1")
Inputs: connection_id (required). Returns: object
save_serverA
Persist (create or update) a server connection profile in the local host store.
When to use: When the user provides new SSH details, or after an auth_failed error to update credentials. When NOT to use: Do not ask for credentials again if they are already saved and still valid.
Example: save_server(connection_id="srv1", host="1.2.3.4", user="root", auth_type="password", credential="", port=2222)
Inputs: host (required), user (required), auth_type (required), credential (required), +2 more. Returns: object
upload_fileA
Upload a local file (on the machine running this MCP server) to a remote server via SFTP.
When to use: Deploy configs, scripts, or artifacts to the remote. When NOT to use: Do not upload huge files blindly; verify size/permissions first.
Example: upload_file(connection_id="srv1", local_path="./config.yaml", remote_path="/etc/app/")
Inputs: remote_path (required), connection_id (required), local_path. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 6 tools
Each tool has a distinct purpose: server profile management (save, list, remove) and remote operations (execute, upload, download). No overlap or ambiguity.
All tools follow a consistent verb_noun pattern (e.g., remove_server, list_servers, execute_command), making them predictable and easy to use.
6 tools is well-scoped for a remote shell MCP, covering server management and core file/command operations without superfluous tools.
Covers key CRUD operations for servers and essential remote actions (execute, upload, download). Minor gap: no explicit test-connection or update server operation, but save_server handles updates.
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Manage servers through SSH.
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Related MCP Servers
- FlicenseAqualityDmaintenanceA local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.610 npm2-
- AlicenseNot gradedqualityBmaintenanceA local MCP server that enables LLMs to execute shell commands on remote hosts over SSH with multiple authentication methods.35 npm3MIT
- AlicenseNot gradedqualityDmaintenanceA centralized MCP server that enables LLM agents to securely execute commands and manage Linux servers via SSH.2MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that enables LLMs to execute shell commands on remote Linux and Windows systems via SSH with configurable timeout and authentication options.17,673 npmMIT