RemoteShell MCP
🔗 RemoteShell MCP
LLMがリモートSSHサーバー上でコマンドを安全に管理・実行できるようにする Model Context Protocol (MCP) サーバーです。
✨ 機能
🔐 安全な認証情報管理 - SSHサーバープロファイルを一度保存すれば、認証情報を再入力する必要はありません
💻 リモートコマンド実行 - 非対話型シェルコマンドをリモートで実行します
📁 ファイル操作 - SFTPでファイルをアップロード/ダウンロードします
🤖 LLM搭載 - FastMCP と Paramiko で構築されています
Related MCP server: SSH MCP Server
🚀 インストール
RemoteShellはPyPIで配布されているstdio MCPサーバーです。uvx で直接実行できるため、インストール手順は不要です。次に、サーバーをAIコーディングエージェントに登録します:
Claude Code
claude mcp add remoteshell --scope user -- uvx remoteshell-mcpCodex
codex mcp add remoteshell -- uvx remoteshell-mcpその他のエージェント — 該当するものをクリックして展開してください 👇
cursor mcp add remoteshell -- uvx remoteshell-mcp~/.gemini/config/mcp_config.json(全体)または .agents/mcp_config.json(プロジェクト)を編集します:
{
"mcpServers": {
"remoteshell": {
"command": "uvx",
"args": ["remoteshell-mcp"]
}
}
}または、Antigravity TUI で MCP Servers ビューを開き、/mcp コマンドを実行します。
opencode mcp addlocal を選択し、uvx remoteshell-mcp と入力します。
~/.hermes/config.yaml を編集します:
mcp_servers:
remoteshell:
command: "uvx"
args: ["remoteshell-mcp"]Hermes TUI で /reload-mcp を実行して、新しいサーバーを読み込みます。
~/.openclaw/openclaw.json を編集します:
{
"mcp": {
"servers": {
"remoteshell": {
"command": "uvx",
"args": ["remoteshell-mcp"]
}
}
}
}または、openclaw configure を実行して、対話式ウィザードで追加します。
これをMCPクライアントの設定に追加します:
{
"mcpServers": {
"remoteshell": {
"command": "uvx",
"args": ["remoteshell-mcp"]
}
}
}📖 使い方
簡単に始められます!次のいずれかの方法があります:
🤖 LLMに設定を任せる - ホスト名、ユーザー名、パスワードなどをLLMに伝え、サーバー設定のセットアップを依頼するだけです
⚙️ 手動設定 -
~/.config/remoteshell/hosts.jsonの設定ファイルを直接編集します
💾 設定と保存
RemoteShellはサーバー設定を安全に次の場所に保存します:
~/.config/remoteshell/hosts.json🔧 設定管理
LLM管理: LLMは
save_serverおよびremove_serverツールを使用して、このファイルを自動的に管理します手動編集: 詳細な設定を行うために、JSONファイルを直接編集することもできます
📋 設定例
{
"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"
}
}
}🔒 セキュリティ上の注意
POSIXシステムでは、設定ファイルを保護してください:
chmod 600 ~/.config/remoteshell/hosts.json🛠️ 利用可能なツール
RemoteShellは、リモートサーバー管理用に以下のMCPツールを提供します:
📋 list_servers()
目的: 保存されているすべてのサーバープロファイルを、接続ステータスと最終アクティビティとともに表示します。
使用するタイミング:
ユーザーが「サーバーに接続」や「マシンを表示」を要求した場合
特定の
connection_idが指定されていない場合利用可能なサーバーを確認する必要がある場合
例: 「設定済みのサーバーを表示して」 → 保存されているすべてのサーバーの一覧をオンラインステータス付きで返します
💾 save_server(connection_id, host, user, auth_type, credential, port)
目的: 認証情報を伴うサーバープロファイルを作成または更新します。
パラメータ:
connection_id: サーバーの一意の識別子(例: "production"、"staging")host: サーバーのホスト名またはIPアドレスuser: SSHユーザー名auth_type:"password"または"private_key"credential:passwordの場合: 平文のパスワード文字列private_keyの場合: ファイルパス(例:~/.ssh/id_rsa)またはPEMキーコンテンツ
port: SSHポート(オプション。デフォルトは22で、省略した場合は保存済みのポートが維持されます)
使用するタイミング:
新しいサーバー設定を追加する場合
認証失敗後に認証情報を更新する場合
サーバーの接続情報を変更する場合
🗑️ remove_server(connection_id)
目的: 保存場所からサーバープロファイルを完全に削除します。
使用するタイミング:
ユーザーがサーバーの削除や忘却を明示的に要求した場合
サーバーにアクセスできなくなった、または不要になった場合
⚠️ 警告: この操作は元に戻せません
⚡ execute_command(connection_id, command)
目的: 非対話型シェルコマンドをリモートで実行し、結果を返します。
戻り値: stdout、stderr、exit_code
使用するタイミング:
システムコマンド、スクリプト、ユーティリティを実行する場合
サーバーのステータス、ディスク使用量、プロセス一覧を確認する場合
ファイル操作、パッケージ管理などを行う場合
使用すべきでないタイミング:
対話型プログラム(vim、htop、top)
手動入力を必要とするコマンド(
[Y/n]プロンプト) --yなどのフラグを使用する場合を除く
例: execute_command(connection_id="production", command="df -h")
📤 upload_file(connection_id, local_path, remote_path)
目的: SFTPを介してローカルマシンからリモートサーバーへファイルをアップロードします。
パラメータ:
local_path: ローカルマシン上のファイルへのパスremote_path: リモートサーバー上の保存先パス
注記:
remote_pathがディレクトリの場合、元のファイル名が保持されますlocal_pathが省略された場合、サーバーがデフォルトを選択し、レスポンスでそれを返します
📥 download_file(connection_id, remote_path, local_path)
目的: SFTPを介してリモートサーバーからローカルマシンへファイルをダウンロードします。
パラメータ:
remote_path: リモートサーバー上のファイルへのパスlocal_path: ローカルマシン上の保存先パス
注記:
local_pathが省略された場合のデフォルトは:~/.config/remoteshell/downloads/<connection_id>/<basename>です
🧪 開発
ローカル開発のセットアップ
ローカル開発には、次のMCP設定を使用します:
{
"mcpServers": {
"remoteshell": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/remoteShell-mcp", "run", "remoteshell-mcp"]
}
}
}テストの実行
uv run pytestMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.6292
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH. It supports password and key-based authentication, command timeouts, and sudo elevation for administrative tasks.49,165655MIT
- AlicenseNot gradedqualityAmaintenanceA local MCP server that enables LLMs to execute shell commands on remote hosts over SSH with multiple authentication methods.353MIT
- AlicenseNot gradedqualityDmaintenanceA centralized MCP server that enables LLM agents to securely execute commands and manage Linux servers via SSH.2MIT
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.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chouzz/remoteShell-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server