GetMcpServer
Retrieves an MCP server.
Operation description
You can use this operation to create 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 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.