All Products
Search
Document Center

API Gateway:GetMcpServer

Last Updated:Mar 30, 2026

Queries the detailed information of an MCP server.

Operation description

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.
Operation Access level Resource type Condition key Associated operation
apig:GetMcpServer none
*All Resources
*
    none
none

Request syntax

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

Request parameters

Parameter Type Required Description Example
mcpServerId string No

The MCP server ID.

mcp-adfefz24afg

Response parameters

Parameter Type Description Example
object

Schema of Response

requestId string

The request ID.

2A6E90D5-A711-54F4-A489-E33C2021EDDF
code string

The status code.

Ok
message string

The status message.

Success
data object

The response payload.

mcpServerId string

The ID of the MCP server.

mcp-adfefz24afg
name string

The name of the MCP server.

test-mcp
type string

The type of the MCP server.

RealMCP
description string

The description.

A sample MCP server
gatewayId string

The gateway instance ID.

gw-cq2vundlhtg***
environmentId string

The environment ID.

env-cq7l5s5lhtgi6qasrdc0
routeId string

The route ID.

hr-cr82undlhtgrlej***
createFromType string

Indicates the type of source for MCP server creation. Valid values:

ApiGatewayHttpToMCP ApiGatewayMcpHosting ApiGatewayAssembly NacosHttpToMCP NacosMcpHosting

ApiGatewayHttpToMCP
backend Backend

The backend service of the route.

match HttpRouteMatch

The route match rule.

domainIds array

The domain name IDs.

domainIds string

The domain name ID.

d-aafefqefz
domainInfos array<object>

The list of domain information.

domainInfos object

object

protocol string

The protocol. Valid values: HTTP and HTTPS.

HTTP
name string

The domain name.

verifyicket
domainId string

The domain name ID.

www.abc.com
protocol string

The service protocol.

HTTP
mcpServerPath string

The MCP server access path provided by the gateway.

/mcp-servers/test-mcp
exposedUriPath string

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
nacosMcpSyncInfo object

The MCP information managed and synchronized by Nacos.

importInstanceId string

The Nacos instance.

mse-xxxxx
importNamespace string

The Nacos namespace.

test-ns
importMcpServerId string

The synchronized MCP server ID.

test-mcp
assembledSources array<object>

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

assembledSources object

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

mcpServerName string

The name of the MCP server.

test-mcp
mcpServerId string

The ID of the MCP server.

mcp-xdafeafzz
tools array

The list of the MCP tools.

tools string

The MCP tool.

test-tool
mcpServerConfig string

The HTTP-to-MCP configurations.

config-yaml-content
mcpServerConfigPluginAttachmentId string

The attachment ID for the MCP server plug-in configuration.

pa-adfaefwaef
deployStatus string

The publishing status of the API in the current environment.

Deployed
mcpStatisticsEnable boolean

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

false
grayMcpServerConfigs array<object>

List of gray MCP server configurations

grayMcpServerConfigs object

object

routeId string

The gray route ID

gray-route-xxx
match HttpRouteMatch

The gray route matching rules

backendConfig object

The gray route backend configuration

scene string

The backend scene type

SingleService
services array<object>

List of backend services

services object

object

protocol string

The service protocol

HTTP
port integer

The service port

8080
weight integer

The service weight

100
serviceId string

The gray service ID

svc-xxx
version string

The service version

v2.0.0

Examples

Sample success responses

JSONformat

{
  "requestId": "2A6E90D5-A711-54F4-A489-E33C2021EDDF",
  "code": "Ok",
  "message": "Success",
  "data": {
    "mcpServerId": "mcp-adfefz24afg",
    "name": "test-mcp",
    "type": "RealMCP",
    "description": "A sample MCP server",
    "gatewayId": "gw-cq2vundlhtg***",
    "environmentId": "env-cq7l5s5lhtgi6qasrdc0\n",
    "routeId": "hr-cr82undlhtgrlej***",
    "createFromType": "ApiGatewayHttpToMCP",
    "backend": {
      "scene": "Single",
      "services": [
        {
          "serviceId": "service-cq2bmmdlhtgj***",
          "name": "item-service",
          "protocol": "HTTP",
          "port": 0,
          "weight": 49,
          "version": "v1"
        }
      ]
    },
    "match": {
      "ignoreUriCase": true,
      "path": {
        "type": "Prefix",
        "value": "/user"
      },
      "headers": [
        {
          "type": "Exact",
          "name": "dev",
          "value": true
        }
      ],
      "methods": [
        "GET"
      ],
      "queryParams": [
        {
          "type": "Exact",
          "name": "age",
          "value": 17
        }
      ]
    },
    "domainIds": [
      "d-aafefqefz"
    ],
    "domainInfos": [
      {
        "protocol": "HTTP",
        "name": "verifyicket",
        "domainId": "www.abc.com"
      }
    ],
    "protocol": "HTTP",
    "mcpServerPath": "/mcp-servers/test-mcp",
    "exposedUriPath": "/sse",
    "nacosMcpSyncInfo": {
      "importInstanceId": "mse-xxxxx",
      "importNamespace": "test-ns",
      "importMcpServerId": "test-mcp"
    },
    "assembledSources": [
      {
        "mcpServerName": "test-mcp",
        "mcpServerId": "mcp-xdafeafzz",
        "tools": [
          "test-tool"
        ]
      }
    ],
    "mcpServerConfig": "config-yaml-content",
    "mcpServerConfigPluginAttachmentId": "pa-adfaefwaef",
    "deployStatus": "Deployed",
    "mcpStatisticsEnable": false,
    "grayMcpServerConfigs": [
      {
        "routeId": "gray-route-xxx",
        "match": {
          "ignoreUriCase": true,
          "path": {
            "type": "Prefix",
            "value": "/user"
          },
          "headers": [
            {
              "type": "Exact",
              "name": "dev",
              "value": true
            }
          ],
          "methods": [
            "GET"
          ],
          "queryParams": [
            {
              "type": "Exact",
              "name": "age",
              "value": 17
            }
          ]
        },
        "backendConfig": {
          "scene": "SingleService",
          "services": [
            {
              "protocol": "HTTP",
              "port": 8080,
              "weight": 100,
              "serviceId": "svc-xxx",
              "version": "v2.0.0"
            }
          ]
        }
      }
    ]
  }
}

Error codes

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

Change history

Change time Summary of changes Operation
2025-12-05 The response structure of the API has changed View Change Details