Remote Command MCP Server
リモートコマンドMCPサーバー
異なるオペレーティングシステム間でリモートコマンド実行を可能にするモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、シェルコマンドを実行するための統一されたインターフェースを提供し、WindowsとUnix系システム間のプラットフォーム固有の違いを自動的に処理します。
特徴
クロスプラットフォームのコマンド実行
WindowsとUnix間の自動コマンド正規化
組み込みのエラー処理と出力ストリーミング
作業ディレクトリ指定のサポート
プラットフォーム固有のシェルの選択
Related MCP server: MCP Shell Server
インストール
リポジトリをクローンします。
git clone https://github.com/deepsuthar496/Remote-Command-MCP
cd remote-command-server依存関係をインストールします:
npm installサーバーを構築します。
npm run build設定ファイルで MCP サーバーを構成します。
VSCode Cline 拡張機能 ( cline_mcp_settings.json ) の場合:
{
"mcpServers": {
"remote-command": {
"command": "node",
"args": ["path/to/remote-command-server/build/index.js"],
"disabled": false,
"autoApprove": []
}
}
}使用法
サーバーは、ホストマシン上で有効な任意のシェルコマンドを実行できるexecute_remote_commandという単一のツールを提供します。これには以下が含まれます。
システムコマンド
パッケージ マネージャー コマンド (apt、yum、chocolatey など)
開発ツール (git、npm、python など)
ファイル操作
ネットワークコマンド
サービス管理
システムで利用可能なその他のCLIコマンド
ツール: execute_remote_command
パラメータ:
command(必須): ホストOS上で実行できる有効なシェルコマンドcwd(オプション): コマンド実行のための作業ディレクトリ
例
システム情報:
<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
"command": "systeminfo" // Windows
// or "uname -a" // Linux
}
</arguments>
</use_mcp_tool>パッケージ管理:
<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
"command": "npm list -g --depth=0" // List global NPM packages
}
</arguments>
</use_mcp_tool>ネットワーク操作:
<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
"command": "netstat -an" // Show all network connections
}
</arguments>
</use_mcp_tool>Git 操作:
<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
"command": "git status",
"cwd": "/path/to/repo"
}
</arguments>
</use_mcp_tool>ファイル操作:
<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
"command": "ls -la", // List files with details
"cwd": "/path/to/directory"
}
</arguments>
</use_mcp_tool>プロセス管理:
<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
"command": "ps aux" // List all running processes (Unix)
// or "tasklist" // Windows equivalent
}
</arguments>
</use_mcp_tool>サービス制御:
<use_mcp_tool>
<server_name>remote-command</server_name>
<tool_name>execute_remote_command</tool_name>
<arguments>
{
"command": "systemctl status nginx" // Check service status (Linux)
// or "sc query nginx" // Windows equivalent
}
</arguments>
</use_mcp_tool>セキュリティに関する考慮事項
このサーバーは任意のシステム コマンドを実行できるため、次のセキュリティ プラクティスを考慮してください。
アクセス制御: MCP サーバーへのアクセスを信頼できるユーザーのみに制限します
コマンド検証: アプリケーションロジックで実行する前にコマンドを検証します
作業ディレクトリ:
cwdパラメータを使用して、コマンドの実行を特定のディレクトリに制限します。環境: システム設定や機密ファイルを変更するコマンドには注意してください
権限: 適切なユーザー権限でMCPサーバーを実行します
クロスプラットフォームのコマンド処理
サーバーはプラットフォーム固有の違いを自動的に処理します。
コマンド翻訳:
ls⟷dir(プラットフォームに応じて自動的に変換されます)各プラットフォームに適したパイプ演算子のフォーマット
シェルの選択:
Windows:
cmd.exeを使用しますUnix/Linux:
/bin/shを使用する
エラー処理
サーバーは詳細なエラーメッセージを提供し、応答には標準出力と標準エラー出力の両方が含まれます。コマンドが失敗した場合は、問題の詳細を含むエラーメッセージが表示されます。
エラー応答の例:
{
"content": [
{
"type": "text",
"text": "Command execution error: Command failed with exit code 1"
}
],
"isError": true
}発達
プロジェクト構造
remote-command-server/
├── src/
│ └── index.ts # Main server implementation
├── package.json
├── tsconfig.json
└── README.md建物
npm run buildこれにより、TypeScript コードがコンパイルされ、 buildディレクトリに実行可能ファイルが作成されます。
貢献
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.6MIT
- AlicenseCqualityDmaintenanceA secure server that implements the Model Context Protocol (MCP) to enable controlled execution of authorized shell commands with stdin support.1MIT
- AlicenseBqualityDmaintenanceA server that enables remote command execution over SSH through the Model Context Protocol (MCP), supporting both password and private key authentication.192MIT
- FlicenseAqualityDmaintenanceA local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.6292
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
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/deepsuthar496/Remote-Command-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server