UpdateMcpServer - 修改MCP Server

更新时间:
复制 MD 格式

更新MCP server。

接口说明

只有类型为容器服务的来源允许更新监听 Ingress 的配置。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

apig:UpdateMcpServer

none

*全部资源

*

请求语法

PUT /v1/mcp-servers/{mcpServerId} HTTP/1.1

路径参数

名称

类型

必填

描述

示例值

mcpServerId

string

MCP Server ID

mcp-adfefz24afg

请求参数

名称

类型

必填

描述

示例值

body

object

请求 Body。

description

string

描述

商品中心服务路由

domainIds

array

域名 ID。

string

域名 ID。

d-cr62ts5lhtgln***

match HttpRouteMatch

路由 Match 规则。

backendConfig

object

路由的后端服务配置。

scene

string

后端服务场景。

SingleService

services

array<object>

后端服务。

object

后端服务。

protocol

string

服务协议:

  • TCP。

  • HTTP。

  • DUBBO。

HTTP

port

integer

服务端口, 动态端口不传入。

8080

weight

integer

流量比例的百分比值。

49

serviceId

string

服务 ID。

svc-cr6pk4tlhtgm58e***

version

string

服务版本。

v1

exposedUriPath

string

暴露的 URI 路径,当 protocol 为 SSE 或 StreamableHTTP 且 type 为 RealMCP 时必填

/sse

assembledSources

array<object>

组装源列表,当 type 为 AssemblyMCP 时必填

object

组装源列表,当 type 为 AssemblyMCP 时必填

mcpServerName

string

MCP Server 名称

test-mcp

mcpServerId

string

MCP Server ID

mcp-afaefaefaf

tools

array

MCP 工具列表

string

MCP 工具列表

tool-1

mcpStatisticsEnable

boolean

是否启用 MCP 可观测,默认 false

false

type

string

MCP Server 类型筛选,可选值:RealMCP、AssemblyMCP

RealMCP

protocol

string

Protocol(协议类型) HTTP: HTTP 协议 HTTPS: HTTPS 协议 SSE: Server-Sent Events 协议 StreamableHTTP: 流式 HTTP 协议

HTTP

createFromType

string

创建来源类型

ApiGatewayHttpToMCP 网关托管 HTTP 转 MCP ApiGatewayProxyMcpHosting 网关托管 MCP 直接代理 ApiGatewayAssembly 网关 MCP 组装 NacosHttpToMCP 网关托管 NACOS 同步 HTTP 转 MCP NacosMcpHosting 网关托管 NACOS 同步 MCP 直接代理

枚举值:

  • ApiGatewayHttpToMCP :

    ApiGatewayHttpToMCP

  • ApiGatewayMcpHosting :

    ApiGatewayMcpHosting

  • ApiGatewayProxyMcpHosting :

    ApiGatewayProxyMcpHosting

  • ApiGatewayAssembly :

    ApiGatewayAssembly

  • NacosHttpToMCP :

    NacosHttpToMCP

  • NacosMcpHosting :

    NacosMcpHosting

ApiGatewayMcpHosting

grayMcpServerConfigs

array<object>

灰度 MCP Server 路由配置列表

array<object>

object

routeId

string

路由 ID

route-123

match HttpRouteMatch

路由匹配规则

backendConfig

object

后端配置

scene

string

后端场景

SingleService

services

array<object>

后端服务列表

object

object

protocol

string

服务协议

HTTP

port

integer

服务端口

8080

weight

integer

权重

100

serviceId

string

服务 ID

gray-svc-123

version

string

版本号

v1

mcpServerConfig

object

HTTP 转 MCP Config

swaggerConfig

string

HTTP 转 MCP 的 swagger 文档,需符合 3.0 规范

swagger-content

mcpServerSpec

string

MCP Server Config 配置,与 swaggerConfig 配置互斥

mcp-server-spec-yaml

返回参数

名称

类型

描述

示例值

object

Schema of Response

requestId

string

Id of the request

3ACFC7A7-45A9-58CF-B2D5-765B60254695

code

string

响应状态码。

Ok

message

string

响应消息。

success

示例

正常返回示例

JSON格式

{
  "requestId": "3ACFC7A7-45A9-58CF-B2D5-765B60254695",
  "code": "Ok",
  "message": "success"
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情