All Products
Search
Document Center

API Gateway:ListMcpServers

Last Updated:Dec 25, 2025

Retrieves a list of MCP servers.

Operation description

You can call this operation to create multiple services at a time.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
apig:ListMcpServersnone
*All Resources
*
    none
none

Request syntax

GET /v1/mcp-servers HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
gatewayIdstringYes

The gateway instance ID.

gw-co370icmjeu****
nameLikestringNo

The name to perform a fuzzy search on the MCP server.

test
typestringNo

The type of the MCP server.

RealMCP
pageNumberintegerYes

The page number to return. Pages start from 1. Default value: 1.

1
pageSizeintegerYes

The number of entries per page. Default value: 10.

10
createFromTypesstringNo

The type of source to create from.

ApiGatewayHttpToMCP
deployStatusesstringNo

The deployment status of the MCP server.

Deployed

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

The request ID.

585657D2-1C20-5B8A-AF17-D727C6490BE4
codestring

The status code.

Ok
messagestring

The status message.

success
dataobject

The response payload.

pageNumberinteger

The page number.

1
pageSizeinteger

The page size.

10
totalSizeinteger

The total number of entries returned.

25
itemsarray<object>

The list of MCP servers.

itemsobject

The MCP server information.

mcpServerPathstring

The MCP server access path provided by the gateway.

/mcp-servers/test-mcp
mcpServerConfigstring

The HTTP-to-MCP configurations.

matchHttpRouteMatch

The route match rule.

descriptionstring

The description.

typestring

The type of the MCP server. Valid values: RealMCP and AssemblyMCP.

RealMCP
createFromTypestring

The type of source for MCP server creation. Valid values:

ApiGatewayHttpToMCP ApiGatewayMcpHosting ApiGatewayAssembly NacosHttpToMCP NacosMcpHosting

ApiGatewayHttpToMCP
domainIdsarray

The domain name IDs.

domainIdsstring

The domain name ID.

d-faefqfargz
protocolstring

The service protocol.

HTTP
environmentIdstring

The environment ID.

env-cq7l5s5lhtgi6qasrdc0
routeIdstring

The ID of the MCP server associated route.

hr-d11cj86m1hkvop6mp42g
mcpStatisticsEnableboolean

Indicates whether MCP observability is enabled. Default value: false.

false
namestring

The name of the MCP server.

itemcenter-dev-cluster
exposedUriPathstring

The exposed URI path. This parameter is required when the protocol parameter is set to SSE or StreamableHTTP, and the type parameter is set to RealMCP.

/sse
assembledSourcesarray<object>

The list of assembly sources. This parameter is required when the type parameter is set to AssemblyMCP.

assembledSourcesobject

The assembly source. This parameter is required when the type parameter is set to AssemblyMCP.

mcpServerNamestring

The name of the MCP server.

test-mcp
mcpServerIdstring

The MCP server ID.

mcp-adfef2334fa
toolsarray

The list of MCP tools.

toolsstring

The MCP tool.

tool-1
backendBackend

The backend service of the route.

mcpServerIdstring

The MCP server ID.

mcp-feaff34va
nacosMcpSyncInfoobject

The MCP information synchronized and managed by Nacos.

importMcpServerIdstring

The synchronized MCP server ID.

importNamespacestring

The Nacos namespace.

test-ns
importInstanceIdstring

The Nacos instance.

mse-faefrefxz
gatewayIdstring

The gateway instance ID.

gw-cpv54p5***
domainInfosarray

The list of domain information.

domainInfosHttpApiDomainInfo

The domain information.

deployStatusstring

The publishing status of the API in the current environment.

Deployed
apiIdstring

The API ID.

Examples

Sample success responses

JSONformat

{
  "requestId": "585657D2-1C20-5B8A-AF17-D727C6490BE4",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 25,
    "items": [
      {
        "mcpServerPath": "/mcp-servers/test-mcp",
        "mcpServerConfig": "",
        "match": {
          "ignoreUriCase": true,
          "path": {
            "type": "Prefix",
            "value": "/user"
          },
          "headers": [
            {
              "type": "Exact",
              "name": "dev",
              "value": true
            }
          ],
          "methods": [
            "GET"
          ],
          "queryParams": [
            {
              "type": "Exact",
              "name": "age",
              "value": 17
            }
          ]
        },
        "description": "",
        "type": "RealMCP",
        "createFromType": "ApiGatewayHttpToMCP",
        "domainIds": [
          "d-faefqfargz"
        ],
        "protocol": "HTTP",
        "environmentId": "env-cq7l5s5lhtgi6qasrdc0",
        "routeId": "hr-d11cj86m1hkvop6mp42g",
        "mcpStatisticsEnable": false,
        "name": "itemcenter-dev-cluster",
        "exposedUriPath": "/sse",
        "assembledSources": [
          {
            "mcpServerName": "test-mcp",
            "mcpServerId": "mcp-adfef2334fa",
            "tools": [
              "tool-1"
            ]
          }
        ],
        "backend": {
          "scene": "Single",
          "services": [
            {
              "serviceId": "service-cq2bmmdlhtgj***",
              "name": "item-service",
              "protocol": "HTTP",
              "port": 0,
              "weight": 49,
              "version": "v1"
            }
          ]
        },
        "mcpServerId": "mcp-feaff34va",
        "nacosMcpSyncInfo": {
          "importMcpServerId": "",
          "importNamespace": "test-ns",
          "importInstanceId": "mse-faefrefxz"
        },
        "gatewayId": "gw-cpv54p5***",
        "domainInfos": [
          {
            "domainId": "d-xxx",
            "name": "www.example.com",
            "protocol": "HTTP"
          }
        ],
        "deployStatus": "Deployed",
        "apiId": ""
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-10-29The response structure of the API has changedView Change Details