Skip to main content
Glama

MCP Tunnel

by leomercier

MCPトンネル

VMマシンのコマンドラインへのアクセスを可能にするシンプルなMCP(Model Context Protocol)サーバーです。起動すると、ホストをWebにトンネリングし、MCP経由でアクセスできるようになります。

特徴

  • MCP を介して VM 上でシェル コマンドを実行する
  • VMとの対話のためのWebベースの端末インターフェース
  • 自動トンネリングにより、どこからでも VM にアクセス可能
  • WebSocketベースのリアルタイム通信

前提条件

  • Node.js (v18以降)

インストールと使用方法

npx で実行 (インストール不要)

npx mcp-cli

グローバルインストール

npm install -g mcp-cli mcp-cli

地域開発

# Clone repository git clone [repository-url] cd mcp-cli # Install dependencies npm install

発達

バックエンドとフロントエンドの両方でホットリロードを使用して開発サーバーを実行します。

npm run dev

建物

本番環境用にフロントエンドとバックエンドの両方を構築します。

npm run build-all

使用法

  1. MCP サーバーを起動します。
# Start with automatic tunneling npm start # Start without automatic tunneling npm start -- --no-tunnel

プロジェクトがビルドされ、サーバーが起動します。デフォルトでは、トンネルが自動的に作成されます。自動トンネリングを無効にするには、 --no-tunnelフラグを使用してください。

  1. サーバーが起動し、stderr に出力を提供します (stdout での MCP 通信を妨害しないようにするため)
  2. MCP を使用して、次のツールを使用してサーバーと対話します。

利用可能なMCPツール

  • execute_command : VM上でシェルコマンドを実行する
    • パラメータ: { "command": "your shell command" }
  • start_tunnel : VMインターフェースにアクセスするためのWebトンネルを作成する
    • パラメータ: { "port": 8080, "subdomain": "optional-subdomain" }

ウェブインターフェース

トンネルを開始すると、トンネルから提供されたURLでWebベースのターミナルインターフェースにアクセスできます。このインターフェースでは、以下の操作が可能です。

  • VM内で直接コマンドを実行する
  • コマンド出力をリアルタイムで確認
  • ウェブアクセスのあるあらゆるデバイスから VM を操作します

環境変数

サーバーを構成するための.envファイルを作成します。

# Server configuration PORT=8080 # Localtunnel configuration LOCALTUNNEL_SUBDOMAIN=your-preferred-subdomain

セキュリティに関する考慮事項

このツールは、VMのコマンドラインに直接アクセスできるようにします。以下のセキュリティ対策を検討してください。

  • トンネルを公開する前に強力な認証メカニズムを使用する
  • 適切な検証を通じて実行できるコマンドを制限する
  • 制限された環境での実行を検討する
  • トンネルを通じて機密情報を公開しないでください
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

ウェブベースのターミナル インターフェイスを介して VM マシン上のシェル コマンドにアクセスして実行できるシンプルな MCP サーバーです。自動トンネリングにより、どこからでも VM にアクセスできるようになります。

  1. 特徴
    1. 前提条件
      1. インストールと使用方法
        1. npx で実行 (インストール不要)
        2. グローバルインストール
        3. 地域開発
      2. 発達
        1. 建物
          1. 使用法
            1. 利用可能なMCPツール
          2. ウェブインターフェース
            1. 環境変数
              1. セキュリティに関する考慮事項

                Related MCP Servers

                • -
                  security
                  F
                  license
                  -
                  quality
                  A simple MCP server that allows running terminal commands with output capture, enabling command execution on the host system from MCP-compatible clients like Claude Desktop.
                  Last updated -
                  1
                  Python
                • A
                  security
                  A
                  license
                  A
                  quality
                  A server that enables secure interaction with remote SSH hosts through standardized MCP interface, providing functions like listing hosts, executing commands, and transferring files using native SSH tools.
                  Last updated -
                  7
                  37
                  13
                  JavaScript
                  MIT License
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A unified remote terminal management server that simplifies complex SSH connections and server management through MCP protocol, allowing users to control multiple remote servers with natural language commands as easily as local operations.
                  Last updated -
                  13
                  3
                  Python
                  • Apple
                  • Linux
                • -
                  security
                  F
                  license
                  -
                  quality
                  A simple MCP server that provides a terminal tool for executing shell commands with safety features like timeouts and error handling.
                  Last updated -
                  Python

                View all related MCP servers

                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/leomercier/mcp-tunnel'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server