GetMcpServer

Updated at:

Retrieves an MCP server.

Operation description

You can use this operation to create multiple services.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

apig:GetMcpServer

none

*All Resource

*

None None

Request syntax

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

Path Parameters

Parameter

Type

Required

Description

Example

mcpServerId

string

No

The ID of the MCP server.

mcp-adfefz24afg

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

The response schema.

requestId

string

The ID of the request.

2A6E90D5-A711-54F4-A489-E33C2021EDDF

code

string

The response code.

Ok

message

string

The response message.

Success

data

object

The response data.

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.

测试专用MCP Server

gatewayId

string

The ID of the gateway instance.

gw-cq2vundlhtg***

environmentId

string

The environment ID.

env-cq7l5s5lhtgi6qasrdc0

routeId

string

The routing ID.

hr-cr82undlhtgrlej***

createFromType

string

The source type from which the MCP server was created.

ApiGatewayHttpToMCP: Converts HTTP requests to MCP requests in a gateway-managed environment.ApiGatewayMcpHosting: Directly proxies MCP requests in a gateway-managed environment.ApiGatewayAssembly: Assembles MCP requests in a gateway.NacosHttpToMCP: Converts HTTP requests to MCP requests and synchronizes with Nacos in a gateway-managed environment.NacosMcpHosting: Directly proxies MCP requests and synchronizes with Nacos in a gateway-managed environment.

ApiGatewayHttpToMCP

backend Backend

The backend service of the route.

match HttpRouteMatch

The match rule of the route.

{\"product_code\":\"apigw\"}

domainIds

array

A list of domain name IDs.

string

The domain name ID.

d-aafefqefz

domainInfos

array<object>

A list of domain name information.

object

protocol

string

The protocol.

HTTP,HTTPS

name

string

The domain name.

verifyicket

domainId

string

The domain name ID.

www.abc.com

protocol

string

The service protocol.

HTTP

mcpServerPath

string

The access path of the MCP server that is provided by the gateway.

/mcp-servers/test-mcp

exposedUriPath

string

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

/sse

nacosMcpSyncInfo

object

The sync information for the managed MCP in Nacos.

importInstanceId

string

The Nacos instance.

mse-xxxxx

importNamespace

string

The Nacos namespace.

test-ns

importMcpServerId

string

The ID of the synchronized MCP server.

test-mcp

assembledSources

array<object>

A list of assembly sources. This parameter is required when `type` is set to `AssemblyMCP`.

object

A list of assembly sources. This parameter is required when `type` 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

A list of MCP tools.

string

A list of MCP tools.

test-tool

mcpServerConfig

string

The configuration for converting HTTP requests to MCP requests.

MCP Server配置 base64

mcpServerConfigPluginAttachmentId

string

The ID of the attached MCP server plug-in configuration.

pa-adfaefwaef

deployStatus

string

The publishing status of the API in the current environment.

Deployed

mcpStatisticsEnable

boolean

Indicates whether to enable MCP observability. The default value is false.

false

grayMcpServerConfigs

array<object>

The grayscale routing configuration.

array<object>

The parameters.

routeId

string

The ID of the grayscale route.

gray-route-xxx

match HttpRouteMatch

The match rule for the grayscale route.

backendConfig

object

The backend configuration for the grayscale route.

scene

string

The backend scenario.

SingleService

services

array<object>

A list of service configurations.

object

The parameters.

protocol

string

The service protocol.

HTTP

port

integer

The service port.

8080

weight

integer

The service weight.

100

serviceId

string

The service ID.

svc-xxx

version

string

The service version.

v2.0.0

apiId

string

The API ID.

api-xxx

Examples

Success response

JSON format

{
  "requestId": "2A6E90D5-A711-54F4-A489-E33C2021EDDF",
  "code": "Ok",
  "message": "Success",
  "data": {
    "mcpServerId": "mcp-adfefz24afg",
    "name": "test-mcp",
    "type": "RealMCP",
    "description": "测试专用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,HTTPS",
        "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": "MCP Server配置 base64",
    "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"
            }
          ]
        }
      }
    ],
    "apiId": "api-xxx"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.