Skip to main content
Glama
chouzz

RemoteShell MCP

by chouzz

🔗 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-mcp

Codex

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 add

local を選択し、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"]
    }
  }
}

📖 使い方

簡単に始められます!次のいずれかの方法があります:

  1. 🤖 LLMに設定を任せる - ホスト名、ユーザー名、パスワードなどをLLMに伝え、サーバー設定のセットアップを依頼するだけです

  2. ⚙️ 手動設定 - ~/.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)

目的: 非対話型シェルコマンドをリモートで実行し、結果を返します。

戻り値: stdoutstderrexit_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 pytest
Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
2moRelease cycle
5Releases (12mo)
Commit activity

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

  • F
    license
    A
    quality
    D
    maintenance
    A local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.
    6
    29
    2
  • A
    license
    Not graded
    quality
    A
    maintenance
    A 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,165
    655
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A centralized MCP server that enables LLM agents to securely execute commands and manage Linux servers via SSH.
    2
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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