MCP server for managing SSH connections and executing remote commands
Project description
RemoteShell MCP
RemoteShell is a Model Context Protocol (MCP) server that lets an LLM:
- Save SSH server profiles once (so the user doesn’t retype credentials)
- Execute non-interactive shell commands remotely
- Upload/download files via SFTP
This server is built with FastMCP and Paramiko.
Installation / Client setup (recommended)
Add this to your MCP client config:
{
"mcpServers": {
"remoteshell": {
"command": "uvx",
"args": ["remoteshell-mcp"]
}
}
}
Persistent storage
RemoteShell persists servers to:
~/.config/remoteshell/hosts.json
The LLM is expected to manage this file by calling save_server / remove_server.
You can also edit it manually.
Example hosts.json:
{
"version": 1,
"servers": {
"srv1": {
"host": "1.2.3.4",
"user": "root",
"port": 22,
"auth_type": "password",
"password": "your_password_here",
"last_connected": null
},
"srv2": {
"host": "example.com",
"user": "ubuntu",
"port": 22,
"auth_type": "private_key",
"private_key": "~/.ssh/id_rsa",
"last_connected": "2025-01-01T00:00:00+00:00"
}
}
}
On POSIX systems you should protect the file:
chmod 600 ~/.config/remoteshell/hosts.json
Tools
RemoteShell exposes exactly these tools:
list_servers()
- Purpose: List saved servers, including cached online status and
last_connected. - When to use: When the user says “connect server”, “show machines”, or did not specify a
connection_id. - Example: “Show me which servers I have.”
save_server(connection_id, host, user, auth_type, credential)
- Purpose: Create/update a saved server profile.
- auth_type:
passwordorprivate_key - credential:
- For
password: the password string - For
private_key: either a private key path (e.g.~/.ssh/id_rsa) or PEM key text
- For
- When to use: New server info, or after
auth_failedto update credentials.
remove_server(connection_id)
- Purpose: Permanently delete a saved server profile.
- When to use: Only when the user explicitly asks to remove/forget a server.
execute_command(connection_id, command)
- Purpose: Execute a non-interactive command remotely and return
stdout,stderr,exit_code. - When NOT to use: Interactive programs (vim/htop/top) or commands requiring manual
[Y/n]prompts (unless you add flags like-y). - Example:
execute_command(connection_id="srv1", command="df -h")
upload_file(connection_id, local_path, remote_path)
- Purpose: Upload a local file (local to the machine running this MCP server) to the remote.
- Note: If
remote_pathis a directory, the local filename is preserved. - Auto local_path: If
local_pathis omitted, the server picks a default path and returns it in the response/error.
download_file(connection_id, remote_path, local_path)
- Purpose: Download a remote file to a local path (local to the machine running this MCP server).
- Auto local_path: If
local_pathis omitted, the server defaults to~/.config/remoteshell/downloads/<connection_id>/<basename>.
Claude Code shortcut (local dev)
If you want to run the server from a local checkout:
{
"mcpServers": {
"remoteshell": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/remoteShell-mcp", "run", "remoteshell-mcp"]
}
}
}
Development
uv run pytest
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remoteshell_mcp-1.0.0.tar.gz.
File metadata
- Download URL: remoteshell_mcp-1.0.0.tar.gz
- Upload date:
- Size: 92.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b72e19c0e1ad2852cb7b423d384f4d16a94b9d306a61d8d8d29040ff65b3d09e
|
|
| MD5 |
cfa46ad9d0020815fb19fa752a953f8d
|
|
| BLAKE2b-256 |
2c064f9cc80203d452b91a2dadadd5f47063ca18dd0dbbffc9106f81527b89e6
|
Provenance
The following attestation bundles were made for remoteshell_mcp-1.0.0.tar.gz:
Publisher:
publish.yml on chouzz/remoteShell-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remoteshell_mcp-1.0.0.tar.gz -
Subject digest:
b72e19c0e1ad2852cb7b423d384f4d16a94b9d306a61d8d8d29040ff65b3d09e - Sigstore transparency entry: 777701715
- Sigstore integration time:
-
Permalink:
chouzz/remoteShell-mcp@8a9e2bdbd2dea2b38c1ce8215669df4f6b1e2f92 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/chouzz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8a9e2bdbd2dea2b38c1ce8215669df4f6b1e2f92 -
Trigger Event:
release
-
Statement type:
File details
Details for the file remoteshell_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: remoteshell_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
632434749a521320a78555b985819f5489122f3f673056716c1778e38f9aafee
|
|
| MD5 |
a8f2893c5dfa8c724129bdada0d5f057
|
|
| BLAKE2b-256 |
0fc745036605db9a009363f4ac780a3716ddb787b3050565d628ce4029d37ef0
|
Provenance
The following attestation bundles were made for remoteshell_mcp-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on chouzz/remoteShell-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
remoteshell_mcp-1.0.0-py3-none-any.whl -
Subject digest:
632434749a521320a78555b985819f5489122f3f673056716c1778e38f9aafee - Sigstore transparency entry: 777701726
- Sigstore integration time:
-
Permalink:
chouzz/remoteShell-mcp@8a9e2bdbd2dea2b38c1ce8215669df4f6b1e2f92 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/chouzz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8a9e2bdbd2dea2b38c1ce8215669df4f6b1e2f92 -
Trigger Event:
release
-
Statement type: