Skip to main content
Glama

Higress OPS MCP Server

Official

Servidor MCP de Higress OPS

Una implementación de servidor de Protocolo de Contexto de Modelo (MCP) que permite la configuración y gestión integral de Higress . Este repositorio también proporciona un cliente MCP basado en adaptadores MCP de LangGraph y LangChain, lo que facilita la interacción con el servidor MCP de Higress mediante una arquitectura de flujo de agentes bien diseñada.

Manifestación

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

Variables de entorno de configuración

Copie el archivo .env.example a .env y complete los valores correspondientes.

Iniciar el cliente MCP y el servidor MCP

En el modo stdio, el proceso del servidor MCP lo inicia el programa cliente MCP. Ejecute el siguiente comando para iniciar el cliente y el servidor MCP:

uv run client.py

Agregar una nueva herramienta

Paso 1: Crear una nueva clase de herramienta o ampliar una existente

  • Cree un nuevo archivo en el directorio de herramientas si agrega una categoría de herramientas completamente nueva
  • O agregue su herramienta a una clase existente si se ajusta a una categoría existente
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)

Paso 2: agregue un nuevo método a HigressClient si su herramienta necesita interactuar con la API de la consola de Higress

  • Agregue métodos a utils/higress_client.py que encapsulen las llamadas API
  • Utilice los métodos HTTP existentes (get, put, post) para la comunicación API real
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)

Paso 3: Registra tu clase de herramienta en el servidor

  • Agregue su clase de herramienta a la lista tool_classes en server.py
  • ToolsRegister utiliza esta lista para instanciar y registrar todas las herramientas.
  • ToolsRegister establecerá automáticamente los atributos logger y higress_client
tool_classes = [ CommonTools, RequestBlockTools, RouteTools, ServiceSourceTools, YourTools # Add your tool class here ]

Paso 4: Agregue su herramienta a SENSITIVE_TOOLS si requiere confirmación humana

  • Las herramientas de esta lista requerirán confirmación humana antes de su ejecución.
# 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
F
license - not found
-
quality - not tested

Un servidor de protocolo de contexto de modelo que permite la configuración y gestión integral de Higress a través de una arquitectura de flujo de agente bien diseñada.

  1. Manifestación
    1. Variables de entorno de configuración
      1. Iniciar el cliente MCP y el servidor MCP
        1. Agregar una nueva herramienta

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that enables AI models to perform real-time internet and knowledge searches through Higress, enhancing model responses with up-to-date information from Google, Bing, Arxiv, and internal knowledge bases.
            Last updated -
            1
            5
            Python
            Apache 2.0
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that enables integration with the TESS API, allowing users to list and manage agents, execute agents with custom messages, and manage files through natural language interfaces.
            Last updated -
            TypeScript
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that allows language models to manage Hetzner Cloud resources through structured functions, including servers, volumes, firewalls, and SSH keys.
            Last updated -
            33
            Python
            MIT License
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that provides a comprehensive interface to Alteryx Servers, enabling AI assistants to manage workflows, collections, users, schedules, credentials, and more.
            Last updated -
            43
            8
            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/higress-group/higress-ops-mcp-server'

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