Get generated Python code for the MCP Server

Pre-release Endpoint
This endpoint is currently in beta and is subject to change.

Generates MCP server Python code from the OpenAPI specifications associated with the MCP server.

get

Path Parameters

controlPlaneIdstring(uuid)required

The UUID of your control plane. This variable is available in the Konnect manager.

Example:9524ec7d-36d9-465d-a8c5-83a3c9390458

mcpServerIdstring(uuid)required

The ID of the MCP server.

Response

application/json

Generated Python code for the MCP server

MCPServerCodeResponse

codestringrequired

Generated Python code for the MCP server implementation

Example:print("Hello MCP")

get/mcp-cp/{controlPlaneId}/mcp-servers/{mcpServerId}/code
 
application/json

MCPServerPodsStatus

object
readyintegerrequired

Number of pods in the ready state.

>= 0

Example:2

startingintegerrequired

Number of pods in the starting state.

>= 0

failingintegerrequired

Number of pods in the failing state.

>= 0

Example

MCPServerVersionStatus

object
versionstringrequired

The version identifier of the MCP server deployment.

Example:v1

desired_replicasintegerrequired

The desired number of replicas for this version.

>= 0

Example:2

created_replicasintegerrequired

The number of replicas that have been created for this version.

>= 0

Example:2

pods_statusobjectrequired
Show Child Parameters
Example

MCPServerStatusRequest

array

List of per-version deployment statuses for the MCP server.

versionstringrequired

The version identifier of the MCP server deployment.

Example:v1

desired_replicasintegerrequired

The desired number of replicas for this version.

>= 0

Example:2

created_replicasintegerrequired

The number of replicas that have been created for this version.

>= 0

Example:2

pods_statusobjectrequired
Show Child Parameters

MCPServerStatusResponse

object
statusstringrequired

Aggregated deployment status of the MCP server.

  • deploying — single version with desired replicas not yet fully ready.
  • healthy — single version running with no failing pods.
  • pending — no deployment status has been reported yet.
  • unhealthy — one or more failing pods across any version.
  • upgrading — multiple versions running with no failing pods.

Allowed values:deployinghealthypendingunhealthyupgrading

Example:healthy

Example