Get MCP Server by ID
GET /admin/v1/mcp_servers/{id}
GET /admin/v1/mcp_servers/{id}Interactive request editor loads with JavaScript.
Authorization
AdminBearer Admin key from config.admin.admin_keys.
In: header
Path Parameters
MCP server resource ID, as assigned by the active resource source (a UUIDv5 derived from the entry name in file mode; the etcd key's ID segment otherwise).
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://127.0.0.1:3001/admin/v1/mcp_servers/1d95ac57-7f27-46a4-b5a3-55d3c3ad0a12"OK
{
"id": "string",
"revision": 0,
"value": {
"display_name": "string",
"enabled": true,
"forward_client_headers": [
"string"
],
"name": "string",
"protocol_version": "2026-07-28",
"scopes": [
"string"
],
"timeout_ms": 1,
"transport": "streamable_http",
"url": "string",
"client_id": "string",
"secret": "string",
"token_url": "string",
"auth_type": "api_key",
"api_key_header": null,
"spec": null,
"type": "mcp"
}
}Missing or invalid admin key
{
"error_msg": "string"
}Resource not found
{
"error_msg": "string"
}Configuration store operation failed
{
"error_msg": "string"
}Complete operation details and schema variants
GET /admin/v1/mcp_servers/{id}
Get MCP Server by ID
Get an upstream MCP server resource by ID.
Parameters
id(path, string, required): MCP server resource ID, as assigned by the active resource source (a UUIDv5 derived from the entry name in file mode; the etcd key's ID segment otherwise).
Responses
200: OKid(string, required): Resource ID, as assigned by the active resource source.revision(integer, required): Monotonic resource revision: the etcd mod_revision of the entry, or the load generation in file mode.value(object, required): Stored upstream MCP server configuration.- allOf variant 1
value.api_key_header(string,null, optional): Header name the API key is sent under whentypeisopenapiandauth_typeisapi_key. Defaults tox-api-keywhen unset. Ignored fortype: mcp, whose API-key header is fixed.value.auth_type(object, optional): How the gateway authenticates to the upstream server. The credential is held by the gateway and is never forwarded from or exposed to the calling client.- allOf variant 1
- oneOf variant 1: No authentication
- oneOf variant 2: Bearer token
- oneOf variant 3: API key
- oneOf variant 4: OAuth 2.0 client credentials
value.client_id(string,null, optional): OAuth client identifier used for the OAuth 2.0 client credentials grant. Required whenauth_typeisoauth2; ignored otherwise.value.display_name(string, optional): Accepted as an alternative spelling ofname. Provide the label under exactly one of the two names.value.enabled(boolean, optional): Whether this server is active. Whenfalse, its tools are not listed and cannot be called.value.forward_client_headers(array, optional): Inbound client headers forwarded to this server, as single-*glob patterns matched case-insensitively against the header name ("x-trace-*","authorization"). Empty — the default — forwards nothing. Applies to bothtype: mcpandtype: openapi, so a REST API exposed here as tools receives them on every tool call.
A header the caller sends more than once is forwarded with its first value only; the upstream receives one well-formed header rather than a list this gateway never interpreted. An HTTP/2 caller may split cookie across several header fields, and only the first of them is forwarded.
A header named here reaches the server whatever the gateway would otherwise do with it. Naming the credential slot auth_type would fill — authorization for bearer and oauth2, api_key_header for api_key — hands the server the caller's own credential in place of the gateway's, never both. That is what lets an internal server that already authorizes on the end user's Authorization keep doing so unchanged. A server that validates the aud claim will reject a token minted for the gateway.
A credential slot, and traceparent / tracestate, are forwarded only when a pattern names them exactly — a glob such as "*" or "x-*" is a statement about the operator's own headers, not consent to hand a third party the caller's credential or to graft the caller's trace onto that party's telemetry.
Headers whose forwarding would break the exchange rather than change who it comes from are never forwarded whatever the patterns say: host, the hop-by-hop headers that describe the caller's own connection, the gateway's x-aisix-* namespace, the headers describing a body this gateway re-serializes (content-type, content-length, accept), and the MCP session slots (mcp-session-id, mcp-protocol-version, last-event-id), which name the caller's session with this gateway and which an upstream MCP server refuses outright when they carry a foreign value.
value.name(string, optional): Operator-facing label, unique within the gateway. It is used as the namespace prefix for this server's tools, which are exposed to clients as<name>__<tool>, so it must not contain the reserved separator__.value.protocol_version(object, optional): MCP protocol revision the gateway uses when connecting to this upstream server. When omitted, the gateway opens the session with theinitializehandshake, which negotiates among the pre-2026 protocol revisions — the right choice for most servers, including2026-07-28servers that keep backward compatibility. Set2026-07-28for a server that requires the stateless MCP2026-07-28revision (handshake-freeserver/discoverstartup); the connection fails rather than silently downgrading when the server does not support the configured revision. Only used whentypeismcp; ignored fortype: openapi.- allOf variant 1
- oneOf variant 1: MCP 2026-07-28
value.scopes(array,null, optional): OAuth scopes to request. Joined with spaces into thescopeparameter of the token request. Only used whenauth_typeisoauth2.value.secret(string,null, optional): Authentication credential for the upstream server. Its meaning followsauth_type: the bearer token whenauth_typeisbearer(sent asAuthorization: Bearer <secret>), the API key whenauth_typeisapi_key(sent asx-api-key: <secret>, or underapi_key_headerfortype: openapi), or the OAuth client secret whenauth_typeisoauth2. Leave unset whenauth_typeisnone.value.spec(object, optional): The OpenAPI 3.x document (as a JSON object) whose operations become this server's tools. Required whentypeisopenapi; ignored otherwise.value.timeout_ms(integer,null, optional): Maximum time, in milliseconds, to wait for a single upstream operation (establishing the session, listing tools, or calling a tool). Must be at least1when set. When omitted, the gateway applies a built-in default.value.token_url(string,null, optional): OAuth token endpoint URL where the gateway exchanges the client credentials for an access token, such ashttps://auth.example.com/oauth/token. Required whenauth_typeisoauth2; ignored otherwise.value.transport(object, optional): Transport used to reach the upstream server. Streamable HTTP is the only supported transport.- allOf variant 1
- oneOf variant 1: Streamable HTTP
value.type(object, optional): What backs this server: a real upstream MCP server (mcp, the default), or a plain REST API described by an OpenAPI document (openapi) whose operations the gateway itself exposes as MCP tools.- allOf variant 1
- oneOf variant 1: Upstream MCP server
- oneOf variant 2: REST API described by an OpenAPI document
value.url(string, required): Fortype: mcp, the upstream server's MCP endpoint URL, reached over the Streamable HTTP transport, such ashttps://api.example.com/mcp. Fortype: openapi, the REST API's base URL that generated tool calls are issued against, such ashttps://erp.internal/api/v1.- allOf variant 1
- allOf variant 2
- allOf variant 3
- allOf variant 4
- allOf variant 5
- anyOf variant 1: name
- anyOf variant 2: display_name
401: Missing or invalid admin keyerror_msg(string, required): Human-readable error message.404: Resource not found Response fields (application/json): identical toGET /admin/v1/mcp_servers/{id}, response 401 above.500: Configuration store operation failed Response fields (application/json): identical toGET /admin/v1/mcp_servers/{id}, response 401 above.
cURL
curl -X GET 'http://127.0.0.1:3001/admin/v1/mcp_servers/{id}'