リモートコマンドMCPサーバー
異なるオペレーティングシステム間でリモートコマンド実行を可能にするモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、シェルコマンドを実行するための統一されたインターフェースを提供し、WindowsとUnix系システム間のプラットフォーム固有の違いを自動的に処理します。
特徴
- クロスプラットフォームのコマンド実行
- WindowsとUnix間の自動コマンド正規化
- 組み込みのエラー処理と出力ストリーミング
- 作業ディレクトリ指定のサポート
- プラットフォーム固有のシェルの選択
インストール
- リポジトリをクローンします。
- 依存関係をインストールします:
- サーバーを構築します。
- 設定ファイルで MCP サーバーを構成します。
VSCode Cline 拡張機能 ( cline_mcp_settings.json
) の場合:
使用法
サーバーは、ホストマシン上で有効な任意のシェルコマンドを実行できるexecute_remote_command
という単一のツールを提供します。これには以下が含まれます。
- システムコマンド
- パッケージ マネージャー コマンド (apt、yum、chocolatey など)
- 開発ツール (git、npm、python など)
- ファイル操作
- ネットワークコマンド
- サービス管理
- システムで利用可能なその他のCLIコマンド
ツール: execute_remote_command
パラメータ:
command
(必須): ホストOS上で実行できる有効なシェルコマンドcwd
(オプション): コマンド実行のための作業ディレクトリ
例
- システム情報:
- パッケージ管理:
- ネットワーク操作:
- Git 操作:
- ファイル操作:
- プロセス管理:
- サービス制御:
セキュリティに関する考慮事項
このサーバーは任意のシステム コマンドを実行できるため、次のセキュリティ プラクティスを考慮してください。
- アクセス制御: MCP サーバーへのアクセスを信頼できるユーザーのみに制限します
- コマンド検証: アプリケーションロジックで実行する前にコマンドを検証します
- 作業ディレクトリ:
cwd
パラメータを使用して、コマンドの実行を特定のディレクトリに制限します。 - 環境: システム設定や機密ファイルを変更するコマンドには注意してください
- 権限: 適切なユーザー権限でMCPサーバーを実行します
クロスプラットフォームのコマンド処理
サーバーはプラットフォーム固有の違いを自動的に処理します。
- コマンド翻訳:
ls
⟷dir
(プラットフォームに応じて自動的に変換されます)- 各プラットフォームに適したパイプ演算子のフォーマット
- シェルの選択:
- Windows:
cmd.exe
を使用します - Unix/Linux:
/bin/sh
を使用する
- Windows:
エラー処理
サーバーは詳細なエラーメッセージを提供し、応答には標準出力と標準エラー出力の両方が含まれます。コマンドが失敗した場合は、問題の詳細を含むエラーメッセージが表示されます。
エラー応答の例:
発達
プロジェクト構造
建物
これにより、TypeScript コードがコンパイルされ、 build
ディレクトリに実行可能ファイルが作成されます。
貢献
- リポジトリをフォークする
- 機能ブランチを作成します(
git checkout -b feature/amazing-feature
) - 変更をコミットします (
git commit -m 'Add some amazing feature'
) - ブランチにプッシュする (
git push origin feature/amazing-feature
) - プルリクエストを開く
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
異なるオペレーティング システム間でシェル コマンドをリモート実行できるようにし、Windows と Unix 系システム間のプラットフォーム固有の違いを自動的に処理するモデル コンテキスト プロトコル サーバー。
Related MCP Servers
- AsecurityAlicenseAqualityA secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.Last updated -174PythonMIT License
- -securityFlicense-qualityA Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.Last updated -Python
- AsecurityAlicenseAqualityA Model Context Protocol server that provides secure command-line access to Windows systems, allowing MCP clients like Claude Desktop to safely execute commands in PowerShell, CMD, and Git Bash shells with configurable security controls.Last updated -9350105JavaScriptMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server implementation that enables secure remote command execution via SSH, with features for managing and using SSH credentials.Last updated -53JavaScript