SSH MCP Remote
Uses Express framework to provide an HTTP+SSE server that exposes MCP-style endpoints for tool invocation including SSH command execution
Enables execution of commands on remote Linux systems via SSH, including NAS devices and VPS hosts
Implements an MCP-style remote server using Node.js that provides tools for executing commands on remote hosts over SSH
Supports deployment as a cloud-hosted MCP server for remote SSH command execution
Supports deployment as a cloud-hosted MCP server for remote SSH command execution
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ssh-mcp-remote
Remote MCP-style HTTP+SSE server that exposes simple tools including ssh.exec for executing commands on remote hosts over SSH.
概要
Node.js + Express による HTTP サーバー
MCP Remote Connector から利用できるような形で、以下の 2 エンドポイントを提供します:
GET /sse: サーバーからのイベントを受け取るための SSE ストリームPOST /query: MCP 風のツール呼び出し (search,fetch,ssh.exec)
レスポンスは MCP 互換の形に近づけるため、必ず次の形を返します:
{ "content": [ { "type": "text", "text": "<JSON文字列>" } ] }textフィールド内に、実際の JSON オブジェクトを文字列化したものが入ります。
Related MCP server: SSH MCP Server
セットアップ
リポジトリのルート (ghostfolio) で依存をインストールします。
cd ssh-mcp-remote
npm install起動方法
cd ssh-mcp-remote
npm startデフォルトではポート 8787 で起動します。Replit や Render などのホスティング環境では、環境変数 PORT が自動的に付与されるため、それを利用してリッスンします。
起動後:
http://localhost:8787/: ヘルスチェック用の簡単な JSON レスポンスhttp://localhost:8787/sse: SSE ストリーム (ブラウザや MCP Remote Connector が接続)POST http://localhost:8787/query: MCP 風ツール呼び出し
/query の使い方
search ツール (ダミー)
curl -X POST http://localhost:8787/query \
-H "Content-Type: application/json" \
-d '{
"tool": "search",
"query": "ssh"
}'返り値は ssh ツール 1 件だけを含むダミーのレスポンスです。
fetch ツール (ダミー)
curl -X POST http://localhost:8787/query \
-H "Content-Type: application/json" \
-d '{
"tool": "fetch",
"id": "ssh"
}'search と同様のダミー応答を返します。
ssh.exec ツール
curl -X POST http://localhost:8787/query \
-H "Content-Type: application/json" \
-d '{
"tool": "ssh.exec",
"args": {
"host": "192.168.0.x",
"user": "mizuki",
"password": "your-password",
"command": "ls -la"
}
}'または username や privateKey も利用可能です:
curl -X POST http://localhost:8787/query \
-H "Content-Type: application/json" \
-d '{
"tool": "ssh.exec",
"args": {
"host": "192.168.0.x",
"username": "mizuki",
"privateKey": "C:/Users/you/.ssh/id_rsa",
"command": "uname -a"
}
}'レスポンスの content[0].text 内には、次のような JSON 文字列が入ります:
{
"host": "192.168.0.x",
"user": "mizuki",
"command": "ls -la",
"stdout": "...",
"stderr": "...",
"code": 0,
"error": null
}同時に、SSE に接続しているクライアントには type: "ssh.exec.result" のイベントとして同じ内容が PUSH されます。
ChatGPT MCP Remote Connector への登録例
実際の UI や設定方法は ChatGPT のバージョンによって異なります。ここでは概念的な例を示します。
Server URL (ローカル):
http://localhost:8787SSE Endpoint:
/sseQuery Endpoint:
/query
Remote MCP Connector の設定画面が以下のような項目を要求する場合:
Base URL:
http://localhost:8787SSE Path:
/sseQuery Path:
/query
と設定すれば、このサーバーが Remote MCP として機能します。
クラウド (Replit / Render) にデプロイした場合の URL 例
Replit や Render にこのプロジェクトをデプロイした場合、ベース URL は以下のようになります。
Base URL (Render):
https://ssh-mcp-remote.onrender.com(サービス名に応じて変わります)Base URL (Replit):
https://your-repl-name.your-username.repl.coSSE Path:
/sseQuery Path:
/query
ChatGPT MCP Remote Connector 側では、上記の Base URL とパスを指定してください。
例: Render に ssh-mcp-remote という名前でデプロイした場合:
Base URL:
https://ssh-mcp-remote.onrender.comSSE Path:
/sseQuery Path:
/query
推奨コマンドまとめ
# セットアップ
cd ssh-mcp-remote
npm install
# 起動
npm start
# 動作確認 (例: ssh.exec)
curl -X POST http://localhost:8787/query \
-H "Content-Type: application/json" \
-d '{
"tool": "ssh.exec",
"args": {
"host": "192.168.0.x",
"user": "mizuki",
"password": "your-password",
"command": "ls -la"
}
}'この構成を元に、ChatGPT MCP Remote Connector から ssh.exec を呼び出せば、NAS や Linux/VPS 上でコマンドを実行し、その結果を ChatGPT 側で扱えるようになります。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Manage servers through SSH.
Work on your own computers from Claude or ChatGPT: run commands, edit and search files.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables SSH connections and remote command execution with persistent session management and real-time browser-based terminal monitoring. Supports multiple simultaneous SSH sessions with command history tracking and live WebSocket streaming of terminal output.6MIT
- AlicenseBqualityDmaintenanceEnables SSH connectivity and remote command execution on servers, allowing users to test connections and run commands remotely with support for both local networks and public servers.220 npm1ISC
- AlicenseAqualityBmaintenanceA server that enables LLMs to securely manage and execute commands on remote SSH servers.631 PyPI3MIT
- FlicenseNot gradedqualityDmaintenanceEnables remote server management via SSH, including command execution, file transfer (SFTP), and interactive shell sessions, with support for multiple hosts.-