Skip to main content
Glama
bowling233

Network Operator MCP

by bowling233

Network Operator MCP

network-operator-mcp を使用すると、エージェントはデバイスの認証情報をMCPサーバー内に保持したまま、ネットワークデバイスの管理インターフェースを操作できます。

サーバーは以下のデバイスバックエンドをサポートしています:

  • ssh-terminal: 対話型ネットワークCLI用の永続的なSSH PTY。

  • ssh-exec: ツール呼び出しごとに1つの標準SSH execリクエスト。

  • http-tplink-switch: TP-LinkスイッチのWebUI API。

  • http-zte-be7200: ZTE BE7200 Pro+のWebUI API。

  • http-mellanox-onyx: Mellanox OnyxのWebUI API。

サーバーはコマンド、プロンプト、APIレスポンスを解釈しません。エージェントと選択されたデバイス間でリクエストとレスポンスを転送するだけです。

テスト済みデバイス

ベンダーとモデル

ソフトウェア

バックエンド

Huawei S1730S-S48T4X-A1

VRP 5.170 (V200R022C00SPC500)

ssh-terminal

Huawei S5720-28P-LI-AC

VRP 5.170 (V200R011C10SPC600)

ssh-terminal

Huawei S5720S-52P-LI-AC

VRP 5.170 (V200R011C10SPC600)

ssh-terminal

Huawei FutureMatrix S6720S-S24S28X-A

VRP 5.170 (V200R022C00SPC500)

ssh-terminal

MikroTik CCR2004-1G-12S+2XS (r3)

RouterOS 7.23.1 stable

ssh-exec

OpenWrt and ImmortalWrt devices

Various

ssh-exec

TP-Link TL-SG2226

2023 WebUI

http-tplink-switch

TP-Link TL-SG2024D

2023 WebUI

http-tplink-switch

TP-Link TL-SE2206

2024 WebUI

http-tplink-switch

ZTE BE7200 Pro+

V1.0.0.4B8.8000

http-zte-be7200

Mellanox SN2700

Onyx 3.7.1134

http-mellanox-onyx

Related MCP server: SSH MCP Server

設定

backends:
  ssh-terminal:
    connect_timeout_seconds: 15
    default_quiet_timeout_ms: 1000
    default_deadline_ms: 15000
    default_response_limit_bytes: 200000
    max_sessions: 10
    session_idle_ttl_seconds: 600
    max_session_lifetime_seconds: 3600
  ssh-exec:
    connect_timeout_seconds: 15
    default_command_timeout_seconds: 60
  http:
    connect_timeout_seconds: 10
    default_request_timeout_seconds: 30
    max_response_bytes: 2000000

accounts:
  ssh-operator:
    username: netadmin
    password: plaintext-password

  web-operator:
    username: webadmin
    password: plaintext-password

  zte-password:
    password: plaintext-password

devices:
  example-huawei:
    type: ssh-terminal
    host: 192.0.2.10
    account: ssh-operator

  example-tplink:
    type: http-tplink-switch
    host: 192.0.2.20
    account: web-operator

  example-zte:
    type: http-zte-be7200
    host: 192.0.2.30
    account: zte-password

  example-onyx:
    type: http-mellanox-onyx
    host: 192.0.2.40
    account: web-operator
    verify_tls: false

アカウントは複数のデバイスで共有できます。SSHアカウントはpassword、インラインのprivate_key、およびオプションのprivate_key_passphraseを使用できます。ZTEバックエンドは、その製品に固定のWebUIユーザー名があるため、パスワードのみのアカウントを受け入れます。

HTTPはデフォルトでポート80を使用しますが、http-mellanox-onyxはHTTPSポート443がデフォルトです。デバイスの設定がこれらのデフォルトと異なる場合は、デバイスにschemeportverify_tlsを設定してください。完全なプレースホルダー設定はconfig/devices.example.yamlにあります。

MCPツール

ツール

デバイスバックエンド

目的

list_devices

すべて

設定済みのデバイス名とバックエンドタイプを一覧表示します。

ssh_execute

ssh-exec

1つのSSH execリクエストを実行します。

open_session

ssh-terminal

デバイスのターミナルを開くか再利用します。

list_sessions

ssh-terminal

開いているターミナルを一覧表示します。

exchange

ssh-terminal

ターミナル入力を書き込み、出力を読み取ります。

read_session

ssh-terminal

バイトカーソルから出力を読み取ります。

close_session

ssh-terminal

デバイスのターミナルを閉じます。

http_request

HTTPバックエンド

認証済みのWebUI APIリクエストを送信します。

HTTPリクエスト

http_requestは、設定済みのdevice、HTTP method、およびデバイス相対のpathを受け入れます。オプションの引数はqueryheadersbodybody_base64formtimeout_secondsです。bodybody_base64formのうち最大1つだけを指定してください。

MCPサーバーは認証情報、Cookie、デバイストークンを管理します。呼び出し元は認証情報を含むヘッダーを指定できず、機密性の高い認証ヘッダーは返されません。エージェントのリクエストからのリダイレクトは自動的に追跡されず、エージェントに返されます。テキストレスポンスは直接返されます。バイナリレスポンスはbase64を使用し、body_encodingbase64に設定します。

例:

{
  "device": "example-zte",
  "method": "POST",
  "path": "/?_type=vueData&_tag=vuecfg_data",
  "form": {
    "IF_ACTION": "Get"
  }
}

SSHターミナル

各ターミナルにはバックグラウンドリーダーがあり、デバイスの出力を一時的なトランスクリプトに追記します。最初のexchangeinitial_output.next_cursorを引き継ぎ、その後は返された各next_cursorを前方に引き継ぎます。クワイエットタイムアウトは、その期間中に新しいバイトが到着しなかったことを意味するだけで、コマンドが完了したことを証明するものではありません。

MCPサーバーを再起動すると、アクティブなSSH接続は必ず閉じられ、そのトランスクリプトは破棄されます。デバイスに対してopen_sessionを再度呼び出し、新しい初期カーソルで続行してください。

状態

SSHターミナルはデバイス名でキー付けされ、MCPクライアントセッションが所有するものではありません。ツールはターミナルセッション識別子を公開も受け入れもしません。Streamable HTTPトランスポートもステートレスであるため、MCPサーバーを再起動しても、クライアントが古いMCPセッション識別子を保持したままになることはありません。

サーバーの実行

設定を検証します:

network-operator-mcp --config config/devices.local.yaml validate-config

stdioで実行します:

network-operator-mcp --config config/devices.local.yaml serve

Streamable HTTPで実行します:

network-operator-mcp --config config/devices.local.yaml serve \
  --transport streamable-http --host 127.0.0.1 --port 8000

サーバーはsseトランスポートもサポートしています。

セキュリティに関する注意事項

  • 設定ファイルには平文の認証情報が含まれるため、保護してください。

  • SSHサーバーのホストキーは検証されません。

  • デバイスが信頼できる証明書を持っている場合は、TLS検証を有効にしたままにしてください。WebUI証明書を検証できないデバイスにのみverify_tls: falseを使用してください。

  • MCPトランスポートは信頼できるエージェントとユーザーにのみ公開してください。HTTP API呼び出しはデバイス設定を変更できます。

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    Enables seamless SSH operations including secure connections, file transfers, interactive shell sessions, and Docker container management on remote servers. Supports both password and SSH key authentication with credential management and connection pooling.
    18
  • A
    license
    A
    quality
    C
    maintenance
    Enables remote server management through SSH and SFTP, supporting command execution, file transfers, and interactive shell sessions. It allows for multiple concurrent connections using either password or SSH key authentication.
    11
    19
    4
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables secure SSH connections to remote servers for executing shell commands and managing active sessions. It supports authentication via passwords or private keys and provides optional host-based access control.
    4
    210
    MIT

Latest Blog Posts

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/bowling233/network-operator-mcp'

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