RemoteShell MCP
A server that enables LLMs to securely manage and execute commands on remote SSH servers.
README
🔗 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
🚀 Installation
For Claude Code users
claude mcp add remoteshell --scope user -- uvx remoteshell-mcp
For other MCP clients
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_servertools - Manual 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 provided - Need 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 string - For
private_key: File path (e.g.,~/.ssh/id_rsa) or PEM key content
- For
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 preserved - If
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 pytest
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。