Skip to main content
Glama

Higress OPS MCP Server

Official

Higress OPS MCP サーバー

Higressの包括的な設定と管理を可能にするモデルコンテキストプロトコル(MCP)サーバー実装。このリポジトリは、 LangGraphおよびLangChain MCP アダプター上に構築された MCP クライアントも提供し、適切に設計されたエージェントフローアーキテクチャを通じて Higress MCP サーバーとのやり取りを容易にします。

デモ

https://github.com/user-attachments/assets/bae66b77-a158-452e-9196-98060bac0df7

環境変数の設定

.env.exampleファイルを.envにコピーし、対応する値を入力します。

MCPクライアントとMCPサーバーを起動する

stdioモードでは、MCPサーバープロセスはMCPクライアントプログラムによって起動されます。MCPクライアントとMCPサーバーを起動するには、以下のコマンドを実行します。

uv run client.py

新しいツールを追加する

ステップ1: 新しいツールクラスを作成するか、既存のツールクラスを拡張する

  • 完全に新しいツールカテゴリを追加する場合は、ツールディレクトリに新しいファイルを作成します。
  • または、既存のカテゴリに該当する場合は、ツールを既存のクラスに追加します。
from typing import Dict, List, Any from fastmcp import FastMCP class YourTools: def register_tools(self, mcp: FastMCP): @mcp.tool() async def your_tool_function(arg1: str, arg2: int) -> List[Dict]: """ Your tool description. Args: arg1: Description of arg1 arg2: Description of arg2 Returns: Description of the return value Raises: ValueError: If the request fails """ # Implementation using self.higress_client to make API calls return self.higress_client.your_api_method(arg1, arg2)

ステップ2: ツールがHigress Console APIと対話する必要がある場合は、HigressClientに新しいメソッドを追加します。

  • API呼び出しをカプセル化するメソッドをutils/higress_client.pyに追加する
  • 実際のAPI通信には既存のHTTPメソッド(get、put、post)を使用する
def your_api_method(self, arg1: str, arg2: int) -> List[Dict]: """ Description of what this API method does. Args: arg1: Description of arg1 arg2: Description of arg2 Returns: Response data Raises: ValueError: If the request fails """ path = "/v1/your/api/endpoint" data = {"arg1": arg1, "arg2": arg2} return self.put(path, data) # or self.get(path) or self.post(path, data)

ステップ3: ツールクラスをサーバーに登録する

  • server.pyのtool_classesリストにツールクラスを追加します。
  • このリストはToolsRegisterによってすべてのツールをインスタンス化して登録するために使用されます
  • ToolsRegisterはloggerとhigress_client属性を自動的に設定します
tool_classes = [ CommonTools, RequestBlockTools, RouteTools, ServiceSourceTools, YourTools # Add your tool class here ]

ステップ4: 人間による確認が必要な場合は、ツールをSENSITIVE_TOOLSに追加します。

  • このリストのツールは実行前に人間による確認が必要になります
# Define write operations that require human confirmation SENSITIVE_TOOLS = [ "add_route", "add_service_source", "update_route", "update_request_block_plugin", "update_service_source", "your_tool_function" # Add your tool name here if it requires confirmation ]
-
security - not tested
-
license - not tested
-
quality - not tested

適切に設計されたエージェント フロー アーキテクチャを通じて、Higress の包括的な構成と管理を可能にするモデル コンテキスト プロトコル サーバー。

  1. デモ
    1. 環境変数の設定
      1. MCPクライアントとMCPサーバーを起動する
        1. 新しいツールを追加する

          Related MCP Servers

          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that provides seamless interaction with Workato's API through custom AI tools, enabling management of recipes, connections, connectors, folders, and activity logs.
            Last updated -
            TypeScript
            MIT License
            • Apple
            • Linux
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides a comprehensive interface for interacting with the ConnectWise Manage API, simplifying API discovery, execution, and management for both developers and AI assistants.
            Last updated -
            46
            2
            Python
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables AI agents to interact with the Flow blockchain through RPC calls, supporting account balances, script execution, transactions, domain resolution, and contract interactions.
            Last updated -
            82
            JavaScript
          • -
            security
            F
            license
            -
            quality
            A utility module for creating Model Context Protocol servers declaratively, allowing developers to easily define tools, prompts, and resources with a simplified syntax.
            Last updated -
            64
            JavaScript

          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/higress-group/higress-ops-mcp-server'

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