BS

blakerouse/ssh-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

21 stars 4 forks 品質 56 トレンド 0MIT

ホストを管理し、ホストのグループを渡るコマンドを実行し、ローカルで実行するSSH MCPサーバー

概要

SSH MCP は、ホスト上でローカルで動作する MCP サーバーで、リモート SSH ホストと管理し、やり取りする機能を提供します。 ホストをグループに整理し、複数のホスト間でコマンドを実行します。 - - 自動OSの検出を用いるSSH構成に新しいLinuxかWindowsのホストを加えて下さい。 ユーザ名とパスワードは、接続文字列でオプションです。提供されていない場合、現在のユーザとSSHエージェントは認証に使用されます。 - - - グループと名前でSSH設定からホストを削除します。 - - SSH 設定からすべてのグループのリストを取得します。 - - SSH の設定からホストのリストを取得します。 任意にグループによってろ過できます。 - - Linux および Windows のホストのためのキャッシュされたオペレーティング システム情報を取得します。 個々のホストまたはグループ全体を指定できます。 - - Linux および Windows ホスト用のキャッシュされたオペレーティングシステム情報を更新します。 個々のホストまたはグループ全体を指定できます.

概要(AI 翻訳)

SSH MCP は、ホスト上でローカルで動作する MCP サーバーで、リモート SSH ホストと管理し、やり取りする機能を提供します。 ホストをグループに整理し、複数のホスト間でコマンドを実行します。

ツール

ホスト管理

  • add host - 自動OS検出でSSH設定に新しいLinuxまたはWindowsホストを追加します。 ユーザ名とパスワードは、接続文字列でオプションです。提供されていない場合、現在のユーザとSSHエージェントは認証に使用されます。
  • remove host - グループと名前でSSH設定からホストを削除します。 -get groups - SSH設定からすべてのグループのリストを取得します。 -get hosts - SSH設定からホストのリストを取得します。 任意にグループによってろ過できます。
  • get os info - Linux および Windows ホスト用のキャッシュされたオペレーティングシステム情報を取得します。 個々のホストまたはグループ全体を指定できます。
  • update os info - Linux および Windows ホスト用のキャッシュされたオペレーティングシステム情報を更新します。 個々のホストまたはグループ全体を指定できます。

コマンド実行

  • perform command - SSHをリモートマシンにし、コマンドを実行します.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

SSH MCP

SSH MCP is an MCP server that runs locally on your host that provides the ability to manage and interact with remote SSH hosts. It supports organizing hosts into groups and executing commands across multiple hosts simultaneously.

Tools

Host Management

  • add_host - Adds a new Linux or Windows host to the SSH configuration with automatic OS detection. Username and password are optional in the connection string - if not provided, the current user and SSH agent will be used for authentication.
  • remove_host - Removes a host from the SSH configuration by group and name.
  • get_groups - Retrieves the list of all groups from the SSH configuration.
  • get_hosts - Retrieves the list of hosts from the SSH configuration. Can optionally filter by group.
  • get_os_info - Retrieves the cached operating system information for Linux and Windows hosts. You can specify individual hosts or an entire group.
  • update_os_info - Updates the cached operating system information for Linux and Windows hosts. You can specify individual hosts or an entire group.

Command Execution

  • perform_command - SSH into a remote machine and executes a command. You can specify individual hosts or an entire group. Commands that take longer than 30 seconds are automatically moved to background execution. Use background=true to run immediately in background.

Command Management

  • get_command_status - Retrieves the status and results of a background command by its command ID. If no ID is provided, returns the most recent command.
  • list_commands - Lists all background commands with their current status. Useful for tracking long-running commands.
  • cancel_command - Cancels a running background command by its command ID.

Features

  • Cross-platform support - Works with both Linux and Windows remote hosts with automatic OS detection
  • Group-based organization - Organize hosts into groups for easier management
  • Multiple authentication methods - Supports password, SSH agent, and SSH key files (~/.ssh/id_rsa, id_ed25519, etc.)
  • Secure host verification - Uses ~/.ssh/known_hosts for host key verification with automatic host addition
  • Concurrent execution - Execute commands across multiple hosts simultaneously
  • Automatic background execution - Commands that take longer than 30 seconds are automatically moved to background, with command IDs returned for status tracking
  • Persistent storage - Uses BadgerDB for efficient local storage

Limitations

  • SSH agent support is Unix-only (SSH_AUTH_SOCK) - password and key file authentication work on all platforms
  • Remote hosts can be Linux or Windows (automatic OS detection)

How to Setup

Checkout the repository:

$ git clone https://github.com/blakerouse/ssh-mcp

Build the binary:

$ go build .

Update the MCP configuration for Claude Desktop:

{
  "mcpServers": {
    "ssh": {
      "command": ""
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →