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
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SSH MCP Remotecheck disk usage on my NAS at 192.168.1.100"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 オブジェクトを文字列化したものが入ります。
セットアップ
リポジトリのルート (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 側で扱えるようになります。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.