Skip to content
下载《AI 应用 & AI Agent 开发新范式》电子书 了解构建 AI Agent 和 MCP Server 的一线实践Know more

Mcp Bridge Configuration Guide

Note

Currently, only the mcpbridge resource named default in the higress installation namespace is monitored

When using the Higress UI console, the corresponding entry for this configuration is located in the Service Sources menu item

McpBridge Field Description

FieldTypeDescriptionExampleRequired
registriesRegistryConfig ArraySupport configuring service sources from multiple different registry centers[]No
nameStringMcpBridge namedefaultYes, currently this value can only be default

RegistryConfig Field Description

FieldTypeDescriptionExample ValueRequired
typeStringService discovery type, options: nacos,nacos2,nacos3,zookeeper,consul,eureka,static,dnsnacos2Yes
nameStringCustom service source namemy-nacosYes
domainStringService discovery address, generally the registry center address; when the type is static or dns, this field is used to directly configure the backend address192.168.1.2Yes
portIntegerRegistry center access port8848Yes
protocolStringService protocol, only effective for static/dns types, supports HTTP/HTTPS/GRPC/GRPCS, default value is HTTPHTTPSNo
sniStringWhen protocol is HTTPS or GRPCS, used to set the SNI used during TLS handshakewww.example.comNo
zkServicesPathString ArrayWhen using zk, fill in the root path of service registration, by default monitors /dubbo and /services, the former is the default root path for dubbo services, the latter is the default root path for SpringCloud services[“/service-provider”]No
nacosNamespaceIdStringNacos namespace idd8ac64f3-xxxx-xxxx-xxxx-47a814ecf358No
nacosGroupsString ArrayNacos service group list[“DEFAULT_GROUP”]No
nacosAccessKeyStringNacos access key information when authentication is requiredxxxxNo
nacosSecretKeyStringNacos secret key information when authentication is requiredxxxxNo
nacosRefreshIntervalIntegerService refresh interval in nanoseconds when Nacos authentication is required30000000000 (30 seconds)No
mcpServerExportDomainsString ArrayDomains to expose when enabling mcp server, exposes on all domains if not filled[“example.com”,“a.test.com”]No
mcpServerBaseUrlStringURL or URL prefix to expose when enabling mcp server (e.g., when using nacos to aggregate multiple mcp servers)/mcp-serverNo
enableMCPServerBooleanWhether to enable MCPServer (currently only supports nacos3 type service sources)trueNo
consulDatacenterStringData center name when Consul authentication is requireddc1No
consulServiceTagStringService tag filter when Consul authentication is requiredhigressNo
consulRefreshIntervalIntegerService refresh interval in nanoseconds when Consul authentication is required30000000000 (30 seconds)No
authSecretNameStringService discovery authentication information Secret name, see details belowhigress-nacos-authNo

authSecretName Field Description

Service discovery source authentication information is stored in the corresponding Secret under the higress-system namespace. Currently, nacos and consul service discovery are supported.

Nacos authentication information includes username and password, consul authentication information includes authentication token. Specific Secret configuration examples are as follows:

Nacos Authentication

apiVersion: v1
data:
nacosPassword: aGlncmVzcw==
nacosUsername: aGlncmVzcw==
kind: Secret
metadata:
name: higress-nacos-auth
namespace: higress-system
type: Opaque

Consul Authentication

apiVersion: v1
data:
consulToken: NGFkZDE2NjUtNTM5NC03YzU1LTIzYTUtNzA4MDZkNTFiYzQy
kind: Secret
metadata:
name: higress-consul-auth
namespace: higress-system
type: Opaque

Support for Configuring Static Service Discovery Methods

Discover Services via Fixed IP

apiVersion: networking.higress.io/v1
kind: McpBridge
metadata:
name: default
namespace: higress-system
spec:
registries:
- domain: "1.1.1.1:80,2.2.2.2:80"
name: test
port: 80
type: static

Discover Services via DNS Domain Name

apiVersion: networking.higress.io/v1
kind: McpBridge
metadata:
name: default
namespace: higress-system
spec:
registries:
- domain: www.alibaba.com
name: alibaba
port: 443
protocol: HTTPS
type: dns