Get the MCP server.
Operation description
This API supports creating multiple services.
Try it now
Test
RAM authorization
|
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 data returned. |
|
| 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 of the MCP Server. |
测试专用MCP Server |
| gatewayId |
string |
The ID of the gateway instance. |
gw-cq2vundlhtg*** |
| environmentId |
string |
The ID of the environment. |
env-cq7l5s5lhtgi6qasrdc0 |
| routeId |
string |
The ID of the route. |
hr-cr82undlhtgrlej*** |
| createFromType |
string |
Specifies how the MCP Server was created. Valid values:
|
ApiGatewayHttpToMCP |
| backend | Backend |
The backend service of the route. |
|
| match | HttpRouteMatch |
The match rule for the route. |
{\"product_code\":\"apigw\"} |
| domainIds |
array |
A list of domain name IDs. |
|
|
string |
The ID of the domain name. |
d-aafefqefz |
|
| domainInfos |
array<object> |
A list of domain information. |
|
|
object |
|||
| protocol |
string |
The protocol. |
HTTP,HTTPS |
| name |
string |
The domain name. |
verifyicket |
| domainId |
string |
The ID of the domain name. |
www.abc.com |
| protocol |
string |
The service protocol. |
HTTP |
| mcpServerPath |
string |
The access path to the MCP Server provided by the gateway. |
/mcp-servers/test-mcp |
| exposedUriPath |
string |
The exposed URI path. This parameter is required when |
/sse |
| nacosMcpSyncInfo |
object |
Information about the MCP Server synchronized from Nacos. |
|
| importInstanceId |
string |
The ID of 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 |
|
|
object |
An assembly source. |
||
| 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 |
An MCP tool. |
test-tool |
|
| mcpServerConfig |
string |
The configuration for converting HTTP requests to the MCP protocol. |
MCP Server配置 base64 |
| mcpServerConfigPluginAttachmentId |
string |
The attachment ID of the MCP Server plugin configuration. |
pa-adfaefwaef |
| deployStatus |
string |
The API's deployment status in the current environment. |
Deployed |
| mcpStatisticsEnable |
boolean |
Specifies whether to enable MCP observability. The default value is |
false |
| grayMcpServerConfigs |
array<object> |
A list of canary route configurations. |
|
|
array<object> |
A canary route configuration. |
||
| routeId |
string |
The ID of the canary route. |
gray-route-xxx |
| match | HttpRouteMatch |
The match rule for the canary route. |
|
| backendConfig |
object |
The backend configuration for the canary route. |
|
| scene |
string |
The backend scene. |
SingleService |
| services |
array<object> |
A list of service configurations. |
|
|
object |
A backend service configuration. |
||
| protocol |
string |
The service protocol. |
HTTP |
| port |
integer |
The service port. |
8080 |
| weight |
integer |
The service weight. |
100 |
| serviceId |
string |
The ID of the service. |
svc-xxx |
| version |
string |
The service version. |
v2.0.0 |
| apiId |
string |
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": ""
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.