GetApiMcpServer - 查询API MCP服务详细信息

查询API MCP服务详细信息。

调试

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

调试

授权信息

当前API暂无授权信息透出。

请求语法

GET /apimcpserver HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

id

string

API MCP 服务 ID。

v6ZZ7ftCzEILW***

返回参数

名称

类型

描述

示例值

object

请求结果。

requestId

string

请求 ID。

9BFC4AC1-6BE4-5405-BDEC-CA288D404812

id

string

API MCP 服务 ID。

v6ZZ7ftCzEILW***

description

string

API MCP 服务器的描述信息。

这是一个API MCP 服务器

apis

array<object>

API 信息列表。

object

API 信息。

product

string

产品 CODE。

  • 调用 GetRequestLog 接口,从返回结果中获取产品 CODE。

  • 通过 OpenAPI 门户的 URL,找到对应的产品 CODE。例如,短信服务的 OpenAPI 门户 URL 为 https://api.aliyun.com/product/Dysmsapi,根据该 URL 获取短信服务的产品 CODE 为 Dysmsapi。

Ecs

apiVersion

string

透出到 MCP SERVER 的 API 所属的 POP version。

2014-05-26

selectors

array

API 名称匹配规则列表。

string

API 名称匹配规则。

*Bucket

additionalApiDescriptions

array<object>

补充的 API 描述信息列表。

array<object>

补充的 API 描述信息。

apiVersion

string

透出到 MCP SERVER 的 API 所属的 POP version。

2014-05-26

product

string

产品 CODE。

  • 调用 GetRequestLog 接口,从返回结果中获取产品 CODE。

  • 通过 OpenAPI 门户的 URL,找到对应的产品 CODE。例如,短信服务的 OpenAPI 门户 URL 为 https://api.aliyun.com/product/Dysmsapi,根据该 URL 获取短信服务的产品 CODE 为 Dysmsapi。

Ecs

apiName

string

API 名称。

DescribeRegions

apiOverrideJson

string

API 元数据 JSON 格式,参考格式 https://api.aliyun.com/meta/v1/products/Ecs/versions/2014-05-26/apis/DescribeInstances/api.json,支持覆盖其中的 summary、parameters。

{ "summary": "本接口支持根据不同请求条件查询实例列表,并关联查询实例的详细信息。" }

executeCliCommand

boolean

是否返回 CLI 的执行命令,这个模式下,不真实执行 API 调用,返回对应的 CLI 命令,适用于长耗时的任务,需要搭配使用阿里云 CLI 执行。

true

enableOutputSchema

boolean

是否返回出参的 schema,返回出参 schema 时会增加整个 API MCP SERVER 的体积。默认值为 null,表示不返回出参的 schema。

true

constParameters

array<object>

常量入参列表,在 API 参数解析时,不再输出这部分参数。

object

常量入参。

key

string

参数名称。仅支持一级参数名称,对于 ROA 风格的 API,支持设置到 body.xx,不允许设置超出顶级参数的值。

InstanceId

value

any

参数的值。

1234

createTime

string

API MCP 服务器的创建时间。

2025-02-07T02:17:46Z

updateTime

string

API MCP 服务器的修改时间。

2025-02-05T02:26:04Z

prompts

array<object>

prompt 配置列表。

array<object>

prompt 配置

name

string

prompt 名称。

test

description

string

描述信息。

prompt description

content

string

prompt 的内容信息,其变量通过 {{xxx}} 格式指定。xxx 为变量,需要从 arguments 参数中定义。

prompt正文,{{name}}

arguments

array<object>

prompt 支持的参数列表。

object

prompt 支持的参数。

name

string

参数名称。

test

description

string

参数的描述信息。

argument description

required

boolean

该参数是否必填。

language

string

API MCP 服务的文档语言。支持选择中文或英文 API 文档,不同的语言提示词对 AI 的回复效果可能产生差异。

枚举值:

  • EN_US :

    EN_US

  • ZH_CN :

    ZH_CN

ZH_CN

urls

object

MCP SERVER 连接信息。

sse

string

SSE 协议连接信息。

https://openapi-mcp.cn-hangzhou.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/sse

vpcSse

string

VPC 下 SSE 协议连接地址。

https://openapi-mcp-cn.vpc-proxy.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/sse

mcp

string

streamable HTTP 协议连接信息,推荐使用。

https://openapi-mcp.cn-hangzhou.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/mcp

vpcMcp

string

VPC 下 streamable HTTP 协议连接地址。

https://openapi-mcp-cn.vpc-proxy.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/mcp

systemTools

array

系统工具列表。

string

系统工具名称。

FetchRamActionDetails

name

string

MCP SERVER 名称信息,由 a-z0-9 组成,3-64 位,不以数字开头,同主账号下必须唯一。

mcp-demo

requiredRAMPolicy

string

该 API MCP 服务需要的 RAM 权限策略。

{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "ecs:Describe*", "vpc:Describe*", "vpc:List*" ], "Resource": "*" } ] }

apiInfos

array<object>

API MCP 服务的 API 信息列表。

object

API MCP 服务的 API 信息。

product

string

产品 CODE。

  • 调用 GetRequestLog 接口,从返回结果中获取产品 CODE。

  • 通过 OpenAPI 门户的 URL,找到对应的产品 CODE。例如,短信服务的 OpenAPI 门户 URL 为 https://api.aliyun.com/product/Dysmsapi,根据该 URL 获取短信服务的产品 CODE 为 Dysmsapi。

Ecs

apiVersion

string

透出到 MCP SERVER 的 API 所属的 POP version。

2014-05-26

apiName

string

API 名称。

DescribeRegions

sourceType

string

API MCP 服务类型。

  • custom 自定义服务

  • system 系统服务

system

systemMcpServerInfo

object

系统 MCP 服务列表。

product

string

产品 CODE。

  • 调用 GetRequestLog 接口,从返回结果中获取产品 CODE。

  • 通过 OpenAPI 门户的 URL,找到对应的产品 CODE。例如,短信服务的 OpenAPI 门户 URL 为 https://api.aliyun.com/product/Dysmsapi,根据该 URL 获取短信服务的产品 CODE 为 Dysmsapi。

Ecs

name

string

系统 MCP 服务名称。

mcp-system

oauthClientId

string

选择自定义 OAuth 配置时的自定义 OAuth Client ID。

仅支持 Web/Native 应用,且 OAuth 范围必须包含 /acs/mcp-server

403*************370

terraformTools

array<object>

Terraform Tool 列表。

object

Terraform Tool。

code

string

Terraform Tool 代码。HCL 语言概述

variable "name" { default = "terraform-example" } provider "alicloud" { region = "cn-beijing" } resource "alicloud_vpc" "default" { ipv6_isp = "BGP" description = "test" cidr_block = "10.0.0.0/8" vpc_name = var.name enable_ipv6 = true }

name

string

Terraform Tool 名称。

test

description

string

Terraform Tool 描述信息。

Terraform Tool description

async

boolean

是否为异步执行,即发起一个任务执行之后会立即处理下一个任务,而不等待每个资源操作完成。

true

destroyPolicy

string

删除策略,任务执行完成后,系统根据任务执行状态对临时资源采取以下清理策略。

  • NEVER 不删除:无论任务执行成功或失败,均不删除所有创建的资源

  • ALWAYS 总是删除:无论任务执行成功或失败,执行完成立即销毁所有相关资源

  • ON_FAILURE 失败时删除:仅当任务执行失败时,删除相关资源;当任务执行成功时,则保留这些资源

枚举值:

  • ON_FAILURE :

    ON_FAILURE

  • NEVER :

    NEVER

  • ALWAYS :

    ALWAYS

ON_FAILURE

instructions

string

MCP 指令,用于提示大模型如何使用该 MCP,需要客户端支持 MCP 标准协议的 Instructions 字段。

test

enableAssumeRole

boolean

是否开启多账号访问。

true

assumeRoleName

string

开启多账号访问进行跨账号操作时,扮演的目标账号 RAM 角色名称。

test

assumeRoleExtraPolicy

string

开启多账号访问时,角色扮演额外的策略,该策略存在时,角色扮演的权限以当前值为准,覆盖角色本身的权限定义。

{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "ecs:Describe*", "vpc:Describe*", "vpc:List*" ], "Resource": "*" } ] }

publicAccess

string

是否开启公网。

on

enableCustomVpcWhitelist

boolean

是否开启自定义 VPC 白名单,不开启则跟随账户级别的配置。

true

vpcWhitelists

array

关闭公网访问后,限定来源的 VPC 白名单,不设置或为空表示不限制来源。

string

每一个限定的 VPC 白名单,值为来源 VPC ID。

vpc-j6cgd2if5lg**0xs6m5se

示例

正常返回示例

JSON格式

{
  "requestId": "\t\n9BFC4AC1-6BE4-5405-BDEC-CA288D404812\n",
  "id": "v6ZZ7ftCzEILW***",
  "description": "这是一个API MCP 服务器",
  "apis": [
    {
      "product": "Ecs",
      "apiVersion": "2014-05-26",
      "selectors": [
        "*Bucket"
      ]
    }
  ],
  "additionalApiDescriptions": [
    {
      "apiVersion": "2014-05-26",
      "product": "Ecs",
      "apiName": "DescribeRegions",
      "apiOverrideJson": "{\n  \"summary\": \"本接口支持根据不同请求条件查询实例列表,并关联查询实例的详细信息。\"\n}",
      "executeCliCommand": true,
      "enableOutputSchema": true,
      "constParameters": [
        {
          "key": "InstanceId",
          "value": "1234"
        }
      ]
    }
  ],
  "createTime": "2025-02-07T02:17:46Z",
  "updateTime": "2025-02-05T02:26:04Z",
  "prompts": [
    {
      "name": "test",
      "description": "prompt description",
      "content": "prompt正文,{{name}}",
      "arguments": [
        {
          "name": "test",
          "description": "argument description",
          "required": true
        }
      ]
    }
  ],
  "language": "ZH_CN",
  "urls": {
    "sse": "https://openapi-mcp.cn-hangzhou.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/sse",
    "vpcSse": "https://openapi-mcp-cn.vpc-proxy.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/sse",
    "mcp": "https://openapi-mcp.cn-hangzhou.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/mcp",
    "vpcMcp": "https://openapi-mcp-cn.vpc-proxy.aliyuncs.com/accounts/xxxx/custom/xxx/id/xxxx/mcp"
  },
  "systemTools": [
    "FetchRamActionDetails"
  ],
  "name": "mcp-demo",
  "requiredRAMPolicy": "{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"ecs:Describe*\",\n        \"vpc:Describe*\",\n        \"vpc:List*\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}",
  "apiInfos": [
    {
      "product": "Ecs",
      "apiVersion": "2014-05-26",
      "apiName": "DescribeRegions"
    }
  ],
  "sourceType": "system",
  "systemMcpServerInfo": {
    "product": "Ecs",
    "name": "mcp-system"
  },
  "oauthClientId": "403*************370",
  "terraformTools": [
    {
      "code": "variable \"name\" {\n  default = \"terraform-example\"\n}\n\nprovider \"alicloud\" {\n  region = \"cn-beijing\"\n}\n\nresource \"alicloud_vpc\" \"default\" {\n  ipv6_isp    = \"BGP\"\n  description = \"test\"\n  cidr_block  = \"10.0.0.0/8\"\n  vpc_name    = var.name\n  enable_ipv6 = true\n}",
      "name": "test",
      "description": "Terraform Tool description",
      "async": true,
      "destroyPolicy": "ON_FAILURE"
    }
  ],
  "instructions": "test",
  "enableAssumeRole": true,
  "assumeRoleName": "test",
  "assumeRoleExtraPolicy": "{\n  \"Version\": \"1\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"ecs:Describe*\",\n        \"vpc:Describe*\",\n        \"vpc:List*\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}",
  "publicAccess": "on",
  "enableCustomVpcWhitelist": true,
  "vpcWhitelists": [
    "vpc-j6cgd2if5lg**0xs6m5se"
  ]
}

错误码

HTTP status code

错误码

错误信息

描述

400 Missing.Id Id is mandatory for this action. 缺少必填参数Id。
500 InternalServerError The request has failed due to a temporary failure of the server. 由于服务器暂时故障,请求失败。
404 NotFound.ApiMcpServer Specified MCP server not found. 指定idMCP服务不存在。

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

变更历史

更多信息,参考变更详情